Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 6b88cd02 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

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
parent 6c61363e
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment