diff options
author | Simon Rettberg | 2018-08-01 17:28:37 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-08-01 17:28:37 +0200 |
commit | d6f4b76157d658b5d5c18438d32f5121938f6864 (patch) | |
tree | 086f1832191e28170d89d3cb47fee4b90b199cd4 /src | |
parent | [client] ConnectWindow: Restore green checkmark, fix messages (diff) | |
download | pvs2-d6f4b76157d658b5d5c18438d32f5121938f6864.tar.gz pvs2-d6f4b76157d658b5d5c18438d32f5121938f6864.tar.xz pvs2-d6f4b76157d658b5d5c18438d32f5121938f6864.zip |
[server] Fix exit button confirmation MessageBox
Just showing a single button called "Ok" is rather pointless...
Closes #3398
Diffstat (limited to 'src')
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index a74e449..5e703a1 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -435,11 +435,13 @@ ConnectionFrame* MainWindow::getSelectedFrame() */ void MainWindow::closeEvent(QCloseEvent* e) { - int ret = QMessageBox::question(this, "Question", "Are you sure you want to exit?", 0, 1, 2); - if (ret == 1) + QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Question"), tr("Are you sure you want to exit?"), + QMessageBox::Yes | QMessageBox::No, QMessageBox::No); + if (ret == QMessageBox::Yes) { QApplication::exit(0); - else + } else { e->ignore(); + } } /***************************************************************************//** |