aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/qml/ftw/qqmlthread.cpp6
-rw-r--r--src/qml/qml/qqmltypeloader.cpp8
-rw-r--r--src/quick/scenegraph/qsgrenderloop.cpp10
3 files changed, 13 insertions, 11 deletions
diff --git a/src/qml/qml/ftw/qqmlthread.cpp b/src/qml/qml/ftw/qqmlthread.cpp
index 322d3281c7..a36a599f24 100644
--- a/src/qml/qml/ftw/qqmlthread.cpp
+++ b/src/qml/qml/ftw/qqmlthread.cpp
@@ -323,14 +323,14 @@ void QQmlThread::internalCallMethodInThread(Message *message)
bool wasEmpty = d->threadList.isEmpty();
d->threadList.append(message);
-#ifdef Q_OS_HTML5
+#ifdef QT_NO_THREAD
d->mainSync = message;
#endif
if (wasEmpty && d->m_threadProcessing == false)
d->triggerThreadEvent();
-#ifndef Q_OS_HTML5
+#ifndef QT_NO_THREAD
d->m_mainThreadWaiting = true;
do {
if (d->mainSync) {
@@ -407,7 +407,7 @@ void QQmlThread::waitForNextMessage()
d->lock();
Q_ASSERT(d->m_mainThreadWaiting == false);
-#ifdef Q_OS_HTML5
+#ifdef QT_NO_THREAD
d->triggerThreadEvent();
#endif
d->m_mainThreadWaiting = true;
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
index 5212b49670..81bda2c3bb 100644
--- a/src/qml/qml/qqmltypeloader.cpp
+++ b/src/qml/qml/qqmltypeloader.cpp
@@ -1015,7 +1015,7 @@ struct StaticLoader {
void loadThread(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
{
-#ifdef Q_OS_HTML5
+#ifdef QT_NO_THREAD
loader->m_thread->loadWithStaticDataAsync(blob, data);
return;
#else
@@ -1057,7 +1057,7 @@ 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
-#ifdef Q_OS_HTML5
+#ifdef QT_NO_THREAD
mode = Asynchronous;
#endif
if (m_thread->isThisThread()) {
@@ -1692,7 +1692,7 @@ QQmlTypeData *QQmlTypeLoader::getType(const QUrl &url, 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).
-#ifndef Q_OS_HTML5
+#ifndef QT_NO_THREAD
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()
@@ -1717,7 +1717,7 @@ QQmlTypeData will not be cached.
*/
QQmlTypeData *QQmlTypeLoader::getType(const QByteArray &data, const QUrl &url, Mode mode)
{
-#ifdef Q_OS_HTML5
+#ifdef QT_NO_THREAD
mode = Asynchronous;
#endif
LockHolder<QQmlTypeLoader> holder(this);
diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp
index a55b7b4ad9..88b9c93448 100644
--- a/src/quick/scenegraph/qsgrenderloop.cpp
+++ b/src/quick/scenegraph/qsgrenderloop.cpp
@@ -201,12 +201,9 @@ QSGRenderLoop *QSGRenderLoop::instance()
loopType = ThreadedRenderLoop;
else
loopType = WindowsRenderLoop;
-#elif defined(Q_OS_HTML5)
- loopType = BasicRenderLoop;
-#else
+#endif
if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL))
loopType = ThreadedRenderLoop;
-#endif
if (qmlNoThreadedRenderer())
loopType = BasicRenderLoop;
@@ -223,6 +220,11 @@ QSGRenderLoop *QSGRenderLoop::instance()
loopType = ThreadedRenderLoop;
}
+#ifdef QT_NO_THREAD
+ if (loopType == ThreadedRenderLoop)
+ loopType = BasicRenderLoop;
+#endif
+
switch (loopType) {
case ThreadedRenderLoop:
qCDebug(QSG_LOG_INFO, "threaded render loop");