summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qdeclarativeproperty.h5
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript.cpp6
2 files changed, 10 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeproperty.h b/src/declarative/qml/qdeclarativeproperty.h
index 73bccf3..8f6ea48 100644
--- a/src/declarative/qml/qdeclarativeproperty.h
+++ b/src/declarative/qml/qdeclarativeproperty.h
@@ -131,6 +131,11 @@ private:
};
typedef QList<QDeclarativeProperty> QDeclarativeProperties;
+inline uint qHash (const QDeclarativeProperty &key)
+{
+ return qHash(key.object()) + qHash(key.name());
+}
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp
index a7ed358..628681f 100644
--- a/src/declarative/qml/qdeclarativeworkerscript.cpp
+++ b/src/declarative/qml/qdeclarativeworkerscript.cpp
@@ -437,8 +437,12 @@ QDeclarativeWorkerScriptEngine::QDeclarativeWorkerScriptEngine(QDeclarativeEngin
QDeclarativeWorkerScriptEngine::~QDeclarativeWorkerScriptEngine()
{
+ d->m_lock.lock();
qDeleteAll(d->workers);
- delete d; d = 0;
+ d->workers.clear();
+ d->m_lock.unlock();
+
+ d->deleteLater();
}
QDeclarativeWorkerScriptEnginePrivate::WorkerScript::WorkerScript()