Git commit 3db364070caeec96b16b4a07bbcec73448bf0c2f by Jan Kundr?t. Committed on 21/05/2013 at 21:39. Pushed by jkt into branch 'master'.
GUI: disable sending of e-mails without any subject Nope, I don't want to add a button which would make it possible to send a mail with an empty subject. M +5 -0 src/Gui/ComposeWidget.cpp http://commits.kde.org/trojita/3db364070caeec96b16b4a07bbcec73448bf0c2f diff --git a/src/Gui/ComposeWidget.cpp b/src/Gui/ComposeWidget.cpp index 979f985..7ef7e7a 100644 --- a/src/Gui/ComposeWidget.cpp +++ b/src/Gui/ComposeWidget.cpp @@ -230,6 +230,11 @@ bool ComposeWidget::buildMessageData() gotError(tr("The From: address does not look like a valid one")); return false; } + if (ui->subject->text().isEmpty()) { + gotError(tr("You haven't entered any subject. Cannot send such a mail, sorry.")); + ui->subject->setFocus(); + return false; + } m_submission->composer()->setFrom(fromAddress); m_submission->composer()->setTimestamp(QDateTime::currentDateTime());
