summaryrefslogtreecommitdiff
path: root/src/plugins/bazaar/bazaarplugin.cpp
diff options
context:
space:
mode:
authorHugues Delorme <delorme.hugues@fougsys.fr>2011-11-22 15:11:58 +0100
committerHugues Delorme <delorme.hugues@fougsys.fr>2011-11-23 11:22:21 +0100
commitdf058c80273ed0881fff0c054aea6d7eaf4bf21d (patch)
treeb5ae42801cb967195780088d52471f6dfc74ae3a /src/plugins/bazaar/bazaarplugin.cpp
parent0b67a513d6c2fb4929bea28517a755e0c5d8ae0b (diff)
downloadqt-creator-df058c80273ed0881fff0c054aea6d7eaf4bf21d.tar.gz
Bazaar,Mercurial: fix update of the commit button
There was a bug with the initial display of the submit editor. The submit action was not disabled (description field is empty) and thus the user was allowed to commit changes without entering a description. Empty commit message causes error for most VCS (if not all). Technically, Utils::SubmitEditorWidget::registerActions() must be called before init of the widget (eg call to BazaarPlugin::setFields()), because SubmitEditorWidget::updateActions() won't have any chance to be called. Change-Id: I154d6c807e0943b98abcb6222d8f57ec5421181c Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com> Reviewed-by: Bill King <bill.king@nokia.com>
Diffstat (limited to 'src/plugins/bazaar/bazaarplugin.cpp')
-rw-r--r--src/plugins/bazaar/bazaarplugin.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/bazaar/bazaarplugin.cpp b/src/plugins/bazaar/bazaarplugin.cpp
index 3e8f31818a..bdc33c94af 100644
--- a/src/plugins/bazaar/bazaarplugin.cpp
+++ b/src/plugins/bazaar/bazaarplugin.cpp
@@ -586,6 +586,11 @@ void BazaarPlugin::showCommitWidget(const QList<VCSBase::VCSBaseClient::StatusIt
return;
}
+ commitEditor->registerActions(m_editorUndo, m_editorRedo, m_editorCommit, m_editorDiff);
+ connect(commitEditor, SIGNAL(diffSelectedFiles(QStringList)),
+ this, SLOT(diffFromEditorSelected(QStringList)));
+ commitEditor->setCheckScriptWorkingDirectory(m_submitRepository);
+
const QString msg = tr("Commit changes for \"%1\".").
arg(QDir::toNativeSeparators(m_submitRepository));
commitEditor->setDisplayName(msg);
@@ -593,11 +598,6 @@ void BazaarPlugin::showCommitWidget(const QList<VCSBase::VCSBaseClient::StatusIt
const BranchInfo branch = m_client->synchronousBranchQuery(m_submitRepository);
commitEditor->setFields(branch, m_bazaarSettings.stringValue(BazaarSettings::userNameKey),
m_bazaarSettings.stringValue(BazaarSettings::userEmailKey), status);
-
- commitEditor->registerActions(m_editorUndo, m_editorRedo, m_editorCommit, m_editorDiff);
- connect(commitEditor, SIGNAL(diffSelectedFiles(QStringList)),
- this, SLOT(diffFromEditorSelected(QStringList)));
- commitEditor->setCheckScriptWorkingDirectory(m_submitRepository);
}
void BazaarPlugin::diffFromEditorSelected(const QStringList &files)