From 5e57a060c67580e7f473da0c74c5f08b6f967cf2 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Mon, 4 Aug 2025 13:08:51 +0200 Subject: [PATCH] Register anchors flags to QML CCBUG: 507602 --- src/interfaces/window.h | 2 +- tests/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interfaces/window.h b/src/interfaces/window.h index f2dd573..083e467 100644 --- a/src/interfaces/window.h +++ b/src/interfaces/window.h @@ -40,8 +40,8 @@ public: AnchorLeft = 4, ///< The left edge of the anchor rectangle AnchorRight = 8, ///< The right edge of the anchor rectangle }; - Q_ENUM(Anchor); Q_DECLARE_FLAGS(Anchors, Anchor) + Q_FLAG(Anchors) /** * This enum type is used to specify the layer where a surface can be put in. diff --git a/tests/main.cpp b/tests/main.cpp index e1860dc..af8a4f8 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -53,7 +53,7 @@ int main(int argc, char **argv) QGuiApplication app(argc, argv); const auto layerMetaEnum = QMetaEnum::fromType(); - const auto anchorMetaEnum = QMetaEnum::fromType(); + const auto anchorMetaEnum = QMetaEnum::fromType(); QCommandLineParser parser; QCommandLineOption marginsOption(QStringLiteral("margins"), QStringLiteral("Window margins"), QStringLiteral("pixels"), QStringLiteral("0"));