aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@qt.io>2016-11-11 12:09:43 +0100
committerAndy Nichols <andy.nichols@qt.io>2016-11-11 14:10:42 +0000
commit6cb21a9296b34d66d7b50d6b38c09294634202e0 (patch)
tree1990f54fcc9aa99990163757c0538718846c7b91 /src/quick/util
parent2b8a9fc66309038dac21624293cf3b91d87165c3 (diff)
Fix building with -no-opengl
Asserts were added to qquickanimatorjob.cpp that check for a current opengl context and which thread they are current on. This is not relevant for non-opengl builds. Change-Id: I9714c99cb6a0374fbb983a037c4fc24a99c8a645 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/quick/util')
-rw-r--r--src/quick/util/qquickanimatorjob.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/quick/util/qquickanimatorjob.cpp b/src/quick/util/qquickanimatorjob.cpp
index fa13e8519e..5dd16407b8 100644
--- a/src/quick/util/qquickanimatorjob.cpp
+++ b/src/quick/util/qquickanimatorjob.cpp
@@ -434,7 +434,9 @@ void QQuickXAnimatorJob::writeBack()
void QQuickXAnimatorJob::updateCurrentTime(int time)
{
+#if QT_CONFIG(opengl)
Q_ASSERT(!m_controller || !m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread());
+#endif
if (!m_helper)
return;
@@ -451,8 +453,9 @@ void QQuickYAnimatorJob::writeBack()
void QQuickYAnimatorJob::updateCurrentTime(int time)
{
+#if QT_CONFIG(opengl)
Q_ASSERT(!m_controller || !m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread());
-
+#endif
if (!m_helper)
return;
@@ -469,8 +472,9 @@ void QQuickScaleAnimatorJob::writeBack()
void QQuickScaleAnimatorJob::updateCurrentTime(int time)
{
+#if QT_CONFIG(opengl)
Q_ASSERT(!m_controller || !m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread());
-
+#endif
if (!m_helper)
return;
@@ -491,8 +495,9 @@ extern QVariant _q_interpolateCounterclockwiseRotation(qreal &f, qreal &t, qreal
void QQuickRotationAnimatorJob::updateCurrentTime(int time)
{
+#if QT_CONFIG(opengl)
Q_ASSERT(!m_controller || !m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread());
-
+#endif
if (!m_helper)
return;
@@ -597,7 +602,9 @@ void QQuickOpacityAnimatorJob::writeBack()
void QQuickOpacityAnimatorJob::updateCurrentTime(int time)
{
+#if QT_CONFIG(opengl)
Q_ASSERT(!m_controller || !m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread());
+#endif
if (!m_opacityNode)
return;