summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-01-16 13:46:28 +0100
committerKevin Funk <kevin.funk@kdab.com>2018-11-08 08:26:32 +0000
commitec554de6153aaa09ec23ba4894eb2d840fef7b23 (patch)
tree521fdccec063101de6e066e367cbd58062e6b20c
parent7547f57e26e01f0b20908d68afd93029fc7f8f1a (diff)
Fix cast-function-type gcc 8 warning
Gcc 8 now warns against casting functions taking references to functions taking pointers: warning: cast between incompatible function types from ‘QVariant (*)(const int&, const int&, double)’ to ‘QVariant (*)(const void*, const void*, double)’ [-Werror=cast-function-type] Suppressed by casting over void(*)(). Change-Id: I48bee53253b8e87110e8a49efa761fc2add89c5a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 0ffc39806e4669eaebe2d20d197b3a6f356be862) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/corelib/animation/qvariantanimation.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/animation/qvariantanimation.h b/src/corelib/animation/qvariantanimation.h
index f21832b256..0d007487b9 100644
--- a/src/corelib/animation/qvariantanimation.h
+++ b/src/corelib/animation/qvariantanimation.h
@@ -113,7 +113,7 @@ private:
template <typename T>
void qRegisterAnimationInterpolator(QVariant (*func)(const T &from, const T &to, qreal progress)) {
- QVariantAnimation::registerInterpolator(reinterpret_cast<QVariantAnimation::Interpolator>(func), qMetaTypeId<T>());
+ QVariantAnimation::registerInterpolator(reinterpret_cast<QVariantAnimation::Interpolator>(reinterpret_cast<void(*)()>(func)), qMetaTypeId<T>());
}
#endif //QT_NO_ANIMATION