Commit 8c8efb8c authored by Laurent Montel's avatar Laurent Montel 😁

Add support for multi instance

parent 24f4447e
......@@ -127,7 +127,12 @@ bool SendLater::SendLaterUtil::sentLaterAgentEnabled()
void SendLater::SendLaterUtil::reload()
{
qCDebug(LIBSENDLATER_LOG) << " void SendLater::SendLaterUtil::reload()";
QDBusInterface interface(QStringLiteral("org.freedesktop.Akonadi.Agent.akonadi_sendlater_agent"), QStringLiteral("/SendLaterAgent"));
QString service = QStringLiteral("org.freedesktop.Akonadi.Agent.akonadi_sendlater_agent");
if (Akonadi::ServerManager::hasInstanceIdentifier()) {
service += QLatin1Char('.') + Akonadi::ServerManager::instanceIdentifier();
}
QDBusInterface interface(service, QStringLiteral("/SendLaterAgent"));
if (interface.isValid()) {
interface.call(QStringLiteral("reload"));
} else {
......
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