aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlworkerscript
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-10-14 18:46:38 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-10-14 19:02:37 +0200
commitc2f8b9535d34da6948ccf45b7d5fd90de2f1bc9e (patch)
treec6f7e058a985d7c18b51cadc76283caf555071c9 /src/qmlworkerscript
parent9e633bbda7608ac0231809e2a6a97ae8f2d849d6 (diff)
parent803f18f02e5609a1ca00a5b78ea6d3613d44e1a0 (diff)
Merge remote-tracking branch 'origin/dev' into wip/cmake
Removed dependencies.yaml because we don't use it yet in wip/cmake. Fixed conflict in qmlcachegen.cpp. Change-Id: Ie1060c737bee1daa85779903598e5b6d5020d922
Diffstat (limited to 'src/qmlworkerscript')
-rw-r--r--src/qmlworkerscript/doc/qtqmlworkerscript.qdocconf37
-rw-r--r--src/qmlworkerscript/qmlworkerscript.pro2
-rw-r--r--src/qmlworkerscript/qqmlworkerscriptmodule.cpp2
-rw-r--r--src/qmlworkerscript/qquickworkerscript.cpp4
-rw-r--r--src/qmlworkerscript/qquickworkerscript_p.h1
5 files changed, 43 insertions, 3 deletions
diff --git a/src/qmlworkerscript/doc/qtqmlworkerscript.qdocconf b/src/qmlworkerscript/doc/qtqmlworkerscript.qdocconf
new file mode 100644
index 0000000000..bb883cf39f
--- /dev/null
+++ b/src/qmlworkerscript/doc/qtqmlworkerscript.qdocconf
@@ -0,0 +1,37 @@
+include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
+include($QT_INSTALL_DOCS/config/exampleurl-qtdeclarative.qdocconf)
+
+project = QtQmlWorkerScript
+description = Qt Qml WorkerScript Reference Documentation
+version = $QT_VERSION
+moduleheader = QtQmlWorkerScript
+qhp.projects = QtQmlWorkerScript
+
+qhp.QtQmlWorkerScript.file = qtqmlworkerscript.qhp
+qhp.QtQmlWorkerScript.namespace = org.qt-project.qtqmlworkerscript.$QT_VERSION_TAG
+qhp.QtQmlWorkerScript.virtualFolder = qtqmlworkerscript
+qhp.QtQmlWorkerScript.indexRoot =
+
+qhp.QtQmlWorkerScript.filterAttributes = qtqmlworkerscript $QT_VERSION qtrefdoc
+qhp.QtQmlWorkerScript.customFilters.Qt.name = QtQmlWorkerScript $QT_VERSION
+qhp.QtQmlWorkerScript.customFilters.Qt.filterAttributes = qtqmlworkerscript $QT_VERSION
+
+qhp.QtQmlWorkerScript.title = QML Types
+qhp.QtQmlWorkerScript.indexTitle = Qt QML WorkerScript QML Types
+qhp.QtQmlWorkerScript.selectors = qmlclass
+qhp.QtQmlWorkerScript.sortPages = true
+
+tagfile = qtqmlworkerscript.tags
+
+depends += qtcore qtqml qtdoc
+
+headerdirs += ..
+
+sourcedirs += .. \
+ ../../imports/workerscript
+
+exampledirs += ../../../examples/qml \
+ ../ \
+ snippets
+
+navigation.qmltypespage = "Qt Qml WorkerScript QML Types"
diff --git a/src/qmlworkerscript/qmlworkerscript.pro b/src/qmlworkerscript/qmlworkerscript.pro
index 908caa4ed4..9f5e0e809a 100644
--- a/src/qmlworkerscript/qmlworkerscript.pro
+++ b/src/qmlworkerscript/qmlworkerscript.pro
@@ -1,6 +1,8 @@
TARGET = QtQmlWorkerScript
QT = core-private qml-private
+QMAKE_DOCS = $$PWD/doc/qtqmlworkerscript.qdocconf
+
DEFINES += QT_NO_URL_CAST_FROM_STRING QT_NO_INTEGER_EVENT_COORDINATES QT_NO_FOREACH
HEADERS += \
diff --git a/src/qmlworkerscript/qqmlworkerscriptmodule.cpp b/src/qmlworkerscript/qqmlworkerscriptmodule.cpp
index 5eb7d306bc..b85456a633 100644
--- a/src/qmlworkerscript/qqmlworkerscriptmodule.cpp
+++ b/src/qmlworkerscript/qqmlworkerscriptmodule.cpp
@@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE
void QQmlWorkerScriptModule::defineModule()
{
const char uri[] = "QtQml.WorkerScript";
- qmlRegisterType<QQuickWorkerScript>(uri, 2, 0, "WorkerScript");
+ qmlRegisterTypesAndRevisions<QQuickWorkerScript>(uri, 2);
}
QT_END_NAMESPACE
diff --git a/src/qmlworkerscript/qquickworkerscript.cpp b/src/qmlworkerscript/qquickworkerscript.cpp
index 4da1def5f5..8b236697b9 100644
--- a/src/qmlworkerscript/qquickworkerscript.cpp
+++ b/src/qmlworkerscript/qquickworkerscript.cpp
@@ -374,7 +374,7 @@ QQuickWorkerScriptEngine::~QQuickWorkerScriptEngine()
yieldCurrentThread();
}
- d->deleteLater();
+ delete d;
}
WorkerScript::WorkerScript(int id, QQuickWorkerScriptEnginePrivate *parent)
@@ -441,7 +441,7 @@ void QQuickWorkerScriptEngine::run()
\qmltype WorkerScript
\instantiates QQuickWorkerScript
\ingroup qtquick-threading
- \inqmlmodule QtQml
+ \inqmlmodule QtQml.WorkerScript
\brief Enables the use of threads in a Qt Quick application.
Use WorkerScript to run operations in a new thread.
diff --git a/src/qmlworkerscript/qquickworkerscript_p.h b/src/qmlworkerscript/qquickworkerscript_p.h
index 87cf2e9754..9b5d3587fb 100644
--- a/src/qmlworkerscript/qquickworkerscript_p.h
+++ b/src/qmlworkerscript/qquickworkerscript_p.h
@@ -87,6 +87,7 @@ class Q_AUTOTEST_EXPORT QQuickWorkerScript : public QObject, public QQmlParserSt
{
Q_OBJECT
Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
+ QML_NAMED_ELEMENT(WorkerScript);
Q_INTERFACES(QQmlParserStatus)
public: