summaryrefslogtreecommitdiff
path: root/libresourceqt/src/resource-engine.cpp
diff options
context:
space:
mode:
authorWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-04-07 14:47:54 +0300
committerWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-04-07 14:47:54 +0300
commit31d0fad9a33502e9c05e8862b0c3996bf8bafb93 (patch)
tree35bd7f5d963c3e900d007a91015e8bba0d9f3abd /libresourceqt/src/resource-engine.cpp
parentd4cce391f9836996667067771e4ce9ca64d3fb3c (diff)
parent7bfa856f0673b81d4d0dafd6e02e07f10f07a023 (diff)
Merge commit 'origin/master'
Conflicts: libresourceqt/src/resource-engine.cpp
Diffstat (limited to 'libresourceqt/src/resource-engine.cpp')
-rw-r--r--libresourceqt/src/resource-engine.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/libresourceqt/src/resource-engine.cpp b/libresourceqt/src/resource-engine.cpp
index 402c0bf..b90081e 100644
--- a/libresourceqt/src/resource-engine.cpp
+++ b/libresourceqt/src/resource-engine.cpp
@@ -14,7 +14,7 @@ static void handleAdviceMessage(resmsg_t *msg, resset_t *rs, void *data);
ResourceEngine::ResourceEngine(ResourceSet *resourceSet)
: QObject(resourceSet), connected(false), resourceSet(resourceSet),
- dbusEngine(NULL), libresourceConnection(NULL), libresourceSet(NULL),
+ libresourceConnection(NULL), libresourceSet(NULL),
requestId(0), messageMap(), connectionMode(0)
{
if (resourceSet->alwaysGetReply()) {
@@ -28,7 +28,6 @@ ResourceEngine::ResourceEngine(ResourceSet *resourceSet)
ResourceEngine::~ResourceEngine()
{
- delete dbusEngine;
if (libresourceSet != NULL)
libresourceSet->userdata = NULL;
//need to destroy all libresource structures, but how?
@@ -38,9 +37,6 @@ bool ResourceEngine::initialize()
{
DBusError dbusError;
DBusConnection *dbusConnection;
- dbusEngine = new DBUSConnectionEventLoop;
- if(dbusEngine == NULL)
- return false;
dbus_error_init(&dbusError);
dbusConnection = dbus_bus_get(DBUS_BUS_SESSION, &dbusError);
@@ -50,7 +46,7 @@ bool ResourceEngine::initialize()
return false;
}
dbus_error_free(&dbusError);
- dbusEngine->addConnection(dbusConnection);
+ DBUSConnectionEventLoop::addConnection(dbusConnection);
libresourceConnection = resproto_init(RESPROTO_ROLE_CLIENT, RESPROTO_TRANSPORT_DBUS,
connectionIsUp, dbusConnection);
if (libresourceConnection == NULL) {
@@ -178,7 +174,8 @@ bool ResourceEngine::connectToManager()
libresourceSet = resconn_connect(libresourceConnection, &resourceMessage,
statusCallbackHandler);
if (libresourceSet == NULL)
- return NULL;
+ return false;
+
libresourceSet->userdata = this; //save our context
return true;
}