Git: Externally set dialog title for LogChangeDialog

Change-Id: I5869e17145f9974eb274d4300bbb23ebdc0990f0
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2013-02-28 21:23:55 +02:00
committed by Orgad Shaneh
parent 15374275a1
commit 6275308f63
2 changed files with 5 additions and 5 deletions

View File

@@ -705,15 +705,17 @@ void GitPlugin::resetRepository()
{
const VcsBase::VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return);
QString topLevel = state.topLevel();
LogChangeDialog dialog(true);
if (dialog.runDialog(state.topLevel()))
dialog.setWindowTitle(tr("Undo Changes to %1").arg(QDir::toNativeSeparators(topLevel)));
if (dialog.runDialog(topLevel))
switch (dialog.resetType()) {
case HardReset:
m_gitClient->hardReset(state.topLevel(), dialog.commit());
m_gitClient->hardReset(topLevel, dialog.commit());
break;
case SoftReset:
m_gitClient->softReset(state.topLevel(), dialog.commit());
m_gitClient->softReset(topLevel, dialog.commit());
break;
}
}