diff options
author | Robert Griebl <[email protected]> | 2023-06-27 16:37:45 +0200 |
---|---|---|
committer | Robert Griebl <[email protected]> | 2023-06-27 14:51:12 +0000 |
commit | 995eb2c822b82eba8849fcd6dc7de465a7ca72f3 (patch) | |
tree | d7e6f4936c70284038ba93f21d37da9ed2d99698 /plugins/style/Style.h | |
parent | 7f3bda0bdc9c4c1c704fbcf8585e3470f9f9e9f5 (diff) |
Change-Id: I5dd88d1f01b77b833f8d141ea689f7647ea420c7
Reviewed-by: Dominik Holland <[email protected]>
Diffstat (limited to 'plugins/style/Style.h')
-rw-r--r-- | plugins/style/Style.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/plugins/style/Style.h b/plugins/style/Style.h index c3f5ca55..995abbeb 100644 --- a/plugins/style/Style.h +++ b/plugins/style/Style.h @@ -33,10 +33,22 @@ #include "StyleData.h" -#include <QtQuickControls2Impl/private/qquickattachedobject_p.h> #include <QJSValue> +#include <QQmlEngine> -class Style : public QQuickAttachedObject +#if QT_VERSION < QT_VERSION_CHECK(6, 5, 0) +# include <QtQuickControls2/private/qquickstyle_p.h> +class QQuickAttachedPropertyPropagator : public QQuickAttachedObject +{ +protected: + void initialize() { QQuickAttachedObject::init(); } +}; + +#else +# include <QtQuickControls2/QQuickAttachedPropertyPropagator> +#endif + +class Style : public QQuickAttachedPropertyPropagator { Q_OBJECT Q_PROPERTY(Theme theme READ theme WRITE setTheme NOTIFY themeChanged FINAL) @@ -120,8 +132,8 @@ public: QJSValue image(); protected: - void init(); - void attachedParentChange(QQuickAttachedObject *newParent, QQuickAttachedObject *oldParent) override; + void initialize(); + void attachedParentChange(QQuickAttachedPropertyPropagator *newParent, QQuickAttachedPropertyPropagator *oldParent) override; signals: void accentColorChanged(); |