# HG changeset patch # User Chris Cannam # Date 1292884785 0 # Node ID 5ca49523892f775f8974374b16a3a1baafb42ace # Parent ef5feb0d648fe0f1fedb236a01d43ac7d0539658 * Fixes to dialog return code handling diff -r ef5feb0d648f -r 5ca49523892f confirmcommentdialog.cpp --- 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, diff -r ef5feb0d648f -r 5ca49523892f mainwindow.cpp --- a/mainwindow.cpp Mon Dec 20 22:37:42 2010 +0000 +++ b/mainwindow.cpp Mon Dec 20 22:39:45 2010 +0000 @@ -772,7 +772,7 @@ format3(tr("Confirm pull from remote repository"), tr("You are about to pull changes from the following remote repository:"), remoteRepoPath), - tr("Pull")) == QMessageBox::Ok) { + tr("Pull"))) { QStringList params; params << "pull" << remoteRepoPath; @@ -787,7 +787,7 @@ format3(tr("Confirm push to remote repository"), tr("You are about to push your changes to the following remote repository:"), remoteRepoPath), - tr("Push")) == QMessageBox::Ok) { + tr("Push"))) { QStringList params; params << "push" << "--new-branch" << remoteRepoPath;