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

List:       kde-commits
Subject:    [kdepim-addons/Applications/17.08] plugins/plasma/pimeventsplugin: Fix memory leak and crash in Plas
From:       Daniel_Vrátil <null () kde ! org>
Date:       2017-09-29 11:43:04
Message-ID: E1dxthA-0006WY-LU () code ! kde ! org
[Download RAW message or body]

Git commit 6b88cd02467e97ba9110f39e8f52b584fb9bdc12 by Daniel Vrátil.
Committed on 29/09/2017 at 11:36.
Pushed by dvratil into branch 'Applications/17.08'.

Fix memory leak and crash in Plasma events plugin configuration

Don't leak the internal ETM in PIMCalendarsModel. The Monitor is
already parented to the PIMCalendarsModel, but the ETM is not, so
deleting PIMCalendarsModel destroys the Monitor, but the ETM is left
with dangling pointer to the Monitor.

BUG: 376220
FIXED-IN: 5.6.2

M  +1    -1    plugins/plasma/pimeventsplugin/pimcalendarsmodel.cpp

https://commits.kde.org/kdepim-addons/6b88cd02467e97ba9110f39e8f52b584fb9bdc12

diff --git a/plugins/plasma/pimeventsplugin/pimcalendarsmodel.cpp \
b/plugins/plasma/pimeventsplugin/pimcalendarsmodel.cpp index 8be5dd0a..fa5058f6 \
                100644
--- a/plugins/plasma/pimeventsplugin/pimcalendarsmodel.cpp
+++ b/plugins/plasma/pimeventsplugin/pimcalendarsmodel.cpp
@@ -45,7 +45,7 @@ PimCalendarsModel::PimCalendarsModel(QObject *parent)
     cr->setTypeMonitored(Akonadi::Monitor::Collections);
     cr->collectionFetchScope().setListFilter(Akonadi::CollectionFetchScope::Enabled);
  
-    mEtm = new Akonadi::EntityTreeModel(cr);
+    mEtm = new Akonadi::EntityTreeModel(cr, this);
     mEtm->setItemPopulationStrategy(Akonadi::EntityTreeModel::NoItemPopulation);
     mEtm->setListFilter(Akonadi::CollectionFetchScope::Enabled);
     connect(mEtm, &Akonadi::EntityTreeModel::collectionTreeFetched,


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

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