summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-08-25 09:07:30 +0300
committerWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-09-06 14:36:38 +0300
commit4f784dc5fd2178b98a19c0b60c5bbf5ea92782fa (patch)
tree69ded274cbe29e8b780817420c704ad239aac72d
parent0bcbc969c7dfa362cfffad3f92d375329fee289f (diff)
Added support for giving AlwaysReply and AutoRelease in the ctor
-rw-r--r--libresourceqt/include/qt4/policy/resource-set.h3
-rw-r--r--libresourceqt/src/resource-set.cpp9
2 files changed, 7 insertions, 5 deletions
diff --git a/libresourceqt/include/qt4/policy/resource-set.h b/libresourceqt/include/qt4/policy/resource-set.h
index b3da922..2fecd80 100644
--- a/libresourceqt/include/qt4/policy/resource-set.h
+++ b/libresourceqt/include/qt4/policy/resource-set.h
@@ -82,7 +82,8 @@ public:
* application.
* \param parent The optional parent of of this class.
*/
- ResourceSet(const QString &applicationClass, QObject *parent = NULL);
+ ResourceSet(const QString &applicationClass, QObject *parent = NULL,
+ bool alwaysReply = false, bool autoRelease = false);
/**
* The destructor
*/
diff --git a/libresourceqt/src/resource-set.cpp b/libresourceqt/src/resource-set.cpp
index bc6fd8c..27e809b 100644
--- a/libresourceqt/src/resource-set.cpp
+++ b/libresourceqt/src/resource-set.cpp
@@ -4,11 +4,12 @@ using namespace ResourcePolicy;
static quint32 resourceSetId=1;
-ResourceSet::ResourceSet(const QString &applicationClass, QObject * parent)
+ResourceSet::ResourceSet(const QString &applicationClass, QObject * parent,
+ bool initialAlwaysReply, bool initialAutoRelease)
: QObject(parent), resourceClass(applicationClass), resourceEngine(NULL),
- audioResource(NULL), autoRelease(false), alwaysReply(false),
- initialized(false), pendingAcquire(false), pendingUpdate(false),
- pendingAudioProperties(false)
+ audioResource(NULL), autoRelease(initialAutoRelease),
+ alwaysReply(initialAlwaysReply), initialized(false), pendingAcquire(false),
+ pendingUpdate(false), pendingAudioProperties(false)
{
identifier = resourceSetId++;
memset(resourceSet, 0, sizeof(QPointer<Resource *>)*NumberOfTypes);