diff options
Diffstat (limited to 'src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp index c894bdf8..48a4ceb4 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp @@ -322,10 +322,14 @@ void MainUI::closeEvent(QCloseEvent *ev){ //qDebug() << "Close Event:" << ui->check_show_popups->isChecked() << picSaved; if(ui->check_show_popups->isChecked() && !picSaved){ //Ask what to do about the unsaved changed - const int messageRet = QMessageBox::warning(this, tr("Unsaved Screenshot"), - tr("The current screenshot has not been saved yet. Do you want to save or discard your changes?"), - QMessageBox::Discard | QMessageBox::Save |QMessageBox::Cancel, QMessageBox::Cancel); - switch (messageRet) { + QMessageBox dialog( QMessageBox::Warning, tr("Unsaved Screenshot"), + tr("The current screenshot has not been saved yet. Do you want to save or discard your changes?"), + QMessageBox::Discard | QMessageBox::Save | QMessageBox::Cancel, this); + dialog.setDefaultButton(QMessageBox::Cancel); + dialog.setButtonText(QMessageBox::Save, tr("Save")); + dialog.setButtonText(QMessageBox::Discard, tr("Discard")); + dialog.setButtonText(QMessageBox::Cancel, tr("Cancel")); + switch (dialog.exec()) { case QMessageBox::Discard: // Just close, we don't care about the file. break; |