diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2012-05-30 13:53:24 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-05 18:42:26 +0200 |
commit | 7d28f7772cd8f5aad63359ed0b9c57c12923dc85 (patch) | |
tree | 71e1cc4d972f7417b0d510451aacfce2e98eafa7 /src/corelib | |
parent | fa7c9bbe1cc71a16835c373095515513ab5949db (diff) |
Use QPointer instead of QWeakPointer.
The use of QWeakPointer for tracking QObject pointers is to be
deprecated.
Change-Id: If460ca7f515db77af24030152f4bd56e1a5fae7c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/animation/qabstractanimation.cpp | 2 | ||||
-rw-r--r-- | src/corelib/animation/qpropertyanimation_p.h | 2 | ||||
-rw-r--r-- | src/corelib/plugin/qlibrary_p.h | 2 | ||||
-rw-r--r-- | src/corelib/statemachine/qabstracttransition_p.h | 2 | ||||
-rw-r--r-- | src/corelib/statemachine/qstate.cpp | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 969a54775b..e56d1e26d3 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -925,7 +925,7 @@ void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState) } state = newState; - QWeakPointer<QAbstractAnimation> guard(q); + QPointer<QAbstractAnimation> guard(q); //(un)registration of the animation must always happen before calls to //virtual function (updateState) to ensure a correct state of the timer diff --git a/src/corelib/animation/qpropertyanimation_p.h b/src/corelib/animation/qpropertyanimation_p.h index c413c683ff..d6c0f9057c 100644 --- a/src/corelib/animation/qpropertyanimation_p.h +++ b/src/corelib/animation/qpropertyanimation_p.h @@ -70,7 +70,7 @@ public: { } - QWeakPointer<QObject> target; + QPointer<QObject> target; //we use targetValue to be able to unregister the target from the global hash QObject *targetValue; diff --git a/src/corelib/plugin/qlibrary_p.h b/src/corelib/plugin/qlibrary_p.h index 604a5fbdde..ca7b5d9bb4 100644 --- a/src/corelib/plugin/qlibrary_p.h +++ b/src/corelib/plugin/qlibrary_p.h @@ -96,7 +96,7 @@ public: static QVector<QStaticPlugin> staticPlugins(); - QWeakPointer<QObject> inst; + QPointer<QObject> inst; QtPluginInstanceFunction instance; QJsonObject metaData; bool compatPlugin; diff --git a/src/corelib/statemachine/qabstracttransition_p.h b/src/corelib/statemachine/qabstracttransition_p.h index 64a0af7cfb..442398825a 100644 --- a/src/corelib/statemachine/qabstracttransition_p.h +++ b/src/corelib/statemachine/qabstracttransition_p.h @@ -80,7 +80,7 @@ public: QStateMachine *machine() const; void emitTriggered(); - QList<QWeakPointer<QAbstractState> > targetStates; + QList<QPointer<QAbstractState> > targetStates; #ifndef QT_NO_ANIMATION QList<QAbstractAnimation*> animations; diff --git a/src/corelib/statemachine/qstate.cpp b/src/corelib/statemachine/qstate.cpp index 0230acbab6..14432edd7c 100644 --- a/src/corelib/statemachine/qstate.cpp +++ b/src/corelib/statemachine/qstate.cpp @@ -299,7 +299,7 @@ void QState::addTransition(QAbstractTransition *transition) } transition->setParent(this); - const QList<QWeakPointer<QAbstractState> > &targets = QAbstractTransitionPrivate::get(transition)->targetStates; + const QList<QPointer<QAbstractState> > &targets = QAbstractTransitionPrivate::get(transition)->targetStates; for (int i = 0; i < targets.size(); ++i) { QAbstractState *t = targets.at(i).data(); if (!t) { |