aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/imports/models/plugin.cpp17
-rw-r--r--src/imports/workerscript/plugin.cpp18
-rw-r--r--src/qmlworkerscript/qquickworkerscript_p.h3
3 files changed, 33 insertions, 5 deletions
diff --git a/src/imports/models/plugin.cpp b/src/imports/models/plugin.cpp
index d79b31bba5..4aa9f27766 100644
--- a/src/imports/models/plugin.cpp
+++ b/src/imports/models/plugin.cpp
@@ -37,13 +37,17 @@
**
****************************************************************************/
+#include <QtQmlModels/private/qqmlobjectmodel_p.h>
+
#include <QtQml/qqmlextensionplugin.h>
#include <QtQml/qqml.h>
-#include <private/qqmlmodelsmodule_p.h>
+#include <QtCore/qloggingcategory.h>
QT_BEGIN_NAMESPACE
+Q_LOGGING_CATEGORY(qmlModelsPlugin, "qt.qmlModelsPlugin")
+
/*!
\qmlmodule QtQml.Models 2.\QtMinorVersion
\title Qt QML Models QML Types
@@ -86,7 +90,16 @@ class QtQmlModelsPlugin : public QQmlEngineExtensionPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlEngineExtensionInterface_iid)
public:
- QtQmlModelsPlugin(QObject *parent = nullptr) : QQmlEngineExtensionPlugin(parent) { }
+ QtQmlModelsPlugin(QObject *parent = nullptr) : QQmlEngineExtensionPlugin(parent)
+ {
+ if (qmlModelsPlugin().isDebugEnabled()) {
+ // Superficial debug message that causes the dependency between QtQmlWorkerScript
+ // and the workerscript plugin to be retained.
+ // As qCDebug() can be a noop, retrieve the className in a separate step.
+ const QString className = QQmlObjectModel::staticMetaObject.className();
+ qCDebug(qmlModelsPlugin) << "Loading QmlModels plugin:" << className;
+ }
+ }
};
//![class decl]
diff --git a/src/imports/workerscript/plugin.cpp b/src/imports/workerscript/plugin.cpp
index e2be2f487d..0961979c53 100644
--- a/src/imports/workerscript/plugin.cpp
+++ b/src/imports/workerscript/plugin.cpp
@@ -37,12 +37,17 @@
**
****************************************************************************/
-#include <QtQmlWorkerScript/private/qqmlworkerscriptmodule_p.h>
+#include <QtQmlWorkerScript/private/qquickworkerscript_p.h>
+
#include <QtQml/qqmlextensionplugin.h>
#include <QtQml/qqml.h>
+#include <QtCore/qloggingcategory.h>
+
QT_BEGIN_NAMESPACE
+Q_LOGGING_CATEGORY(workerScriptPlugin, "qt.workerScriptPlugin")
+
/*!
\qmlmodule QtQml.WorkerScript 2.\QtMinorVersion
\title Qt QML WorkerScript QML Types
@@ -64,7 +69,16 @@ class QtQmlWorkerScriptPlugin : public QQmlEngineExtensionPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlEngineExtensionInterface_iid)
public:
- QtQmlWorkerScriptPlugin(QObject *parent = nullptr) : QQmlEngineExtensionPlugin(parent) { }
+ QtQmlWorkerScriptPlugin(QObject *parent = nullptr) : QQmlEngineExtensionPlugin(parent)
+ {
+ if (workerScriptPlugin().isDebugEnabled()) {
+ // Superficial debug message that causes the dependency between QtQmlWorkerScript
+ // and the workerscript plugin to be retained.
+ // As qCDebug() can be a noop, retrieve the className in a separate step.
+ const QString className = QQuickWorkerScript::staticMetaObject.className();
+ qCDebug(workerScriptPlugin) << "Loading WorkerScript plugin:" << className;
+ }
+ }
};
QT_END_NAMESPACE
diff --git a/src/qmlworkerscript/qquickworkerscript_p.h b/src/qmlworkerscript/qquickworkerscript_p.h
index d1f686a78d..03581089e0 100644
--- a/src/qmlworkerscript/qquickworkerscript_p.h
+++ b/src/qmlworkerscript/qquickworkerscript_p.h
@@ -53,6 +53,7 @@
#include <qqml.h>
+#include <QtQmlWorkerScript/private/qtqmlworkerscriptglobal_p.h>
#include <QtQml/qqmlparserstatus.h>
#include <QtCore/qthread.h>
#include <QtQml/qjsvalue.h>
@@ -83,7 +84,7 @@ private:
};
class QQmlV4Function;
-class Q_AUTOTEST_EXPORT QQuickWorkerScript : public QObject, public QQmlParserStatus
+class Q_QMLWORKERSCRIPT_PRIVATE_EXPORT QQuickWorkerScript : public QObject, public QQmlParserStatus
{
Q_OBJECT
Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)