mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-22 23:26:15 +00:00
Changed: Check default installer.ini in different places, see #279
--HG-- branch : develop
This commit is contained in:
parent
fffce0ca58
commit
49607ddfb9
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