Skip to content

Commit

Permalink
Fixed wrong index when appending to server names
Browse files Browse the repository at this point in the history
  • Loading branch information
doumdi committed Apr 19, 2021
1 parent d0267ac commit 8e4b047
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions client/src/managers/ConfigManagerClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@ QStringList ConfigManagerClient::getServerNames()
if (!m_config.isNull()){
QMap<QString, QVariant> servers = m_config["Servers"].toObject().toVariantMap();
foreach (QString name, servers.keys()){
QVariantMap infos = servers[name].toMap();
int pref = infos["pref"].toInt()-1;
if (pref < server_names.count())
server_names.insert(pref, name);
else
server_names.append(name);
server_names.append(name);
}
}

Expand Down

0 comments on commit 8e4b047

Please sign in to comment.