Changeset View
Changeset View
Standalone View
Standalone View
src/core/jobs/agentinstancecreatejob.cpp
Show All 17 Lines | |||||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #include "agentinstancecreatejob.h" | 20 | #include "agentinstancecreatejob.h" | ||
21 | 21 | | |||
22 | #include "agentinstance.h" | 22 | #include "agentinstance.h" | ||
23 | #include "agentmanager.h" | 23 | #include "agentmanager.h" | ||
24 | #include "agentmanager_p.h" | 24 | #include "agentmanager_p.h" | ||
25 | #include "controlinterface.h" | 25 | #include "controlinterface.h" | ||
26 | #include "KDBusConnectionPool" | 26 | #include <QDBusConnection> | ||
27 | #include "kjobprivatebase_p.h" | 27 | #include "kjobprivatebase_p.h" | ||
28 | #include "servermanager.h" | 28 | #include "servermanager.h" | ||
29 | 29 | | |||
30 | #include <KLocalizedString> | 30 | #include <KLocalizedString> | ||
31 | 31 | | |||
32 | #include <QTimer> | 32 | #include <QTimer> | ||
33 | 33 | | |||
34 | #ifdef Q_OS_UNIX | 34 | #ifdef Q_OS_UNIX | ||
Show All 37 Lines | 65 | if (agentInstance == instance && !tooLate) { | |||
72 | } | 72 | } | ||
73 | } | 73 | } | ||
74 | } | 74 | } | ||
75 | 75 | | |||
76 | void doConfigure() | 76 | void doConfigure() | ||
77 | { | 77 | { | ||
78 | org::freedesktop::Akonadi::Agent::Control *agentControlIface = | 78 | org::freedesktop::Akonadi::Agent::Control *agentControlIface = | ||
79 | new org::freedesktop::Akonadi::Agent::Control(ServerManager::agentServiceName(ServerManager::Agent, agentInstance.identifier()), | 79 | new org::freedesktop::Akonadi::Agent::Control(ServerManager::agentServiceName(ServerManager::Agent, agentInstance.identifier()), | ||
80 | QStringLiteral("/"), KDBusConnectionPool::threadConnection(), q); | 80 | QStringLiteral("/"), QDBusConnection::sessionBus(), q); | ||
81 | if (!agentControlIface || !agentControlIface->isValid()) { | 81 | if (!agentControlIface || !agentControlIface->isValid()) { | ||
82 | delete agentControlIface; | 82 | delete agentControlIface; | ||
83 | 83 | | |||
84 | q->setError(KJob::UserDefinedError); | 84 | q->setError(KJob::UserDefinedError); | ||
85 | q->setErrorText(i18n("Unable to access D-Bus interface of created agent.")); | 85 | q->setErrorText(i18n("Unable to access D-Bus interface of created agent.")); | ||
86 | q->emitResult(); | 86 | q->emitResult(); | ||
87 | return; | 87 | return; | ||
88 | } | 88 | } | ||
▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines |