summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-22 19:35:25 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-22 19:35:25 +0300
commita54ff6d4104a9b382c1419c00cc83684e391a445 (patch)
treef5163fa2ee8097cc0b98163bc83ae3eb6f3ff4a1 /src/gui
parent3b22410e42be27ac30fc63f020243241d1eea737 (diff)
downloadplus-a54ff6d4104a9b382c1419c00cc83684e391a445.tar.gz
plus-a54ff6d4104a9b382c1419c00cc83684e391a445.tar.bz2
plus-a54ff6d4104a9b382c1419c00cc83684e391a445.tar.xz
plus-a54ff6d4104a9b382c1419c00cc83684e391a445.zip
Remove default parameters from serverdialog.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/serverdialog.cpp11
-rw-r--r--src/gui/windows/serverdialog.h6
2 files changed, 10 insertions, 7 deletions
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index ab630e960..1970e8ca4 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -258,7 +258,8 @@ void ServerDialog::connectToSelectedServer()
if (chatLogger != nullptr)
chatLogger->setServerName(mServerInfo->hostname);
- saveCustomServers(*mServerInfo);
+ saveCustomServers(*mServerInfo,
+ -1);
if (!LoginDialog::savedPasswordKey.empty())
{
@@ -312,7 +313,8 @@ void ServerDialog::action(const ActionEvent &event)
{
mServersList->setSelected(0);
mServers.erase(mServers.begin() + index);
- saveCustomServers();
+ saveCustomServers(ServerInfo(),
+ -1);
}
}
else if (eventId == "info")
@@ -357,7 +359,8 @@ void ServerDialog::keyPressed(KeyEvent &event)
{
mServersList->setSelected(0);
mServers.erase(mServers.begin() + index);
- saveCustomServers();
+ saveCustomServers(ServerInfo(),
+ -1);
}
return;
}
@@ -413,7 +416,7 @@ void ServerDialog::logic()
MutexLocker tempLock(&mMutex);
if (mDownloadStatus == ServerDialogDownloadStatus::COMPLETE)
{
- loadServers();
+ loadServers(true);
mDownloadStatus = ServerDialogDownloadStatus::OVER;
mDescription->setCaption(std::string());
logger->log("Servers list updated");
diff --git a/src/gui/windows/serverdialog.h b/src/gui/windows/serverdialog.h
index b541e7f65..484c28507 100644
--- a/src/gui/windows/serverdialog.h
+++ b/src/gui/windows/serverdialog.h
@@ -111,12 +111,12 @@ class ServerDialog final : public Window,
*/
void downloadServerList();
- void loadServers(const bool addNew = true);
+ void loadServers(const bool addNew);
void loadCustomServers();
- void saveCustomServers(const ServerInfo &currentServer = ServerInfo(),
- const int index = -1);
+ void saveCustomServers(const ServerInfo &currentServer,
+ const int index);
bool needUpdateServers() const;