summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.