From bec3658e19a8028fbc50c6cca9615e5ca052adb2 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Thu, 26 Jan 2017 15:12:42 +0100 Subject: Fix build with -no-feature-animation Change-Id: Ieecb9cdbf4373e295148ae5b3d59c43aaf46175e Reviewed-by: Lars Knoll --- src/widgets/styles/qwindowsstyle.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/widgets/styles/qwindowsstyle.cpp') diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp index f9370a2cc7..0ce8dde74c 100644 --- a/src/widgets/styles/qwindowsstyle.cpp +++ b/src/widgets/styles/qwindowsstyle.cpp @@ -1729,10 +1729,12 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai int step = 0; int chunkCount = w / unit_width + 1; +#if QT_CONFIG(animation) if (QProgressStyleAnimation *animation = qobject_cast(d->animation(opt->styleObject))) step = (animation->animationStep() / 3) % chunkCount; else d->startAnimation(new QProgressStyleAnimation(d->animationFps, opt->styleObject)); +#endif int chunksInRow = 5; int myY = pbBits.rect.y(); int myHeight = pbBits.rect.height(); @@ -1766,7 +1768,9 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai p->restore(); //restore state } else { +#if QT_CONFIG(animation) d->stopAnimation(opt->styleObject); +#endif QCommonStyle::drawControl(ce, opt, p, widget); } } -- cgit v1.2.3