[kde-doc-english] [trojita] src/Gui: GUI: disable sending of e-mails without any subject
Jan Kundrát
jkt at flaska.net
Tue May 21 19:42:25 UTC 2013
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());
More information about the kde-doc-english
mailing list