diff --git a/apps/browser/MainWindow.cpp b/apps/browser/MainWindow.cpp index 96cc096b4..093f6ef43 100644 --- a/apps/browser/MainWindow.cpp +++ b/apps/browser/MainWindow.cpp @@ -48,7 +48,7 @@ MainWindow::~MainWindow() delete mGameInvoker; } -void MainWindow::addServer(QString addr) +void MainWindow::addServerAndUpdate(QString addr) { favorites->insertRow(0); QModelIndex mi = favorites->index(0, ServerData::ADDR); @@ -72,7 +72,7 @@ void MainWindow::addServerByIP() bool ok; QString text = QInputDialog::getText(this, tr("Add Server by address"), tr("Address:"), QLineEdit::Normal, "", &ok); if(ok && !text.isEmpty()) - addServer(text); + addServerAndUpdate(text); } void MainWindow::deleteServer() @@ -181,7 +181,7 @@ void MainWindow::loadFavorites() QJsonDocument jsonDoc(QJsonDocument::fromJson(file.readAll())); for(auto server : jsonDoc.array()) - addServer(server.toString()); + addServerAndUpdate(server.toString()); file.close(); } \ No newline at end of file diff --git a/apps/browser/MainWindow.hpp b/apps/browser/MainWindow.hpp index e1666c18b..74e882c6d 100644 --- a/apps/browser/MainWindow.hpp +++ b/apps/browser/MainWindow.hpp @@ -19,7 +19,7 @@ public: virtual ~MainWindow(); protected: void closeEvent(QCloseEvent * event) Q_DECL_OVERRIDE; - void addServer(QString addr); + void addServerAndUpdate(QString addr); public slots: bool refresh(); protected slots: