diff options
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/configure.json | 7 | ||||
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 8 | ||||
-rw-r--r-- | src/qml/qml/qqmlengine_p.h | 2 | ||||
-rw-r--r-- | src/qml/types/types.pri | 2 |
4 files changed, 13 insertions, 6 deletions
diff --git a/src/qml/configure.json b/src/qml/configure.json index 1e3ac65f2a..9d30dd7be2 100644 --- a/src/qml/configure.json +++ b/src/qml/configure.json @@ -96,6 +96,13 @@ "purpose": "Provides the DelegateModel QML type.", "section": "QML", "output": [ "privateFeature" ] + }, + "qml-worker-script": { + "label": "QML WorkerScript", + "purpose": "Enables the use of threads in QML.", + "section": "QML", + "condition": "features.thread", + "output": [ "privateFeature" ] } }, diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 82a3f45784..5f47376c62 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -95,7 +95,7 @@ #include <private/qqmldelegatemodel_p.h> #endif #include <private/qqmlobjectmodel_p.h> -#if QT_CONFIG(thread) +#if QT_CONFIG(qml_worker_script) #include <private/qquickworkerscript_p.h> #endif #include <private/qqmlinstantiator_p.h> @@ -245,7 +245,7 @@ void QQmlEnginePrivate::registerQtQuick2Types(const char *uri, int versionMajor, qmlRegisterType<QQmlListElement>(uri, versionMajor, versionMinor, "ListElement"); // Now in QtQml.Models, here for compatibility qmlRegisterCustomType<QQmlListModel>(uri, versionMajor, versionMinor, "ListModel", new QQmlListModelParser); // Now in QtQml.Models, here for compatibility #endif -#if QT_CONFIG(thread) +#if QT_CONFIG(qml_worker_script) qmlRegisterType<QQuickWorkerScript>(uri, versionMajor, versionMinor, "WorkerScript"); #endif qmlRegisterType<QQuickPackage>(uri, versionMajor, versionMinor, "Package"); @@ -691,7 +691,7 @@ QQmlEnginePrivate::QQmlEnginePrivate(QQmlEngine *e) #endif outputWarningsToMsgLog(true), cleanup(nullptr), erroredBindings(nullptr), inProgressCreations(0), -#if QT_CONFIG(thread) +#if QT_CONFIG(qml_worker_script) workerScriptEngine(nullptr), #endif activeObjectCreator(nullptr), @@ -993,7 +993,7 @@ void QQmlEnginePrivate::init() rootContext = new QQmlContext(q,true); } -#if QT_CONFIG(thread) +#if QT_CONFIG(qml_worker_script) QQuickWorkerScriptEngine *QQmlEnginePrivate::getWorkerScriptEngine() { Q_Q(QQmlEngine); diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h index d05f6634ec..3caa6ec138 100644 --- a/src/qml/qml/qqmlengine_p.h +++ b/src/qml/qml/qqmlengine_p.h @@ -153,7 +153,7 @@ public: QV8Engine *v8engine() const { return q_func()->handle()->v8Engine; } QV4::ExecutionEngine *v4engine() const { return q_func()->handle(); } -#if QT_CONFIG(thread) +#if QT_CONFIG(qml_worker_script) QQuickWorkerScriptEngine *getWorkerScriptEngine(); QQuickWorkerScriptEngine *workerScriptEngine; #endif diff --git a/src/qml/types/types.pri b/src/qml/types/types.pri index e0ff57a13e..e74c89b1f1 100644 --- a/src/qml/types/types.pri +++ b/src/qml/types/types.pri @@ -19,7 +19,7 @@ HEADERS += \ $$PWD/qqmlinstantiator_p_p.h \ $$PWD/qqmltableinstancemodel_p.h -qtConfig(thread) { +qtConfig(qml-worker-script) { SOURCES += \ $$PWD/qquickworkerscript.cpp HEADERS += \ |