summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrisztian Litkey <krisztian.litkey@nokia.com>2010-12-13 14:16:37 +0200
committerKrisztian Litkey <krisztian.litkey@nokia.com>2010-12-13 14:16:37 +0200
commitd95f7b0938ec7c8081abd6d5a5fa94800eb27d12 (patch)
tree18522d60a96580c70f260a41fe83f55bb2dd7a13
parent349f6476da55a8c729cd8cd21b3906d8f5459d4e (diff)
parente533ea1abcb5dd43d894c0f4fc2d2cf1f6239074 (diff)
downloadlibresourceqt-d95f7b0938ec7c8081abd6d5a5fa94800eb27d12.tar.gz
Merge branch 'master' into meego
-rw-r--r--libresourceqt/include/qt4/policy/resource-set.h1
-rw-r--r--libresourceqt/src/resource-set.cpp8
-rw-r--r--resourceqt-client/resourceqt-client.pro3
3 files changed, 9 insertions, 3 deletions
diff --git a/libresourceqt/include/qt4/policy/resource-set.h b/libresourceqt/include/qt4/policy/resource-set.h
index a36254d..cbc29f0 100644
--- a/libresourceqt/include/qt4/policy/resource-set.h
+++ b/libresourceqt/include/qt4/policy/resource-set.h
@@ -339,6 +339,7 @@ private slots:
void handleGranted(quint32);
void handleDeny();
void handleReleased();
+ void handleReleasedByManager();
void handleResourcesLost(quint32);
void handleResourcesBecameAvailable(quint32);
diff --git a/libresourceqt/src/resource-set.cpp b/libresourceqt/src/resource-set.cpp
index 190df5e..d5eac09 100644
--- a/libresourceqt/src/resource-set.cpp
+++ b/libresourceqt/src/resource-set.cpp
@@ -81,7 +81,7 @@ bool ResourceSet::initialize()
QObject::connect(resourceEngine, SIGNAL(errorCallback(quint32, const char*)),
this, SIGNAL(errorCallback(quint32, const char*)));
QObject::connect(resourceEngine, SIGNAL(resourcesReleasedByManager()),
- this, SIGNAL(resourcesReleasedByManager()));
+ this, SLOT(handleReleasedByManager()));
qDebug("initializing resource engine...");
if (!resourceEngine->initialize()) {
@@ -236,7 +236,6 @@ bool ResourceSet::initAndConnect()
qDebug("ResourceSet::%s().... initializing...", __FUNCTION__);
return initialize();
}
-
if ( !resourceEngine->isConnectedToManager() ) {
qDebug("ResourceSet::%s().... connecting...", __FUNCTION__);
return resourceEngine->connectToManager();
@@ -469,3 +468,8 @@ void ResourceSet::handleAudioPropertiesChanged(const QString &, quint32,
registerAudioProperties();
}
+void ResourceSet::handleReleasedByManager()
+{
+ resourceEngine->releaseResources();
+ emit resourcesReleasedByManager();
+}
diff --git a/resourceqt-client/resourceqt-client.pro b/resourceqt-client/resourceqt-client.pro
index 99a69b1..df9762b 100644
--- a/resourceqt-client/resourceqt-client.pro
+++ b/resourceqt-client/resourceqt-client.pro
@@ -33,13 +33,14 @@ CONFIG -= app_bundle
INCLUDEPATH += $${LIBRESOURCEINC}
QMAKE_CXXFLAGS += -Wall
QMAKE_CFLAGS += -std=c99 -D_POSIX_C_SOURCE=199309L
-LIBS += -L$${LIBRESOURCEQT}/build -lresourceqt -L$${LIBDBUSQEVENTLOOP}/build -ldbus-qeventloop -lrt
+QMAKE_LFLAGS = -L$${LIBRESOURCEQT}/build -lresourceqt -L$${LIBDBUSQEVENTLOOP}/build -ldbus-qeventloop -lrt
# Input
HEADERS = client.h commandlineparser.h time-stat.h
SOURCES += resourceqt-client.cpp commandlineparser.cpp client.cpp time-stat.c
QMAKE_DISTCLEAN += -r .moc .obj
+#QMAKE_LFLAGS += -rpath-link=$${LIBRESOURCEQT}/build
# Install options
target.path = /usr/bin/