Showing the changes to libraries/script-engine/src/AnimationCache.cpp (1 of 8 files). Show all
Unified · Split
| @@ -17,8 +17,14 @@ · 16 unmodified lines | |||
| 17 | 17 | ||
| 18 | static int animationPointerMetaTypeId = qRegisterMetaType<AnimationPointer>(); | 18 | static int animationPointerMetaTypeId = qRegisterMetaType<AnimationPointer>(); |
| 19 | 19 | ||
| 20 | AnimationCache::AnimationCache(QObject* parent) : | ||
| 21 | ResourceCache(parent) { | ||
| 22 | } | ||
| 23 | |||
| 20 | AnimationPointer AnimationCache::getAnimation(const QUrl& url) { | 24 | AnimationPointer AnimationCache::getAnimation(const QUrl& url) { |
| 21 | if (QThread::currentThread() != thread()) { | 25 | if (QThread::currentThread() != thread()) { |
| 26 | qDebug() << "blocking call!"; | ||
| 27 | |||
| 22 | AnimationPointer result; | 28 | AnimationPointer result; |
| 23 | QMetaObject::invokeMethod(this, "getAnimation", Qt::BlockingQueuedConnection, | 29 | QMetaObject::invokeMethod(this, "getAnimation", Qt::BlockingQueuedConnection, |
| 24 | Q_RETURN_ARG(AnimationPointer, result), Q_ARG(const QUrl&, url)); | 30 | Q_RETURN_ARG(AnimationPointer, result), Q_ARG(const QUrl&, url)); |