diff options
-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(); + } } /***************************************************************************//** |