summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation/qvariantanimation.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-07-27 17:00:22 +0200
committerLars Knoll <lars.knoll@qt.io>2020-08-24 00:19:18 +0200
commite7e7540aecc5a4a44f1d1a25e58ccbcf662cbe24 (patch)
treefa54df19419fb304b14000d0c6fa69b6ad883def /src/corelib/animation/qvariantanimation.cpp
parent92a31781bb17d31ab09291ca00efb4346cb2f371 (diff)
Deprecate int based convert/canConvert
Better to provide the correct meta type to convert to. Change-Id: I8e0d46e4ba482186201c157e302c03874bd38e7b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/animation/qvariantanimation.cpp')
-rw-r--r--src/corelib/animation/qvariantanimation.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp
index e50cdd05ec..efe1675fe5 100644
--- a/src/corelib/animation/qvariantanimation.cpp
+++ b/src/corelib/animation/qvariantanimation.cpp
@@ -190,14 +190,15 @@ QVariantAnimationPrivate::QVariantAnimationPrivate() : duration(250), interpolat
void QVariantAnimationPrivate::convertValues(int t)
{
+ auto type = QMetaType(t);
//this ensures that all the keyValues are of type t
for (int i = 0; i < keyValues.count(); ++i) {
QVariantAnimation::KeyValue &pair = keyValues[i];
- pair.second.convert(t);
+ pair.second.convert(type);
}
//we also need update to the current interval if needed
- currentInterval.start.second.convert(t);
- currentInterval.end.second.convert(t);
+ currentInterval.start.second.convert(type);
+ currentInterval.end.second.convert(type);
//... and the interpolator
updateInterpolator();