#include "qpropertyanimation.h"
#include "qanimationgroup.h"
#include "qpropertyanimation_p.h"
-
-#include "qmutexpool_p.h"
+#include "qmutex.h"
#ifndef QT_NO_ANIMATION
QT_BEGIN_NAMESPACE
+Q_GLOBAL_STATIC(QMutex, qPropertyAnimationMutex)
+
void QPropertyAnimationPrivate::updateMetaProperty()
{
if (!target || propertyName.isEmpty()) {
QPropertyAnimation *animToStop = 0;
{
- QMutexLocker locker(QMutexPool::globalInstanceGet(&staticMetaObject));
+ QMutexLocker locker(qPropertyAnimationMutex());
typedef QPair<QObject *, QByteArray> QPropertyAnimationPair;
typedef QHash<QPropertyAnimationPair, QPropertyAnimation*> QPropertyAnimationHash;
static QPropertyAnimationHash hash;
#include <QtCore/qrect.h>
#include <QtCore/qline.h>
#include <QtCore/qmutex.h>
-#include "qmutexpool_p.h"
#ifndef QT_NO_ANIMATION
\sa currentValue
*/
+Q_GLOBAL_STATIC(QMutex, qVariantAnimationMutex)
+
static bool animationValueLessThan(const QVariantAnimation::KeyValue &p1, const QVariantAnimation::KeyValue &p2)
{
return p1.first < p2.first;
// in such an order that we get here with interpolators == NULL,
// to continue causes the app to crash on exit with a SEGV
if (interpolators) {
- QMutexLocker locker(QMutexPool::globalInstanceGet(interpolators));
+ QMutexLocker locker(qVariantAnimationMutex());
if (interpolationType >= interpolators->count())
interpolators->resize(interpolationType + 1);
interpolators->replace(interpolationType, func);
QVariantAnimation::Interpolator QVariantAnimationPrivate::getInterpolator(int interpolationType)
{
QInterpolatorVector *interpolators = registeredInterpolators();
- QMutexLocker locker(QMutexPool::globalInstanceGet(interpolators));
+ QMutexLocker locker(qVariantAnimationMutex());
if (interpolationType < interpolators->count()) {
QVariantAnimation::Interpolator ret = interpolators->at(interpolationType);
if (ret) return ret;