From 4f784dc5fd2178b98a19c0b60c5bbf5ea92782fa Mon Sep 17 00:00:00 2001 From: Wolf Bergenheim Date: Wed, 25 Aug 2010 09:07:30 +0300 Subject: Added support for giving AlwaysReply and AutoRelease in the ctor --- libresourceqt/include/qt4/policy/resource-set.h | 3 ++- libresourceqt/src/resource-set.cpp | 9 +++++---- 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)*NumberOfTypes); -- cgit v1.2.3