Merge pull request #15648 from Chocobo1/lockfile

Create lock file in config folder instead of temp folder
This commit is contained in:
Chocobo1
2021-11-03 12:15:22 +08:00
committed by GitHub
7 changed files with 31 additions and 72 deletions

View File

@@ -169,9 +169,9 @@ SettingsPtr Private::CustomProfile::applicationSettings(const QString &name) con
{
// here we force QSettings::IniFormat format always because we need it to be portable across platforms
#if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
constexpr const char *CONF_FILE_EXTENSION = ".ini";
const char CONF_FILE_EXTENSION[] = ".ini";
#else
constexpr const char *CONF_FILE_EXTENSION = ".conf";
const char CONF_FILE_EXTENSION[] = ".conf";
#endif
const QString settingsFileName {QDir(configLocation()).absoluteFilePath(name + QLatin1String(CONF_FILE_EXTENSION))};
return SettingsPtr(new QSettings(settingsFileName, QSettings::IniFormat));