[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: [kdepim/KDE/4.10] mailcommon: Use qpointer here
From:       laurent Montel <montel () kde ! org>
Date:       2012-12-28 13:30:46
Message-ID: 1841131.4jjzv7rzUW () kspread
[Download RAW message or body]

Le vendredi 28 décembre 2012 13:21:22 André Wöbbeking a écrit :
> On Friday 28 December 2012 09:37:06 Montel Laurent wrote:
> > Git commit 0c3564089e8412b087729f4afcd7586fa4c98318 by Montel Laurent.
> > Committed on 28/12/2012 at 09:36.
> > Pushed by mlaurent into branch 'KDE/4.10'.
> > 
> > Use qpointer here
> > 
> > M  +1    -1    mailcommon/mailutil.cpp
> > 
> > http://commits.kde.org/kdepim/0c3564089e8412b087729f4afcd7586fa4c98318
> > 
> > diff --git a/mailcommon/mailutil.cpp b/mailcommon/mailutil.cpp
> > index 81fa913..67e0645 100644
> > --- a/mailcommon/mailutil.cpp
> > +++ b/mailcommon/mailutil.cpp
> > @@ -618,7 +618,7 @@ Akonadi::Collection::Id
> > MailCommon::Util::convertFolderPathToCollectionId( const if ( lst.count()
> > == 1 && exactPath )
> > 
> >      newFolderId = lst.at( 0 ).id();
> >    
> >    else {
> > 
> > -    FilterActionMissingCollectionDialog *dlg = new
> > FilterActionMissingCollectionDialog( lst, QString(), folder ); +
> > QPointer<FilterActionMissingCollectionDialog> dlg = new
> > FilterActionMissingCollectionDialog( lst, QString(), folder ); if (
> > dlg->exec() ) {
> > 
> >        newFolderId = dlg->selectedCollection().id();
> 
> Then you should also test dlg after calling exec(), right?

no
If it's closed in exec() it will send cancel => never go in {...}
Regards

-- 
Laurent Montel | laurent.montel@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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic