diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-06-13 12:09:15 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-20 17:22:01 +0200 |
commit | e884e15615dc97c95704835756680b9c38be29ea (patch) | |
tree | c3c6e39879f52a4a5b0349844519c18e8343db3c /src/quick/qtquick2.cpp | |
parent | 201173242ed511a86fe636e110589a9c2d91f9db (diff) |
QtQuick: Fix warnings about deprecated QWeakPointer usage.
Use QPointer for QObject-derived classes.
Change-Id: Ia7be2354b8b3bbce04316185f49a80e76057a18b
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/quick/qtquick2.cpp')
-rw-r--r-- | src/quick/qtquick2.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/quick/qtquick2.cpp b/src/quick/qtquick2.cpp index 8a0c05618a..ed1fa0da6d 100644 --- a/src/quick/qtquick2.cpp +++ b/src/quick/qtquick2.cpp @@ -53,7 +53,7 @@ #include <QtQuick/private/qquickpropertychanges_p.h> #include <QtQuick/private/qquickstate_p.h> #include <qqmlproperty.h> -#include <QtCore/QWeakPointer> +#include <QtCore/QPointer> QT_BEGIN_NAMESPACE @@ -78,7 +78,7 @@ public: private: void buildStatesList(QObject *obj); - QList<QWeakPointer<QQuickState> > m_allStates; + QList<QPointer<QQuickState> > m_allStates; }; QQmlQtQuick2DebugStatesDelegate::QQmlQtQuick2DebugStatesDelegate() @@ -119,9 +119,10 @@ void QQmlQtQuick2DebugStatesDelegate::updateBinding(QQmlContext *context, const QString &fileName, int line, int column, bool *inBaseState) { + typedef QPointer<QQuickState> QuickStatePointer; QObject *object = property.object(); QString propertyName = property.name(); - foreach (QWeakPointer<QQuickState> statePointer, m_allStates) { + foreach (const QuickStatePointer& statePointer, m_allStates) { if (QQuickState *state = statePointer.data()) { // here we assume that the revert list on itself defines the base state if (state->isStateActive() && state->containsPropertyInRevertList(object, propertyName)) { |