2018-01-05 02:23:49 +01:00
|
|
|
#pragma once
|
|
|
|
|
2018-06-21 13:02:34 +02:00
|
|
|
#include <boost/optional.hpp>
|
Sort and force grouping of includes (#4172)
This change enforces strict include grouping using IncludeCategories
In addition to adding this to the .clang-format file and applying it in the tests/src and src directories, I also did the following small changes:
In ChatterSet.hpp, I changed lrucache to a <>include
In Irc2.hpp, I change common/SignalVector.hpp to a "project-include"
In AttachedWindow.cpp, NativeMessaging.cpp, WindowsHelper.hpp, BaseWindow.cpp, and StreamerMode.cpp, I disabled clang-format for the windows-includes
In WindowDescriptors.hpp, I added the missing vector include. It was previously not needed because the include was handled by another file that was previously included first.
clang-format minimum version has been bumped, so Ubuntu version used in the check-formatting job has been bumped to 22.04 (which is the latest LTS)
2022-11-27 19:32:53 +01:00
|
|
|
#include <QString>
|
2018-01-05 02:23:49 +01:00
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
|
2018-06-28 19:51:07 +02:00
|
|
|
class Paths
|
2018-01-05 02:23:49 +01:00
|
|
|
{
|
2018-06-13 13:27:10 +02:00
|
|
|
public:
|
2018-08-02 14:23:27 +02:00
|
|
|
static Paths *instance;
|
|
|
|
|
|
|
|
Paths();
|
2018-06-13 13:27:10 +02:00
|
|
|
|
2018-08-06 21:17:03 +02:00
|
|
|
// Root directory for the configuration files. %APPDATA%/chatterino or
|
|
|
|
// ExecutablePath for portable mode
|
2018-06-21 13:02:34 +02:00
|
|
|
QString rootAppDataDirectory;
|
2018-04-14 15:32:41 +02:00
|
|
|
|
2018-06-21 13:02:34 +02:00
|
|
|
// Directory for settings files. Same as <appDataDirectory>/Settings
|
|
|
|
QString settingsDirectory;
|
2018-04-14 15:32:41 +02:00
|
|
|
|
2018-06-21 13:02:34 +02:00
|
|
|
// Directory for message log files. Same as <appDataDirectory>/Misc
|
|
|
|
QString messageLogDirectory;
|
2018-01-28 14:23:55 +01:00
|
|
|
|
2018-06-21 13:02:34 +02:00
|
|
|
// Directory for miscellaneous files. Same as <appDataDirectory>/Misc
|
|
|
|
QString miscDirectory;
|
|
|
|
|
2023-02-12 20:36:58 +01:00
|
|
|
// Directory for crashdumps. Same as <appDataDirectory>/Crashes
|
|
|
|
QString crashdumpDirectory;
|
|
|
|
|
2018-06-21 13:02:34 +02:00
|
|
|
// Hash of QCoreApplication::applicationFilePath()
|
|
|
|
QString applicationFilePathHash;
|
2018-04-20 00:15:57 +02:00
|
|
|
|
2021-10-17 15:06:58 +02:00
|
|
|
// Profile avatars for Twitch <appDataDirectory>/cache/twitch
|
2018-08-29 23:39:02 +02:00
|
|
|
QString twitchProfileAvatars;
|
|
|
|
|
2018-01-28 14:23:55 +01:00
|
|
|
bool createFolder(const QString &folderPath);
|
2018-05-28 18:25:19 +02:00
|
|
|
bool isPortable();
|
|
|
|
|
2018-08-19 16:20:14 +02:00
|
|
|
QString cacheDirectory();
|
|
|
|
|
2018-05-28 18:25:19 +02:00
|
|
|
private:
|
2018-06-21 13:02:34 +02:00
|
|
|
void initAppFilePathHash();
|
|
|
|
void initCheckPortable();
|
2019-10-05 16:40:04 +02:00
|
|
|
void initRootDirectory();
|
2018-06-21 13:02:34 +02:00
|
|
|
void initSubDirectories();
|
2018-07-06 19:23:47 +02:00
|
|
|
|
|
|
|
boost::optional<bool> portable_;
|
2018-08-19 16:20:14 +02:00
|
|
|
|
|
|
|
// Directory for cache files. Same as <appDataDirectory>/Misc
|
|
|
|
QString cacheDirectory_;
|
2018-01-05 02:23:49 +01:00
|
|
|
};
|
|
|
|
|
2018-08-12 12:56:28 +02:00
|
|
|
Paths *getPaths();
|
2018-07-07 11:41:01 +02:00
|
|
|
|
2018-01-05 02:23:49 +01:00
|
|
|
} // namespace chatterino
|