History

More work on animation loading.

Andrzej Kapolka committed 12 years ago

Commit 0f69bbe1 parent 8cbad1b8 files · +61 −20Browse files

Showing the changes to libraries/script-engine/src/AnimationCache.cpp (1 of 8 files). Show all

Unified · Split

libraries/script-engine/src/AnimationCache.cpp+6−0
@@ -17,8 +17,14 @@ · 16 unmodified lines
17 17
18static int animationPointerMetaTypeId = qRegisterMetaType<AnimationPointer>();18static int animationPointerMetaTypeId = qRegisterMetaType<AnimationPointer>();
19 19
20AnimationCache::AnimationCache(QObject* parent) :
21 ResourceCache(parent) {
22}
23
20AnimationPointer AnimationCache::getAnimation(const QUrl& url) {24AnimationPointer 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));