summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-07-22 11:10:27 +0200
committerSimon Rettberg2019-07-22 11:10:27 +0200
commit4e29f977f00573497de3e245f938d33b3f88a84c (patch)
tree4e3e1a870e7d8361fce116cb967049c0c3c0fae2
parent[client] Try not to steal focus on startup (diff)
downloadpvs2-4e29f977f00573497de3e245f938d33b3f88a84c.tar.gz
pvs2-4e29f977f00573497de3e245f938d33b3f88a84c.tar.xz
pvs2-4e29f977f00573497de3e245f938d33b3f88a84c.zip
[server] Fix confirmation dialog when loading room layout
-rw-r--r--src/server/mainwindow/mainwindow.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index 0abfdff..f6ff566 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -789,10 +789,11 @@ void MainWindow::onReloadRoomOk()
QMessageBox::critical(this, "Warning", tr("No item selected, please select room!"), 0, 1);
return;
}
- int ret = QMessageBox::QMessageBox::question(this, "Warning", tr("Are you sure you want to reload the room?\n"
- "Note that all clients will be deleted."), 0, 1, 2);
-
- if (ret == 1) {
+ QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Warning"),
+ tr("Are you sure you want to reload the room?\n"
+ "Note that all clients will be deleted."),
+ QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
+ if (ret == QMessageBox::Yes) {
disconnect(_reloadWindow->ui->buttonBox, SIGNAL(accepted()), this, SLOT(onReloadRoomOk()));
disconnect(_reloadWindow->ui->buttonBox, SIGNAL(rejected()), this, SLOT(onReloadRoomCancel()));
// Delete all clients.