summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2025-08-06 10:15:38 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2025-08-17 11:47:31 +0200
commit653122d8649da8d6d7791edf046aee4304b5963b (patch)
treec838aa424b16ff4b26639f613d323d4df8c291ae /src
parent1eb2cb02f7ebdfc15a0d2ddc7837d4cffe073006 (diff)
Export qml extension types in webenginequick
From API review. Pick-to: 6.10 Change-Id: Ibcdf7780d1c03f601a703b35118d0b439e4df62c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/core/api/qwebengineextensioninfo.h3
-rw-r--r--src/core/api/qwebengineextensionmanager.h4
-rw-r--r--src/webenginequick/api/qquickwebengineforeigntypes_p.h24
3 files changed, 24 insertions, 7 deletions
diff --git a/src/core/api/qwebengineextensioninfo.h b/src/core/api/qwebengineextensioninfo.h
index 1c242dcb2..413f29477 100644
--- a/src/core/api/qwebengineextensioninfo.h
+++ b/src/core/api/qwebengineextensioninfo.h
@@ -36,9 +36,6 @@ class QWebEngineExtensionInfo
Q_PROPERTY(bool isInstalled READ isInstalled FINAL)
public:
- QML_VALUE_TYPE(webEngineExtension)
- QML_ADDED_IN_VERSION(6, 10)
-
Q_WEBENGINECORE_EXPORT QWebEngineExtensionInfo();
Q_WEBENGINECORE_EXPORT
diff --git a/src/core/api/qwebengineextensionmanager.h b/src/core/api/qwebengineextensionmanager.h
index 15919605d..0fc6d3e01 100644
--- a/src/core/api/qwebengineextensionmanager.h
+++ b/src/core/api/qwebengineextensionmanager.h
@@ -27,10 +27,6 @@ class Q_WEBENGINECORE_EXPORT QWebEngineExtensionManager : public QObject
Q_PROPERTY(QString installPath READ installPath FINAL)
Q_PROPERTY(QList<QWebEngineExtensionInfo> extensions READ extensions FINAL)
public:
- QML_NAMED_ELEMENT(WebEngineExtensionManager)
- QML_UNCREATABLE("")
- QML_ADDED_IN_VERSION(6, 10)
-
~QWebEngineExtensionManager() override;
Q_INVOKABLE void loadExtension(const QString &path);
Q_INVOKABLE void installExtension(const QString &path);
diff --git a/src/webenginequick/api/qquickwebengineforeigntypes_p.h b/src/webenginequick/api/qquickwebengineforeigntypes_p.h
index be10af081..c2892d33c 100644
--- a/src/webenginequick/api/qquickwebengineforeigntypes_p.h
+++ b/src/webenginequick/api/qquickwebengineforeigntypes_p.h
@@ -36,6 +36,11 @@
#include <QtWebEngineCore/qwebenginedesktopmediarequest.h>
#include <QtWebEngineCore/qwebengineclienthints.h>
+#if QT_CONFIG(webengine_extensions)
+#include <QtWebEngineCore/qwebengineextensioninfo.h>
+#include <QtWebEngineCore/qwebengineextensionmanager.h>
+#endif
+
QT_BEGIN_NAMESPACE
// To prevent the same type from being exported twice into qmltypes
@@ -284,6 +289,25 @@ struct ForeignWebEngineClientHints : public QObject
QML_UNCREATABLE("")
};
+#if QT_CONFIG(webengine_extensions)
+struct ForeignWebEngineExtensionInfo
+{
+ Q_GADGET
+ QML_VALUE_TYPE(webEngineExtension)
+ QML_FOREIGN(QWebEngineExtensionInfo)
+ QML_ADDED_IN_VERSION(6, 10)
+};
+
+struct ForeignWebEngineExtensionManager
+{
+ Q_GADGET
+ QML_NAMED_ELEMENT(WebEngineExtensionManager)
+ QML_FOREIGN(QWebEngineExtensionManager)
+ QML_ADDED_IN_VERSION(6, 10)
+ QML_UNCREATABLE("")
+};
+#endif
+
QT_END_NAMESPACE
#endif // QQUICKWEBENGINEFOREIGNTYPES_H