From kde-commits Fri Dec 28 12:21:22 2012 From: =?ISO-8859-1?Q?Andr=E9_W=F6bbeking?= Date: Fri, 28 Dec 2012 12:21:22 +0000 To: kde-commits Subject: Re: [kdepim/KDE/4.10] mailcommon: Use qpointer here Message-Id: <2659247.BMKlToQ7O3 () sol> X-MARC-Message: https://marc.info/?l=kde-commits&m=135669730413137 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 dlg = new > FilterActionMissingCollectionDialog( lst, QString(), folder ); if ( > dlg->exec() ) { > newFolderId = dlg->selectedCollection().id(); Then you should also test dlg after calling exec(), right?