aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickbehavior.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/util/qquickbehavior.cpp')
-rw-r--r--src/quick/util/qquickbehavior.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/quick/util/qquickbehavior.cpp b/src/quick/util/qquickbehavior.cpp
index 2522db37eb..dd8ddad7ca 100644
--- a/src/quick/util/qquickbehavior.cpp
+++ b/src/quick/util/qquickbehavior.cpp
@@ -14,6 +14,7 @@
#include <private/qquickanimatorjob_p.h>
#include <private/qobject_p.h>
+#include <QtCore/qpointer.h>
QT_BEGIN_NAMESPACE
@@ -151,7 +152,7 @@ public:
UntypedProxyProperty::UntypedProxyProperty(QUntypedBindable bindable, QQuickBehaviorPrivate *behavior) :
m_sourcePropertyData(QUntypedBindablePrivate::getPropertyData(bindable)),
m_sourceInterface(QUntypedBindablePrivate::getInterface(bindable)),
- m_storage(QVariant(QUntypedBindablePrivate::getInterface(bindable)->metaType()))
+ m_storage(QVariant(bindable.metaType()))
{
behavior->setSource(m_bindingData);
}
@@ -182,7 +183,7 @@ UntypedProxyProperty::UntypedProxyProperty(QUntypedBindable bindable, QQuickBeha
state change. For general advice on using Behaviors to animate state changes, see
\l{Using Qt Quick Behaviors with States}.
- \sa {Animation and Transitions in Qt Quick}, {Qt Quick Examples - Animation#Behaviors}{Behavior example}, {Qt QML}
+ \sa {Animation and Transitions in Qt Quick}, {Qt Quick Examples - Animation#Behaviors}{Behavior example}, {Qt Qml}
*/
@@ -406,7 +407,7 @@ void QQuickBehavior::write(const QVariant &value)
QList<QQmlProperty> after;
auto *newInstance = d->animation->transition(actions, after, QQuickAbstractAnimation::Forward);
- Q_ASSERT(newInstance != d->animationInstance);
+ Q_ASSERT(!newInstance || newInstance != d->animationInstance);
delete d->animationInstance;
d->animationInstance = newInstance;