Mercurial > hg > easyhg
changeset 194:5ca49523892f
* Fixes to dialog return code handling
author | Chris Cannam |
---|---|
date | Mon, 20 Dec 2010 22:39:45 +0000 |
parents | ef5feb0d648f |
children | ff0d76dcb3b8 |
files | confirmcommentdialog.cpp mainwindow.cpp |
diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
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,
--- 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;