From 26bd1cb9d24b186c5361e59d4c448bfa93ef740f Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Wed, 6 Jun 2018 14:12:23 +1000 Subject: wasm: cleanup code, remove obsolete code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I54f406d803fa6d458ae53a78abb8c99dc76aab92 Reviewed-by: Morten Johan Sørvig --- src/qml/qml/qqmltypeloader.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/qml/qml/qqmltypeloader.cpp') diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index f4c612b187..1936030666 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -1044,6 +1044,8 @@ void QQmlTypeLoader::doLoad(const Loader &loader, QQmlDataBlob *blob, Mode mode) qWarning("QQmlTypeLoader::doLoad(%s): %s thread", qPrintable(blob->urlString()), m_thread->isThisThread()?"Compile":"Engine"); #endif + blob->startLoading(); + if (m_thread->isThisThread()) { unlock(); loader.loadThread(this, blob); @@ -1692,6 +1694,7 @@ QQmlTypeData *QQmlTypeLoader::getType(const QUrl &unNormalizedUrl, Mode mode) } else if ((mode == PreferSynchronous || mode == Synchronous) && QQmlFile::isSynchronous(url)) { // this was started Asynchronous, but we need to force Synchronous // completion now (if at all possible with this type of URL). + if (!m_thread->isThisThread()) { // this only works when called directly from the UI thread, but not // when recursively called on the QML thread via resolveTypes() -- cgit v1.2.3