summaryrefslogtreecommitdiff
path: root/src/gui/serverdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-25 13:48:24 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-25 13:48:24 +0300
commit6c05739c62484dae8d5ed9fb0dfdb6590aacfe88 (patch)
treedf4a3e32b8ad9e77d894280966a0066f4aef0a94 /src/gui/serverdialog.cpp
parent9a970ba6bc80938b56f3ba731bf4614b40ba573d (diff)
downloadmv-6c05739c62484dae8d5ed9fb0dfdb6590aacfe88.tar.gz
mv-6c05739c62484dae8d5ed9fb0dfdb6590aacfe88.tar.bz2
mv-6c05739c62484dae8d5ed9fb0dfdb6590aacfe88.tar.xz
mv-6c05739c62484dae8d5ed9fb0dfdb6590aacfe88.zip
improve a bit strings declaration.
Diffstat (limited to 'src/gui/serverdialog.cpp')
-rw-r--r--src/gui/serverdialog.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index 325d43502..fcebad81d 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -588,7 +588,7 @@ void ServerDialog::loadServers(const bool addNew)
}
const std::string lang = getLangShort();
- const std::string description2 = "description_" + lang;
+ const std::string description2("description_" + lang);
for_each_xml_child_node(serverNode, rootNode)
{
@@ -707,13 +707,13 @@ void ServerDialog::loadCustomServers()
for (int i = 0; i < MAX_SERVERLIST; ++i)
{
const std::string index = toString(i);
- const std::string nameKey = "MostUsedServerDescName" + index;
- const std::string descKey = "MostUsedServerDescription" + index;
- const std::string hostKey = "MostUsedServerName" + index;
- const std::string typeKey = "MostUsedServerType" + index;
- const std::string portKey = "MostUsedServerPort" + index;
+ const std::string nameKey("MostUsedServerDescName" + index);
+ const std::string descKey("MostUsedServerDescription" + index);
+ const std::string hostKey("MostUsedServerName" + index);
+ const std::string typeKey("MostUsedServerType" + index);
+ const std::string portKey("MostUsedServerPort" + index);
const std::string onlineListUrlKey
- = "MostUsedServerOnlineList" + index;
+ ("MostUsedServerOnlineList" + index);
ServerInfo server;
server.name = config.getValue(nameKey, "");
@@ -771,13 +771,13 @@ void ServerDialog::saveCustomServers(const ServerInfo &currentServer,
continue;
const std::string num = toString(savedServerCount);
- const std::string nameKey = "MostUsedServerDescName" + num;
- const std::string descKey = "MostUsedServerDescription" + num;
- const std::string hostKey = "MostUsedServerName" + num;
- const std::string typeKey = "MostUsedServerType" + num;
- const std::string portKey = "MostUsedServerPort" + num;
+ const std::string nameKey("MostUsedServerDescName" + num);
+ const std::string descKey("MostUsedServerDescription" + num);
+ const std::string hostKey("MostUsedServerName" + num);
+ const std::string typeKey("MostUsedServerType" + num);
+ const std::string portKey("MostUsedServerPort" + num);
const std::string onlineListUrlKey
- = "MostUsedServerOnlineList" + num;
+ ("MostUsedServerOnlineList" + num);
config.setValue(nameKey, toString(server.name));
config.setValue(descKey, toString(server.description));