mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 18:36:43 +00:00
[Browser] Rename addServer to addServerAndUpdate
This commit is contained in:
parent
1bd4db5e8b
commit
33339fa786
2 changed files with 4 additions and 4 deletions
|
@ -48,7 +48,7 @@ MainWindow::~MainWindow()
|
||||||
delete mGameInvoker;
|
delete mGameInvoker;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::addServer(QString addr)
|
void MainWindow::addServerAndUpdate(QString addr)
|
||||||
{
|
{
|
||||||
favorites->insertRow(0);
|
favorites->insertRow(0);
|
||||||
QModelIndex mi = favorites->index(0, ServerData::ADDR);
|
QModelIndex mi = favorites->index(0, ServerData::ADDR);
|
||||||
|
@ -72,7 +72,7 @@ void MainWindow::addServerByIP()
|
||||||
bool ok;
|
bool ok;
|
||||||
QString text = QInputDialog::getText(this, tr("Add Server by address"), tr("Address:"), QLineEdit::Normal, "", &ok);
|
QString text = QInputDialog::getText(this, tr("Add Server by address"), tr("Address:"), QLineEdit::Normal, "", &ok);
|
||||||
if(ok && !text.isEmpty())
|
if(ok && !text.isEmpty())
|
||||||
addServer(text);
|
addServerAndUpdate(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::deleteServer()
|
void MainWindow::deleteServer()
|
||||||
|
@ -181,7 +181,7 @@ void MainWindow::loadFavorites()
|
||||||
QJsonDocument jsonDoc(QJsonDocument::fromJson(file.readAll()));
|
QJsonDocument jsonDoc(QJsonDocument::fromJson(file.readAll()));
|
||||||
|
|
||||||
for(auto server : jsonDoc.array())
|
for(auto server : jsonDoc.array())
|
||||||
addServer(server.toString());
|
addServerAndUpdate(server.toString());
|
||||||
|
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
|
@ -19,7 +19,7 @@ public:
|
||||||
virtual ~MainWindow();
|
virtual ~MainWindow();
|
||||||
protected:
|
protected:
|
||||||
void closeEvent(QCloseEvent * event) Q_DECL_OVERRIDE;
|
void closeEvent(QCloseEvent * event) Q_DECL_OVERRIDE;
|
||||||
void addServer(QString addr);
|
void addServerAndUpdate(QString addr);
|
||||||
public slots:
|
public slots:
|
||||||
bool refresh();
|
bool refresh();
|
||||||
protected slots:
|
protected slots:
|
||||||
|
|
Loading…
Reference in a new issue