aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickanimator.cpp
diff options
context:
space:
mode:
authorAndreas Buhr <andreas@andreasbuhr.de>2021-01-14 16:03:32 +0100
committerAndreas Buhr <andreas@andreasbuhr.de>2021-03-31 15:22:22 +0200
commit7f24570af4dc7e2386ae4831460b85f2f32a2d57 (patch)
treebb8447a58250543b745ba26fa96a9c07b4bb27f2 /src/quick/util/qquickanimator.cpp
parent9c3acc74ed4798f037fd58a9dad996040fc3f5d8 (diff)
Consistent naming for (to|from)Is(Defined|Sourced) in animations
To store whether "from" and "to" values are defined and/or sourced, QQuickPathAnimationUpdater used fromDefined format, QQuickAbstractAnimationPrivate used fromIsDefined format, QQuickAnimationPropertyUpdater used fromIsDefined format, QQuickAnimatorPrivate used isFromDefined format, QQuickBulkValueAnimator used fromDefined format, QQuickAnimationPropertyUpdater used fromDefined format. This patch changes all these to use the variable names "fromIsDefined", "fromIsSourced", and "toIsDefined". This makes the code more readable. Change-Id: Ia6c228208eb651247b0ba70f83afadb5b1027049 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 702b00bc8bfdc51592a01c9b7ed5939d85a7e192)
Diffstat (limited to 'src/quick/util/qquickanimator.cpp')
-rw-r--r--src/quick/util/qquickanimator.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/quick/util/qquickanimator.cpp b/src/quick/util/qquickanimator.cpp
index f6cc4f3c54..cea23f374e 100644
--- a/src/quick/util/qquickanimator.cpp
+++ b/src/quick/util/qquickanimator.cpp
@@ -176,7 +176,7 @@ void QQuickAnimator::setTo(qreal to)
Q_D(QQuickAnimator);
if (to == d->to)
return;
- d->isToDefined = true;
+ d->toIsDefined = true;
d->to = to;
Q_EMIT toChanged(d->to);
}
@@ -202,7 +202,7 @@ qreal QQuickAnimator::to() const
void QQuickAnimator::setFrom(qreal from)
{
Q_D(QQuickAnimator);
- d->isFromDefined = true;
+ d->fromIsDefined = true;
if (from == d->from)
return;
d->from = from;
@@ -231,14 +231,14 @@ void QQuickAnimatorPrivate::apply(QQuickAnimatorJob *job,
job->setTarget(qobject_cast<QQuickItem *>(action.property.object()));
- if (isFromDefined)
+ if (fromIsDefined)
job->setFrom(from);
else if (action.fromValue.isValid())
job->setFrom(action.fromValue.toReal());
else
job->setFrom(action.property.read().toReal());
- if (isToDefined)
+ if (toIsDefined)
job->setTo(to);
else if (action.toValue.isValid())
job->setTo(action.toValue.toReal());
@@ -255,7 +255,7 @@ void QQuickAnimatorPrivate::apply(QQuickAnimatorJob *job,
if (modified.isEmpty()) {
job->setTarget(target);
- if (isFromDefined)
+ if (fromIsDefined)
job->setFrom(from);
job->setTo(to);
}
@@ -267,7 +267,7 @@ void QQuickAnimatorPrivate::apply(QQuickAnimatorJob *job,
job->setTarget(qobject_cast<QQuickItem *>(defaultTarget));
}
- if (modified.isEmpty() && !isFromDefined && job->target())
+ if (modified.isEmpty() && !fromIsDefined && job->target())
job->setFrom(job->target()->property(propertyName.toLatin1()).toReal());
job->setDuration(duration);