diff confirmcommentdialog.cpp @ 194:5ca49523892f

* Fixes to dialog return code handling
author Chris Cannam
date Mon, 20 Dec 2010 22:39:45 +0000
parents ef5feb0d648f
children c9a7e4ec2f78
line wrap: on
line diff
--- a/confirmcommentdialog.cpp	Mon Dec 20 22:37:42 2010 +0000
+++ b/confirmcommentdialog.cpp	Mon Dec 20 22:39:45 2010 +0000
@@ -92,8 +92,8 @@
 
     QPushButton *ok = box.addButton(QMessageBox::Ok);
     ok->setText(okButtonText);
-    if (box.exec() == -1) return QMessageBox::Cancel;
-    return box.standardButton(box.clickedButton());
+    if (box.exec() == -1) return false;
+    return box.standardButton(box.clickedButton()) == QMessageBox::Ok;
 }
 
 bool ConfirmCommentDialog::confirmDangerous(QWidget *parent,
@@ -109,8 +109,8 @@
 
     QPushButton *ok = box.addButton(QMessageBox::Ok);
     ok->setText(okButtonText);
-    if (box.exec() == -1) return QMessageBox::Cancel;
-    return box.standardButton(box.clickedButton());
+    if (box.exec() == -1) return false;
+    return box.standardButton(box.clickedButton()) == QMessageBox::Ok;
 }
 
 bool ConfirmCommentDialog::confirmFilesAction(QWidget *parent,