diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-09-15 05:20:08 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-09-15 05:20:08 (GMT) |
commit | 783d4911d61b986ca3c412662d1702dd18014be2 (patch) | |
tree | 2f0cac21e6e2b398ddfabed6de2c94e92eb1f017 /src/declarative/qml | |
parent | 05ab8ad1577fc038aa2b3bd96cedda54e6a64979 (diff) | |
parent | b8ff1ae9d53d7cac64c90d3cf29a5f4ed7379330 (diff) | |
download | Qt-783d4911d61b986ca3c412662d1702dd18014be2.zip Qt-783d4911d61b986ca3c412662d1702dd18014be2.tar.gz Qt-783d4911d61b986ca3c412662d1702dd18014be2.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml:
Compile with QT_NO_GESTURES.
Give file and line error information for errors in dummydata.
Restore any absolute geometry changed by AnchorChanges when returning
Export QDeclarativeScriptAction
Completing the interface for children/data/resources
Unit tests for Bauhaus enablers
This patch allows modifications on PropertyChanges on the fly
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qdeclarativebinding.cpp | 13 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativebinding_p.h | 6 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativecomponent_p.h | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeengine.cpp | 2 |
4 files changed, 21 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp index e096305..cb6ad8c 100644 --- a/src/declarative/qml/qdeclarativebinding.cpp +++ b/src/declarative/qml/qdeclarativebinding.cpp @@ -48,6 +48,7 @@ #include "private/qdeclarativecontext_p.h" #include "private/qdeclarativedata_p.h" #include "private/qdeclarativestringconverters_p.h" +#include "private/qdeclarativestate_p_p.h" #include <QVariant> #include <QtCore/qdebug.h> @@ -373,6 +374,18 @@ void QDeclarativeAbstractBinding::removeFromObject() } } +static void bindingDummyDeleter(QDeclarativeAbstractBinding *) +{ +} + +QDeclarativeAbstractBinding::Pointer QDeclarativeAbstractBinding::weakPointer() +{ + if (m_selfPointer.isNull()) + m_selfPointer = QSharedPointer<QDeclarativeAbstractBinding>(this, bindingDummyDeleter); + + return m_selfPointer.toWeakRef(); +} + void QDeclarativeAbstractBinding::clear() { if (m_mePtr) { diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h index 598f09f..f38ed23 100644 --- a/src/declarative/qml/qdeclarativebinding_p.h +++ b/src/declarative/qml/qdeclarativebinding_p.h @@ -67,6 +67,8 @@ QT_BEGIN_NAMESPACE class Q_DECLARATIVE_EXPORT QDeclarativeAbstractBinding { public: + typedef QWeakPointer<QDeclarativeAbstractBinding> Pointer; + QDeclarativeAbstractBinding(); virtual void destroy(); @@ -86,6 +88,8 @@ public: void addToObject(QObject *); void removeFromObject(); + Pointer weakPointer(); + protected: virtual ~QDeclarativeAbstractBinding(); void clear(); @@ -96,11 +100,13 @@ private: friend class QDeclarativeValueTypeProxyBinding; friend class QDeclarativePropertyPrivate; friend class QDeclarativeVME; + friend class QtSharedPointer::ExternalRefCount<QDeclarativeAbstractBinding>; QObject *m_object; QDeclarativeAbstractBinding **m_mePtr; QDeclarativeAbstractBinding **m_prevBinding; QDeclarativeAbstractBinding *m_nextBinding; + QSharedPointer<QDeclarativeAbstractBinding> m_selfPointer; }; class QDeclarativeValueTypeProxyBinding : public QDeclarativeAbstractBinding diff --git a/src/declarative/qml/qdeclarativecomponent_p.h b/src/declarative/qml/qdeclarativecomponent_p.h index 1b1454b..a551cc8 100644 --- a/src/declarative/qml/qdeclarativecomponent_p.h +++ b/src/declarative/qml/qdeclarativecomponent_p.h @@ -74,7 +74,7 @@ class QDeclarativeEngine; class QDeclarativeCompiledData; class QDeclarativeComponentAttached; -class QDeclarativeComponentPrivate : public QObjectPrivate, public QDeclarativeTypeData::TypeDataCallback +class Q_AUTOTEST_EXPORT QDeclarativeComponentPrivate : public QObjectPrivate, public QDeclarativeTypeData::TypeDataCallback { Q_DECLARE_PUBLIC(QDeclarativeComponent) diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 9de5a77..80db230 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -906,7 +906,7 @@ QDeclarativeEngine::ObjectOwnership QDeclarativeEngine::objectOwnership(QObject return ddata->indestructible?CppOwnership:JavaScriptOwnership; } -void qmlExecuteDeferred(QObject *object) +Q_AUTOTEST_EXPORT void qmlExecuteDeferred(QObject *object) { QDeclarativeData *data = QDeclarativeData::get(object); |