Commit 80bcac2a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Merge remote-tracking branch 'origin/release/20.08' into master

parents 43f98283 0922a95a
Pipeline #34493 passed with stage
in 44 minutes and 23 seconds
...@@ -37,6 +37,12 @@ ArchiveMailKernel::ArchiveMailKernel(QObject *parent) ...@@ -37,6 +37,12 @@ ArchiveMailKernel::ArchiveMailKernel(QObject *parent)
mJobScheduler = new MailCommon::JobScheduler(this); mJobScheduler = new MailCommon::JobScheduler(this);
} }
ArchiveMailKernel *ArchiveMailKernel::self()
{
static ArchiveMailKernel s_self;
return &s_self;
}
KIdentityManagement::IdentityManager *ArchiveMailKernel::identityManager() KIdentityManagement::IdentityManager *ArchiveMailKernel::identityManager()
{ {
return mIdentityManager; return mIdentityManager;
......
...@@ -25,6 +25,8 @@ class ArchiveMailKernel : public QObject, public MailCommon::IKernel, public Mai ...@@ -25,6 +25,8 @@ class ArchiveMailKernel : public QObject, public MailCommon::IKernel, public Mai
public: public:
explicit ArchiveMailKernel(QObject *parent = nullptr); explicit ArchiveMailKernel(QObject *parent = nullptr);
static ArchiveMailKernel *self();
KIdentityManagement::IdentityManager *identityManager() override; KIdentityManagement::IdentityManager *identityManager() override;
MessageComposer::MessageSender *msgSender() override; MessageComposer::MessageSender *msgSender() override;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
ArchiveMailManager::ArchiveMailManager(QObject *parent) ArchiveMailManager::ArchiveMailManager(QObject *parent)
: QObject(parent) : QObject(parent)
{ {
mArchiveMailKernel = new ArchiveMailKernel(this); mArchiveMailKernel = ArchiveMailKernel::self();
CommonKernel->registerKernelIf(mArchiveMailKernel); //register KernelIf early, it is used by the Filter classes CommonKernel->registerKernelIf(mArchiveMailKernel); //register KernelIf early, it is used by the Filter classes
CommonKernel->registerSettingsIf(mArchiveMailKernel); //SettingsIf is used in FolderTreeWidget CommonKernel->registerSettingsIf(mArchiveMailKernel); //SettingsIf is used in FolderTreeWidget
mConfig = KSharedConfig::openConfig(); mConfig = KSharedConfig::openConfig();
......
...@@ -56,9 +56,8 @@ ArchiveMailInfo *ArchiveMailItem::info() const ...@@ -56,9 +56,8 @@ ArchiveMailInfo *ArchiveMailItem::info() const
ArchiveMailWidget::ArchiveMailWidget(const KSharedConfigPtr &config, QWidget *parent, const QVariantList &args) ArchiveMailWidget::ArchiveMailWidget(const KSharedConfigPtr &config, QWidget *parent, const QVariantList &args)
: Akonadi::AgentConfigurationBase(config, parent, args) : Akonadi::AgentConfigurationBase(config, parent, args)
, mChanged(false)
{ {
ArchiveMailKernel *archiveMailKernel = new ArchiveMailKernel(this); ArchiveMailKernel *archiveMailKernel = ArchiveMailKernel::self();
CommonKernel->registerKernelIf(archiveMailKernel); //register KernelIf early, it is used by the Filter classes CommonKernel->registerKernelIf(archiveMailKernel); //register KernelIf early, it is used by the Filter classes
CommonKernel->registerSettingsIf(archiveMailKernel); //SettingsIf is used in FolderTreeWidget CommonKernel->registerSettingsIf(archiveMailKernel); //SettingsIf is used in FolderTreeWidget
......
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