Nepomuk-Core
Go to the documentation of this file.
22 #include "genericdatamanagementjob_p.h"
25 #include "kdbusconnectionpool.h"
27 #include <QtDBus/QDBusConnection>
28 #include <QtDBus/QDBusPendingReply>
29 #include <QtDBus/QDBusPendingCallWatcher>
31 #include <QtCore/QVariant>
32 #include <QtCore/QHash>
33 #include <QThreadStorage>
37 Nepomuk2::GenericDataManagementJob::GenericDataManagementJob(
const char *methodName,
38 QGenericArgument val0,
39 QGenericArgument val1,
40 QGenericArgument val2,
41 QGenericArgument val3,
42 QGenericArgument val4,
43 QGenericArgument val5)
46 QDBusPendingReply<> reply;
47 QMetaObject::invokeMethod(Nepomuk2::dataManagementDBusInterface(),
50 Q_RETURN_ARG(QDBusPendingReply<> , reply),
57 QDBusPendingCallWatcher* dbusCallWatcher =
new QDBusPendingCallWatcher(reply);
58 connect(dbusCallWatcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
59 this, SLOT(slotDBusCallFinished(QDBusPendingCallWatcher*)));
62 Nepomuk2::GenericDataManagementJob::~GenericDataManagementJob()
71 void Nepomuk2::GenericDataManagementJob::slotDBusCallFinished(QDBusPendingCallWatcher *watcher)
73 QDBusPendingReply<> reply = *watcher;
74 if (reply.isError()) {
75 QDBusError error = reply.error();
77 setError(
int(error.type()));
78 setErrorText(error.message());
88 if (!s_perThreadDms.hasLocalData()) {
92 s_perThreadDms.setLocalData(
94 QLatin1String(
"/datamanagement"),
95 KDBusConnectionPool::threadConnection()));
97 return s_perThreadDms.localData();
100 #include "genericdatamanagementjob_p.moc"
QThreadStorage< OrgKdeNepomukDataManagementInterface * > s_perThreadDms
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:08 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.