Commit b66a9f3c authored by Volker Krause's avatar Volker Krause
Browse files

Register IMAP D-Bus interfaces before the service gets registered

Summary:
The account wizard accesses this right after the service is registered,
so we need to have this done in the ctor. I suspect this was done delayed,
as settings() is virtual and therefore calling that in the base ctor isn't
giving us the desired result. Calling it in every leaf ctor is ugly, but
given we want to phase out the Kolab resource anyway, this problem is going
away over time.

Reviewers: mlaurent

Subscribers: kde-pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D28583
parent 2dfc3da0
......@@ -53,6 +53,8 @@ ImapResource::ImapResource(const QString &id)
#endif
m_pool->setSessionUiProxy(SessionUiProxy::Ptr(new SessionUiProxy));
m_pool->setClientId(clientId());
settings(); // make sure the D-Bus settings interface is up
}
ImapResource::~ImapResource()
......
......@@ -146,13 +146,13 @@ ImapResourceBase::ImapResourceBase(const QString &id)
connect(m_statusMessageTimer, &QTimer::timeout, this, &ImapResourceBase::clearStatusMessage);
connect(this, &AgentBase::error, this, &ImapResourceBase::showError);
new ImapResourceBaseAdaptor(this);
QMetaObject::invokeMethod(this, &ImapResourceBase::delayedInit, Qt::QueuedConnection);
}
void ImapResourceBase::delayedInit()
{
settings(); // make sure the D-Bus settings interface is up
new ImapResourceBaseAdaptor(this);
setNeedsNetwork(needsNetwork());
// Migration issue: trash folder had ID in config, but didn't have SpecialCollections attribute, fix that.
......
......@@ -60,6 +60,8 @@ KolabResource::KolabResource(const QString &id)
//Ensure we have up-to date metadata before attempting to sync folder
setScheduleAttributeSyncBeforeItemSync(true);
setKeepLocalCollectionChanges(QSet<QByteArray>() << "ENTITYDISPLAY" << Akonadi::BlockAlarmsAttribute().type());
settings(); // make sure the D-Bus settings interface is up
}
KolabResource::~KolabResource()
......
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