Commit 47b7676e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix crash mailfilteragent

parent 409930d4
Pipeline #76156 passed with stage
in 23 minutes and 18 seconds
......@@ -56,7 +56,6 @@ bool MailFilterAgent::isFilterableCollection(const Akonadi::Collection &collecti
MailFilterAgent::MailFilterAgent(const QString &id)
: Akonadi::AgentBase(id)
, m_filterManager(new FilterManager(this))
, mProgressTimer(new QTimer(this))
{
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 0, 0)
......@@ -70,6 +69,8 @@ MailFilterAgent::MailFilterAgent(const QString &id)
CommonKernel->registerKernelIf(mMailFilterKernel); // register KernelIf early, it is used by the Filter classes
CommonKernel->registerSettingsIf(mMailFilterKernel); // SettingsIf is used in FolderTreeWidget
// Initialize it after registring CommonKernel otherwise it crashs!
m_filterManager = new FilterManager(this);
connect(m_filterManager, &FilterManager::percent, this, &MailFilterAgent::emitProgress);
connect(m_filterManager, &FilterManager::progressMessage, this, &MailFilterAgent::emitProgressMessage);
......
......@@ -70,7 +70,7 @@ public Q_SLOTS:
private:
bool isFilterableCollection(const Akonadi::Collection &collection) const;
FilterManager *const m_filterManager;
FilterManager *m_filterManager = nullptr;
FilterLogDialog *m_filterLogDialog = nullptr;
QTimer *const mProgressTimer;
......
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