1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 21:49:55 +00:00

[Browser] Rename addServer to addServerAndUpdate

This commit is contained in:
Koncord 2017-01-22 17:11:44 +08:00
parent 1bd4db5e8b
commit 33339fa786
2 changed files with 4 additions and 4 deletions

View file

@ -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();
}

View file

@ -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: