summaryrefslogtreecommitdiff
path: root/libresourceqt/src/resource-set.cpp
diff options
context:
space:
mode:
authorWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-12-01 16:27:21 +0200
committerWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-12-01 16:27:21 +0200
commit78db2c0b916d68a0c4056d4be7228a606b2f9dac (patch)
treefb5c624c88b413d82c790c7f488d3e3efd862742 /libresourceqt/src/resource-set.cpp
parentc8917f1cbbf96a1c5c655d9adbd45a46833e70db (diff)
parentef6d735381083c0e90b122f6a22771c13337b8c1 (diff)
downloadlibresourceqt-78db2c0b916d68a0c4056d4be7228a606b2f9dac.tar.gz
Merge remote branch 'origin/master'
Diffstat (limited to 'libresourceqt/src/resource-set.cpp')
-rw-r--r--libresourceqt/src/resource-set.cpp26
1 files changed, 19 insertions, 7 deletions
diff --git a/libresourceqt/src/resource-set.cpp b/libresourceqt/src/resource-set.cpp
index e96c7a0..190df5e 100644
--- a/libresourceqt/src/resource-set.cpp
+++ b/libresourceqt/src/resource-set.cpp
@@ -230,21 +230,32 @@ Resource * ResourceSet::resource(ResourceType type) const
return resourceSet[type];
}
-bool ResourceSet::acquire()
+bool ResourceSet::initAndConnect()
{
- if (!initialized) {
+ if ( !initialized ) {
qDebug("ResourceSet::%s().... initializing...", __FUNCTION__);
- pendingAcquire = true;
return initialize();
}
- if (!resourceEngine->isConnectedToManager()) {
+ if ( !resourceEngine->isConnectedToManager() ) {
qDebug("ResourceSet::%s().... connecting...", __FUNCTION__);
+ return resourceEngine->connectToManager();
+ }
+ else
+ qDebug("ResourceSet::%s(): already connected", __FUNCTION__);
+
+ return true;
+}
+
+bool ResourceSet::acquire()
+{
+ if ( !initialized || !resourceEngine->isConnectedToManager() )
+ {
pendingAcquire = true;
- resourceEngine->connectToManager();
- return true;
+ return initAndConnect();
}
- else {
+ else
+ {
qDebug("ResourceSet::%s().... acquiring", __FUNCTION__);
return resourceEngine->acquireResources();
}
@@ -311,6 +322,7 @@ void ResourceSet::connectedHandler()
qDebug("**************** ResourceSet::%s().... %d", __FUNCTION__, __LINE__);
if (resourceEngine->isConnectedToManager()) {
qDebug("ResourceSet::%s() Connected to manager!", __FUNCTION__);
+ emit connectedToManager();
if (pendingAudioProperties) {
registerAudioProperties();