From 4e29f977f00573497de3e245f938d33b3f88a84c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 22 Jul 2019 11:10:27 +0200 Subject: [server] Fix confirmation dialog when loading room layout --- src/server/mainwindow/mainwindow.cpp | 9 +++++---- 1 file 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. -- cgit v1.2.3-55-g7522