mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-14 03:09:04 +00:00
Changed: Keep other servers when upgrading ryzom_installer.ini
This commit is contained in:
parent
7140cb40a7
commit
d776a00980
1 changed files with 17 additions and 14 deletions
|
@ -106,15 +106,19 @@ bool CConfigFile::load(const QString &filename)
|
||||||
m_productHelpUrl = settings.value("url_help").toString();
|
m_productHelpUrl = settings.value("url_help").toString();
|
||||||
m_productComments = settings.value("comments").toString();
|
m_productComments = settings.value("comments").toString();
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
}
|
||||||
|
|
||||||
settings.beginGroup("servers");
|
settings.beginGroup("servers");
|
||||||
int serversCount = settings.value("size").toInt();
|
int serversCount = settings.value("size").toInt();
|
||||||
m_defaultServerIndex = settings.value("default").toInt();
|
m_defaultServerIndex = settings.value("default").toInt();
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
m_servers.resize(serversCount);
|
// only resize if added servers in local ryzom_installer.ini
|
||||||
|
int oldServersCount = m_servers.size();
|
||||||
|
|
||||||
for (int i = 0; i < serversCount; ++i)
|
if (serversCount > oldServersCount) m_servers.resize(serversCount);
|
||||||
|
|
||||||
|
for (int i = oldServersCount; i < serversCount; ++i)
|
||||||
{
|
{
|
||||||
CServer &server = m_servers[i];
|
CServer &server = m_servers[i];
|
||||||
|
|
||||||
|
@ -122,7 +126,6 @@ bool CConfigFile::load(const QString &filename)
|
||||||
server.loadFromSettings(settings);
|
server.loadFromSettings(settings);
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// custom choices, always keep them
|
// custom choices, always keep them
|
||||||
settings.beginGroup("profiles");
|
settings.beginGroup("profiles");
|
||||||
|
|
Loading…
Reference in a new issue