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
wilder-work
Matt Douhan 21 years ago
parent d8f2382436
commit 0bd3ea8309
  1. 9
      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<GpgME::Key> & pgpSigningKeys = mPGPSigningKeyRequester->keys();
const std::vector<GpgME::Key> & pgpEncryptionKeys = mPGPEncryptionKeyRequester->keys();
const std::vector<GpgME::Key> & smimeSigningKeys = mSMIMESigningKeyRequester->keys();

Loading…
Cancel
Save