Use Q_ENUM on enum class

Otherwise it can't be passed to QDebug at all
This commit is contained in:
Aleix Pol 2021-04-29 01:43:00 +02:00 committed by Aleix Pol Gonzalez
parent 3acd2b5a26
commit 6a3e80d11d

View file

@ -54,6 +54,7 @@ public:
VerticalRGB, VerticalRGB,
VerticalBGR, VerticalBGR,
}; };
Q_ENUM(SubPixel)
enum class Transform { enum class Transform {
Normal, Normal,
Rotated90, Rotated90,
@ -64,14 +65,17 @@ public:
Flipped180, Flipped180,
Flipped270, Flipped270,
}; };
Q_ENUM(Transform)
enum class Enablement { enum class Enablement {
Disabled = 0, Disabled = 0,
Enabled = 1, Enabled = 1,
}; };
Q_ENUM(Enablement)
enum class ModeFlag { enum class ModeFlag {
Current = 1, Current = 1,
Preferred = 2, Preferred = 2,
}; };
Q_ENUM(ModeFlag)
Q_DECLARE_FLAGS(ModeFlags, ModeFlag) Q_DECLARE_FLAGS(ModeFlags, ModeFlag)
struct Mode { struct Mode {
QSize size = QSize(); QSize size = QSize();
@ -87,6 +91,7 @@ public:
enum class Capability { enum class Capability {
Overscan = 0x1, Overscan = 0x1,
}; };
Q_ENUM(Capability)
Q_DECLARE_FLAGS(Capabilities, Capability) Q_DECLARE_FLAGS(Capabilities, Capability)
explicit OutputDeviceInterface(Display *display, QObject *parent = nullptr); explicit OutputDeviceInterface(Display *display, QObject *parent = nullptr);