Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
25a546e3
Commit
25a546e3
authored
Sep 24, 2009
by
Friedemann Kleint
Browse files
Git:: Prompt before doing hard reset.
parent
4abe4d18
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/git/gitplugin.cpp
View file @
25a546e3
...
...
@@ -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
());
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment