diff options
author | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-01-21 12:34:52 (GMT) |
---|---|---|
committer | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-01-21 12:36:42 (GMT) |
commit | 6b92cb8ec199159d629c013fbd4b4b7ab8ad60db (patch) | |
tree | c22cba83d08cc61791a7a1914665694264f4e65e /src/corelib/animation/qvariantanimation.cpp | |
parent | 01a54a8d903abddd8b1fbddb1410e56878f41b7c (diff) | |
download | Qt-6b92cb8ec199159d629c013fbd4b4b7ab8ad60db.zip Qt-6b92cb8ec199159d629c013fbd4b4b7ab8ad60db.tar.gz Qt-6b92cb8ec199159d629c013fbd4b4b7ab8ad60db.tar.bz2 |
Make the animation api compile when QT_NO_THREAD is defined
Task-number: QTBUG-6890
Reviewed-by: Thierry
Diffstat (limited to 'src/corelib/animation/qvariantanimation.cpp')
-rw-r--r-- | src/corelib/animation/qvariantanimation.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp index 115edbe..173802d 100644 --- a/src/corelib/animation/qvariantanimation.cpp +++ b/src/corelib/animation/qvariantanimation.cpp @@ -431,7 +431,9 @@ void QVariantAnimation::registerInterpolator(QVariantAnimation::Interpolator fun { // will override any existing interpolators QInterpolatorVector *interpolators = registeredInterpolators(); +#ifndef QT_NO_THREAD QMutexLocker locker(QMutexPool::globalInstanceGet(interpolators)); +#endif if (int(interpolationType) >= interpolators->count()) interpolators->resize(int(interpolationType) + 1); interpolators->replace(interpolationType, func); @@ -446,7 +448,9 @@ template<typename T> static inline QVariantAnimation::Interpolator castToInterpo QVariantAnimation::Interpolator QVariantAnimationPrivate::getInterpolator(int interpolationType) { QInterpolatorVector *interpolators = registeredInterpolators(); +#ifndef QT_NO_THREAD QMutexLocker locker(QMutexPool::globalInstanceGet(interpolators)); +#endif QVariantAnimation::Interpolator ret = 0; if (interpolationType < interpolators->count()) { ret = interpolators->at(interpolationType); |