diff options
author | Michal Klocek <michal.klocek@qt.io> | 2021-06-11 08:55:59 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2021-06-23 15:40:27 +0200 |
commit | 6c6d0051dc3b206ac817c745a76822625830ef22 (patch) | |
tree | 52b759c678584364911bc490b454eb88c8128ee6 /src/webenginequick/api/qquickwebengineaction_p.h | |
parent | f64d8caeafe2c8952e6ad24ba13e87d1daf20ac8 (diff) | |
download | qtwebengine-6c6d0051dc3b206ac817c745a76822625830ef22.tar.gz |
Use new qml registration system and new qml cmake api
To be able to use the new qml cmake api, which can also now
generate plugin stubs and do the metatype registration,
a project has to use specific project file structure,
otherwise the meta type registration generator will fail
to include properly headers. Shuffle a bit file locations
for test_support and change how qml modules are built.
We still need to keep plugin.cpp for ithe quick module plugin,
because we use image providers and this requires the qml engine
instance to register.
Pick-to: 6.2
Change-Id: I083b58dac4edc586efca9fae821e5ea645cc2092
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/webenginequick/api/qquickwebengineaction_p.h')
-rw-r--r-- | src/webenginequick/api/qquickwebengineaction_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/webenginequick/api/qquickwebengineaction_p.h b/src/webenginequick/api/qquickwebengineaction_p.h index c429d8917..f059b2e3e 100644 --- a/src/webenginequick/api/qquickwebengineaction_p.h +++ b/src/webenginequick/api/qquickwebengineaction_p.h @@ -55,6 +55,7 @@ #include <QtQml/qqml.h> #include "qtwebenginequickglobal_p.h" #include <QVariant> +#include <QtQml/qqmlregistration.h> namespace QtWebEngineCore { class UIDelegatesManager; @@ -71,6 +72,10 @@ class Q_WEBENGINE_EXPORT QQuickWebEngineAction : public QObject Q_PROPERTY(QString text READ text CONSTANT FINAL) Q_PROPERTY(QString iconName READ iconName CONSTANT FINAL) Q_PROPERTY(bool enabled READ isEnabled NOTIFY enabledChanged FINAL) + QML_NAMED_ELEMENT(WebEngineAction) + QML_ADDED_IN_VERSION(1, 8) + QML_EXTRA_VERSION(2, 0) + QML_UNCREATABLE("") public: QQuickWebEngineAction(const QVariant &data, const QString &text, const QString &iconName, bool enabled, QObject *parent); |