[Differential] [Changed Subscribers] D2599: Don't delete ETMViewStateSaver manually

knauss (Sandro Knauß) noreply at phabricator.kde.org
Tue Nov 29 13:14:38 GMT 2016


knauss added inline comments.

INLINE COMMENTS

> foldertreewidget.cpp:168
>      } else if (text.isEmpty()) {
> -        d->saver = new Akonadi::ETMViewStateSaver;
> -        d->saver->setView(folderTreeView());
> -        QString currentIndex = d->saver->currentIndexKey();
> -        if (d->saver->selectionKeys().isEmpty()) {
> +        auto saver = new Akonadi::ETMViewStateSaver;
> +        saver->setView(folderTreeView());

just for curiosity, who is responsible for deleting this pointer? So far I would suggest just to create a QScopedPointer<Akonadi::ETMViewStateSaver> saver =[...]

to make sure, that we don't have a dangling pointer.

REPOSITORY
  R92 PIM: Common Mail Support

REVISION DETAIL
  https://phabricator.kde.org/D2599

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: dkurz, #kde_pim
Cc: knauss, mlaurent, kde-pim, spencerb, dvasin, winterz, vkrause, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20161129/8474a369/attachment.html>


More information about the kde-pim mailing list