Commit 6275308f authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Git: Externally set dialog title for LogChangeDialog



Change-Id: I5869e17145f9974eb274d4300bbb23ebdc0990f0
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 15374275
......@@ -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;
}
}
......
......@@ -96,8 +96,6 @@ LogChangeDialog::LogChangeDialog(bool isReset, QWidget *parent)
bool LogChangeDialog::runDialog(const QString &repository)
{
setWindowTitle(tr("Undo Changes to %1").arg(QDir::toNativeSeparators(repository)));
if (!populateLog(repository) || !m_model->rowCount())
return QDialog::Rejected;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment