From 0bd3ea83091a32d6b1fd241eeb421f7dc0dfbc8d Mon Sep 17 00:00:00 2001 From: Matt Douhan Date: Sun, 20 Feb 2005 20:04:31 +0000 Subject: [PATCH] Adde email addressvalidation for the Bcc lineedit in the identity dialog, this helps the user to not mistype an address and thus causing strange error messages. svn path=/trunk/kdepim/; revision=391472 --- identitydialog.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/identitydialog.cpp b/identitydialog.cpp index b38eb9fc9..87b952286 100644 --- a/identitydialog.cpp +++ b/identitydialog.cpp @@ -453,6 +453,15 @@ void IdentityDialog::slotOk() { return; } + // check the Bcc address + const QString bcc = mBccEdit->text().stripWhiteSpace(); + if ( !( isValidSimpleEmailAddress( bcc ) || bcc.isEmpty() )) { + QString errorMsg( simpleEmailAddressErrorMsg()); + KMessageBox::sorry( this, errorMsg, i18n("Invalid Email Address") ); //FIXME:change to Invalid Bcc Address after stringfreeze + return; + } + + const std::vector & pgpSigningKeys = mPGPSigningKeyRequester->keys(); const std::vector & pgpEncryptionKeys = mPGPEncryptionKeyRequester->keys(); const std::vector & smimeSigningKeys = mSMIMESigningKeyRequester->keys();