diff options
author | Friedemann Kleint <[email protected]> | 2009-09-24 13:58:08 +0200 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2009-09-24 13:58:08 +0200 |
commit | 25a546e3ea759e90529f0425e3f1b5b305fd1544 (patch) | |
tree | 5fc717d70186b5c1cb0b9ff57c62e0a99606b871 /src/plugins/git/gitplugin.cpp | |
parent | 4abe4d186c225e85b8cfa97983b55bd727766b7a (diff) |
Git:: Prompt before doing hard reset.
Diffstat (limited to 'src/plugins/git/gitplugin.cpp')
-rw-r--r-- | src/plugins/git/gitplugin.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index b61fc8f5caf..5997982569a 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -524,9 +524,17 @@ void GitPlugin::undoFileChanges() void GitPlugin::undoProjectChanges() { - QString workingDirectory = getWorkingDirectory(); + const QString workingDirectory = getWorkingDirectory(); if (workingDirectory.isEmpty()) return; + const QMessageBox::StandardButton answer + = QMessageBox::question(m_core->mainWindow(), + tr("Revert"), + tr("Would you like to revert all pending changes to the project?"), + QMessageBox::Yes|QMessageBox::No, + QMessageBox::No); + if (answer == QMessageBox::No) + return; m_gitClient->hardReset(workingDirectory, QString()); } |