mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
[DataPaths] Use classic array instead of QHash for storing paths
This commit is contained in:
parent
d29abb4e54
commit
dc48ddbf47
|
@ -83,8 +83,6 @@ void DataPaths::clearTempData()
|
||||||
|
|
||||||
void DataPaths::init()
|
void DataPaths::init()
|
||||||
{
|
{
|
||||||
m_paths.reserve(5);
|
|
||||||
|
|
||||||
// AppData
|
// AppData
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
m_paths[AppData].append(QApplication::applicationDirPath() + QLatin1String("/../Resources"));
|
m_paths[AppData].append(QApplication::applicationDirPath() + QLatin1String("/../Resources"));
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
#ifndef DATAPATHS_H
|
#ifndef DATAPATHS_H
|
||||||
#define DATAPATHS_H
|
#define DATAPATHS_H
|
||||||
|
|
||||||
#include <QString>
|
#include <QStringList>
|
||||||
#include <QHash>
|
|
||||||
|
|
||||||
#include "qzcommon.h"
|
#include "qzcommon.h"
|
||||||
|
|
||||||
|
@ -27,14 +26,14 @@ class QUPZILLA_EXPORT DataPaths
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum Path {
|
enum Path {
|
||||||
AppData, // /usr/share/qupzilla or . or ../Resources
|
AppData = 0, // /usr/share/qupzilla or . or ../Resources
|
||||||
Translations, // $AppData/locale
|
Translations = 1, // $AppData/locale
|
||||||
Themes, // $AppData/themes
|
Themes = 2, // $AppData/themes
|
||||||
Plugins, // $AppData/plugins
|
Plugins = 3, // $AppData/plugins
|
||||||
Config, // ~/.config/qupzilla or %LOCALAPPDATA%/qupzilla or $AppData/data (portable)
|
Config = 4, // ~/.config/qupzilla or %LOCALAPPDATA%/qupzilla or $AppData/data (portable)
|
||||||
Profiles, // $Config/profiles
|
Profiles = 5, // $Config/profiles
|
||||||
CurrentProfile, // $Profiles/current_profile
|
CurrentProfile = 6, // $Profiles/current_profile
|
||||||
Temp // $Config/tmp
|
Temp = 7 // $Config/tmp
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit DataPaths();
|
explicit DataPaths();
|
||||||
|
@ -58,7 +57,7 @@ private:
|
||||||
void init();
|
void init();
|
||||||
void initCurrentProfile(const QString &profilePath);
|
void initCurrentProfile(const QString &profilePath);
|
||||||
|
|
||||||
QHash<Path, QStringList> m_paths;
|
QStringList m_paths[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DATAPATHS_H
|
#endif // DATAPATHS_H
|
||||||
|
|
Loading…
Reference in New Issue
Block a user