KCal Library
Go to the documentation of this file.
36 #include "kpimutils/email.h"
38 #include <QtCore/QRegExp>
50 class KCal::Person::Private
65 KPIMUtils::extractEmailAddressAndName( fullName, d->mEmail, d->mName );
71 KPIMUtils::extractEmailAddressAndName( fullName, email, name );
72 return Person( name, email );
76 : d( new KCal::
Person::Private )
83 : d( new KCal::
Person::Private( *person.d ) )
92 #if defined(Q_CC_MSVC)
99 d->mName == person.d->mName &&
100 d->mEmail == person.d->mEmail;
106 if ( &person ==
this ) {
116 if ( d->mName.isEmpty() ) {
119 if ( d->mEmail.isEmpty() ) {
123 QString
name = d->mName;
124 QRegExp needQuotes(
"[^ 0-9A-Za-z\\x0080-\\xFFFF]" );
125 bool weNeedToQuote = name.indexOf( needQuotes ) != -1;
126 if ( weNeedToQuote ) {
127 if ( name[0] !=
'"' ) {
130 if ( name[ name.length()-1 ] !=
'"' ) {
134 return name +
" <" + d->mEmail +
'>';
151 return d->mEmail.isEmpty() && d->mName.isEmpty();
161 if ( email.startsWith( QLatin1String(
"mailto:" ), Qt::CaseInsensitive ) ) {
162 d->mEmail = email.mid( 7 );
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:29:16 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.