[Kde-pim] [kdepimlibs/KDE/4.9] akonadi/contact: Don't allow to create group with @ or . in groupname

laurent Montel montel at kde.org
Tue Jul 10 14:49:39 BST 2012


it's a good idea.
Will apply it tomorrow when branch will be open.
Regards

Le mardi 10 juillet 2012 11:37:53 David Faure a écrit :
> On Sunday 08 July 2012 14:24:55 Montel Laurent wrote:
> > Git commit 28b47910cfd742d5d67ce8a2a51487fbc87480dd by Montel Laurent.
> > Committed on 08/07/2012 at 14:24.
> > Pushed by mlaurent into branch 'KDE/4.9'.
> > 
> > Don't allow to create group with @ or . in groupname
> 
> Good. Now, if groups cannot contain '@', can we skip the searching of groups
> when the user typed an email address containing '@' ?
> This should make things a bit faster when sending emails.
> 
> diff --git a/akonadi/contact/contactgroupexpandjob.cpp
> b/akonadi/contact/contactgroupexpandjob.cpp
> index fee2d62..75b2ade 100644
> --- a/akonadi/contact/contactgroupexpandjob.cpp
> +++ b/akonadi/contact/contactgroupexpandjob.cpp
> @@ -139,7 +139,7 @@ ContactGroupExpandJob::~ContactGroupExpandJob()
> 
>  void ContactGroupExpandJob::start()
>  {
> -  if ( !d->mName.isEmpty() ) {
> +  if ( !d->mName.isEmpty() && !d->mName.contains( QLatin1Char( '@' ) ) ) {
>      // we have to search the contact group first
>      ContactGroupSearchJob *searchJob = new ContactGroupSearchJob( this );
>      searchJob->setQuery( ContactGroupSearchJob::Name, d->mName );
> 
> 
> --
> David Faure, faure at kde.org, http://www.davidfaure.fr
> Sponsored by Nokia to work on KDE, incl. KDE Frameworks 5
-- 
Laurent Montel | laurent.montel at kdab.com | KDE/Qt Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list