aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlworkerscript
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlworkerscript')
-rw-r--r--src/qmlworkerscript/qqmlworkerscriptmodule.cpp3
-rw-r--r--src/qmlworkerscript/qquickworkerscript_p.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/qmlworkerscript/qqmlworkerscriptmodule.cpp b/src/qmlworkerscript/qqmlworkerscriptmodule.cpp
index 98e82dbeba..42efe1a8eb 100644
--- a/src/qmlworkerscript/qqmlworkerscriptmodule.cpp
+++ b/src/qmlworkerscript/qqmlworkerscriptmodule.cpp
@@ -47,6 +47,7 @@ QT_BEGIN_NAMESPACE
void QQmlWorkerScriptModule::registerQuickTypes()
{
// Don't add anything here. These are only for backwards compatibility.
+ // Also, don't convert to qmlRegisterTypesAndRevisions as that will add future revisions.
const char uri[] = "QtQuick";
qmlRegisterType<QQuickWorkerScript>(uri, 2, 0, "WorkerScript");
}
@@ -56,7 +57,7 @@ void QQmlWorkerScriptModule::registerQuickTypes()
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_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: