mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-10 01:09:34 +00:00
Changed: Check default installer.ini in different places, see #279
This commit is contained in:
parent
190f72d95f
commit
444bdeceb6
1 changed files with 19 additions and 2 deletions
|
@ -144,8 +144,25 @@ CConfigFile::CConfigFile(QObject *parent):QObject(parent), m_defaultServerIndex(
|
||||||
{
|
{
|
||||||
s_instance = this;
|
s_instance = this;
|
||||||
|
|
||||||
m_language = QLocale::system().name().left(2); // only keep language ISO 639 code
|
// only keep language ISO 639 code
|
||||||
m_defaultConfigPath = QApplication::applicationDirPath() + "/installer.ini";
|
m_language = QLocale::system().name().left(2);
|
||||||
|
|
||||||
|
// it won't be found if run with uninstall flag, but since we already have a local installer.ini...
|
||||||
|
QString configFile = getCurrentDirectory() + "/installer.ini";
|
||||||
|
|
||||||
|
if (!QFile::exists(configFile))
|
||||||
|
{
|
||||||
|
configFile = QApplication::applicationDirPath() + "/installer.ini";
|
||||||
|
|
||||||
|
if (!QFile::exists(configFile))
|
||||||
|
{
|
||||||
|
configFile.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m_defaultConfigPath = configFile;
|
||||||
|
|
||||||
|
// the config file we'll write
|
||||||
m_configPath = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/installer.ini";
|
m_configPath = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/installer.ini";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue