diff --git a/src/lib/app/datapaths.cpp b/src/lib/app/datapaths.cpp index d8d4c8fa7..b2b4c7332 100644 --- a/src/lib/app/datapaths.cpp +++ b/src/lib/app/datapaths.cpp @@ -83,8 +83,6 @@ void DataPaths::clearTempData() void DataPaths::init() { - m_paths.reserve(5); - // AppData #if defined(Q_OS_MAC) m_paths[AppData].append(QApplication::applicationDirPath() + QLatin1String("/../Resources")); diff --git a/src/lib/app/datapaths.h b/src/lib/app/datapaths.h index a17229f25..bbafeda4d 100644 --- a/src/lib/app/datapaths.h +++ b/src/lib/app/datapaths.h @@ -18,8 +18,7 @@ #ifndef DATAPATHS_H #define DATAPATHS_H -#include -#include +#include #include "qzcommon.h" @@ -27,14 +26,14 @@ class QUPZILLA_EXPORT DataPaths { public: enum Path { - AppData, // /usr/share/qupzilla or . or ../Resources - Translations, // $AppData/locale - Themes, // $AppData/themes - Plugins, // $AppData/plugins - Config, // ~/.config/qupzilla or %LOCALAPPDATA%/qupzilla or $AppData/data (portable) - Profiles, // $Config/profiles - CurrentProfile, // $Profiles/current_profile - Temp // $Config/tmp + AppData = 0, // /usr/share/qupzilla or . or ../Resources + Translations = 1, // $AppData/locale + Themes = 2, // $AppData/themes + Plugins = 3, // $AppData/plugins + Config = 4, // ~/.config/qupzilla or %LOCALAPPDATA%/qupzilla or $AppData/data (portable) + Profiles = 5, // $Config/profiles + CurrentProfile = 6, // $Profiles/current_profile + Temp = 7 // $Config/tmp }; explicit DataPaths(); @@ -58,7 +57,7 @@ private: void init(); void initCurrentProfile(const QString &profilePath); - QHash m_paths; + QStringList m_paths[8]; }; #endif // DATAPATHS_H