diff --git a/src/scripting/screenedgeitem.h b/src/scripting/screenedgeitem.h index 91bd8517f4..1856c7c26e 100644 --- a/src/scripting/screenedgeitem.h +++ b/src/scripting/screenedgeitem.h @@ -35,8 +35,6 @@ namespace KWin class ScreenEdgeItem : public QObject { Q_OBJECT - Q_ENUMS(Edge) - Q_ENUMS(Mode) /** * @brief Whether the edge is currently enabled, that is reserved. Default value is @c true. */ @@ -62,6 +60,7 @@ public: EDGE_COUNT, NoEdge }; + Q_ENUM(Edge) /** * Enum describing the operation modes of the edge. */ @@ -69,6 +68,7 @@ public: Pointer, Touch }; + Q_ENUM(Mode) explicit ScreenEdgeItem(QObject *parent = nullptr); ~ScreenEdgeItem() override; bool isEnabled() const; diff --git a/src/scripting/scripting.h b/src/scripting/scripting.h index 0580e6816c..7308709242 100644 --- a/src/scripting/scripting.h +++ b/src/scripting/scripting.h @@ -253,7 +253,6 @@ private: class JSEngineGlobalMethodsWrapper : public QObject { Q_OBJECT - Q_ENUMS(ClientAreaOption) public: //------------------------------------------------------------------ //enums copy&pasted from kwinglobals.h for exporting @@ -276,6 +275,7 @@ public: ///< one whole screen, ignore struts ScreenArea }; + Q_ENUM(ClientAreaOption) explicit JSEngineGlobalMethodsWrapper(DeclarativeScript *parent); ~JSEngineGlobalMethodsWrapper() override; diff --git a/src/scripting/scripting_model.h b/src/scripting/scripting_model.h index c7d8a9e30b..1a10de27ec 100644 --- a/src/scripting/scripting_model.h +++ b/src/scripting/scripting_model.h @@ -25,7 +25,6 @@ class ClientModel : public QAbstractItemModel { Q_OBJECT Q_ENUMS(Exclude) - Q_ENUMS(LevelRestriction) Q_PROPERTY(Exclusions exclusions READ exclusions WRITE setExclusions NOTIFY exclusionsChanged) public: enum Exclusion { @@ -48,6 +47,7 @@ public: }; Q_DECLARE_FLAGS(Exclusions, Exclusion) Q_FLAGS(Exclusions) + Q_ENUM(Exclusion) enum LevelRestriction { NoRestriction = 0, VirtualDesktopRestriction = 1 << 0, @@ -56,6 +56,7 @@ public: }; Q_DECLARE_FLAGS(LevelRestrictions, LevelRestriction) Q_FLAGS(LevelRestrictions) + Q_ENUM(LevelRestriction) explicit ClientModel(QObject *parent); ~ClientModel() override; int columnCount(const QModelIndex &parent = QModelIndex()) const override; diff --git a/src/scripting/workspace_wrapper.h b/src/scripting/workspace_wrapper.h index bc7e0e896f..b21b7f3bae 100644 --- a/src/scripting/workspace_wrapper.h +++ b/src/scripting/workspace_wrapper.h @@ -27,8 +27,6 @@ class X11Client; class WorkspaceWrapper : public QObject { Q_OBJECT - Q_ENUMS(ClientAreaOption) - Q_ENUMS(ElectricBorder) Q_PROPERTY(int currentDesktop READ currentDesktop WRITE setCurrentDesktop NOTIFY currentDesktopChanged) Q_PROPERTY(KWin::AbstractClient *activeClient READ activeClient WRITE setActiveClient NOTIFY clientActivated) // TODO: write and notify? @@ -177,6 +175,7 @@ public: ///< one whole screen, ignore struts ScreenArea }; + Q_ENUM(ClientAreaOption) enum ElectricBorder { ElectricTop, ElectricTopRight, @@ -189,6 +188,7 @@ public: ELECTRIC_COUNT, ElectricNone }; + Q_ENUM(ElectricBorder) protected: explicit WorkspaceWrapper(QObject* parent = nullptr);