summaryrefslogtreecommitdiffstats
path: root/Tools/QtTestBrowser/webview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/QtTestBrowser/webview.cpp')
-rw-r--r--Tools/QtTestBrowser/webview.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tools/QtTestBrowser/webview.cpp b/Tools/QtTestBrowser/webview.cpp
index 2a541fb..8e33620 100644
--- a/Tools/QtTestBrowser/webview.cpp
+++ b/Tools/QtTestBrowser/webview.cpp
@@ -169,6 +169,7 @@ void WebViewGraphicsBased::updateFrameRate()
void WebViewGraphicsBased::animatedFlip()
{
+#ifndef QT_NO_ANIMATION
QSizeF center = graphicsWebView()->boundingRect().size() / 2;
QPointF centerPoint = QPointF(center.width(), center.height());
graphicsWebView()->setTransformOriginPoint(centerPoint);
@@ -182,10 +183,12 @@ void WebViewGraphicsBased::animatedFlip()
animation->setEndValue(rotation + 180 - (rotation % 180));
animation->start(QAbstractAnimation::DeleteWhenStopped);
+#endif
}
void WebViewGraphicsBased::animatedYFlip()
{
+#ifndef QT_NO_ANIMATION
if (!m_machine) {
m_machine = new QStateMachine(this);
@@ -217,6 +220,7 @@ void WebViewGraphicsBased::animatedYFlip()
}
m_machine->start();
+#endif
}
void WebViewGraphicsBased::paintEvent(QPaintEvent* event)