summaryrefslogtreecommitdiff
path: root/src/plugins/git/gitsubmiteditorwidget.cpp
diff options
context:
space:
mode:
authorHugues Delorme <delorme.hugues@fougsys.fr>2011-11-22 15:04:58 +0100
committerHugues Delorme <delorme.hugues@fougsys.fr>2011-11-23 11:12:01 +0100
commit0b67a513d6c2fb4929bea28517a755e0c5d8ae0b (patch)
tree3dfe2a10863c05c16e107883fddd00ac1139790a /src/plugins/git/gitsubmiteditorwidget.cpp
parent19425b5e41ff7c625890504baa39feb23601cea2 (diff)
downloadqt-creator-0b67a513d6c2fb4929bea28517a755e0c5d8ae0b.tar.gz
Utils: let SubmitEditorWidget handle empty description
SubmitEditorWidget::canSubmit() now return false if the description field is empty. This avoids dummy code duplication in VCS plugins. Change-Id: I11e4928e8eed432ccee6fa1f3516f0179a54625c Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com> Reviewed-by: Bill King <bill.king@nokia.com>
Diffstat (limited to 'src/plugins/git/gitsubmiteditorwidget.cpp')
-rw-r--r--src/plugins/git/gitsubmiteditorwidget.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/plugins/git/gitsubmiteditorwidget.cpp b/src/plugins/git/gitsubmiteditorwidget.cpp
index 6223a4b4cf..2c09d75877 100644
--- a/src/plugins/git/gitsubmiteditorwidget.cpp
+++ b/src/plugins/git/gitsubmiteditorwidget.cpp
@@ -154,11 +154,8 @@ void GitSubmitEditorWidget::setPanelData(const GitSubmitEditorPanelData &data)
bool GitSubmitEditorWidget::canSubmit() const
{
- QString message = cleanupDescription(descriptionText()).trimmed();
-
if (m_gitSubmitPanelUi.invalidAuthorLabel->isVisible()
- || m_gitSubmitPanelUi.invalidEmailLabel->isVisible()
- || message.isEmpty())
+ || m_gitSubmitPanelUi.invalidEmailLabel->isVisible())
return false;
return SubmitEditorWidget::canSubmit();
}