summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativecompiledbindings.cpp
diff options
context:
space:
mode:
authoraavit <qt-info@nokia.com>2011-09-17 19:44:51 (GMT)
committeraavit <qt-info@nokia.com>2011-09-17 20:27:51 (GMT)
commitf7a6de98e4e234833966fbe81b8ab54eba9f8429 (patch)
tree012247296bab712fcd19b92cf1a5990fd0ed2af1 /src/declarative/qml/qdeclarativecompiledbindings.cpp
parent8b2ee10cb1113c27d37b52dba6f7aa28d2de55b9 (diff)
parentcee22b68ed811f5b26a891d6a644613ad79aa981 (diff)
downloadQt-f7a6de98e4e234833966fbe81b8ab54eba9f8429.zip
Qt-f7a6de98e4e234833966fbe81b8ab54eba9f8429.tar.gz
Qt-f7a6de98e4e234833966fbe81b8ab54eba9f8429.tar.bz2
Merge remote branch 'qt-mainline/4.8'
Diffstat (limited to 'src/declarative/qml/qdeclarativecompiledbindings.cpp')
-rw-r--r--src/declarative/qml/qdeclarativecompiledbindings.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp
index 51ffc10..72a3e53 100644
--- a/src/declarative/qml/qdeclarativecompiledbindings.cpp
+++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp
@@ -235,6 +235,7 @@ public:
void run(Binding *, QDeclarativePropertyPrivate::WriteFlags flags);
const char *programData;
+ QDeclarativeRefCount *dataRef;
Binding *m_bindings;
quint32 *m_signalTable;
@@ -267,7 +268,7 @@ public:
};
QDeclarativeCompiledBindingsPrivate::QDeclarativeCompiledBindingsPrivate()
-: subscriptions(0), identifiers(0)
+: subscriptions(0), identifiers(0), programData(0), dataRef(0), m_bindings(0), m_signalTable(0)
{
}
@@ -275,11 +276,16 @@ QDeclarativeCompiledBindingsPrivate::~QDeclarativeCompiledBindingsPrivate()
{
delete [] subscriptions; subscriptions = 0;
delete [] identifiers; identifiers = 0;
+ if (dataRef) {
+ dataRef->release();
+ dataRef = 0;
+ }
}
int QDeclarativeCompiledBindingsPrivate::methodCount = -1;
-QDeclarativeCompiledBindings::QDeclarativeCompiledBindings(const char *program, QDeclarativeContextData *context)
+QDeclarativeCompiledBindings::QDeclarativeCompiledBindings(const char *program, QDeclarativeContextData *context,
+ QDeclarativeRefCount *dataRef)
: QObject(*(new QDeclarativeCompiledBindingsPrivate))
{
Q_D(QDeclarativeCompiledBindings);
@@ -288,6 +294,8 @@ QDeclarativeCompiledBindings::QDeclarativeCompiledBindings(const char *program,
d->methodCount = QDeclarativeCompiledBindings::staticMetaObject.methodCount();
d->programData = program;
+ d->dataRef = dataRef;
+ if (d->dataRef) d->dataRef->addref();
d->init();