Merge remote branch 'origin/2.0'

Conflicts:
	src/plugins/debugger/debuggeruiswitcher.cpp
	src/plugins/git/gitclient.cpp
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
This commit is contained in:
Friedemann Kleint
2010-08-06 10:46:50 +02:00
24 changed files with 316 additions and 4399 deletions

View File

@@ -332,9 +332,15 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
globalcontext, true, SLOT(blameFile()));
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+B")));
parameterActionCommand
= createFileAction(actionManager, gitContainer,
tr("Undo Unstaged Changes"), tr("Undo Unstaged Changes for \"%1\""),
QLatin1String("Git.UndoUnstaged"), globalcontext,
true, SLOT(undoUnstagedFileChanges()));
parameterActionCommand
= createFileAction(actionManager, gitContainer,
tr("Undo Changes"), tr("Undo Changes for \"%1\""),
tr("Undo Uncommitted Changes"), tr("Undo Uncommitted Changes for \"%1\""),
QLatin1String("Git.Undo"), globalcontext,
true, SLOT(undoFileChanges()));
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+U")));
@@ -561,12 +567,17 @@ void GitPlugin::logProject()
m_gitClient->log(state.currentProjectTopLevel(), state.relativeCurrentProject());
}
void GitPlugin::undoFileChanges()
void GitPlugin::undoFileChanges(bool revertStaging)
{
const VCSBase::VCSBasePluginState state = currentState();
QTC_ASSERT(state.hasFile(), return)
Core::FileChangeBlocker fcb(state.currentFile());
m_gitClient->revert(QStringList(state.currentFile()));
m_gitClient->revert(QStringList(state.currentFile()), revertStaging);
}
void GitPlugin::undoUnstagedFileChanges()
{
undoFileChanges(false);
}
void GitPlugin::undoRepositoryChanges()