Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
22658bb2
Commit
22658bb2
authored
Nov 18, 2020
by
Aleix Pol Gonzalez
🐧
Browse files
Prefer Q_ENUM to Q_ENUMS
It exposes more information to introspect on.
parent
a590dbd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
options.h
View file @
22658bb2
...
...
@@ -47,13 +47,7 @@ class Settings;
class
KWIN_EXPORT
Options
:
public
QObject
{
Q_OBJECT
Q_ENUMS
(
FocusPolicy
)
Q_ENUMS
(
XwaylandCrashPolicy
)
Q_ENUMS
(
GlSwapStrategy
)
Q_ENUMS
(
MouseCommand
)
Q_ENUMS
(
MouseWheelCommand
)
Q_ENUMS
(
WindowOperation
)
Q_PROPERTY
(
FocusPolicy
focusPolicy
READ
focusPolicy
WRITE
setFocusPolicy
NOTIFY
focusPolicyChanged
)
Q_PROPERTY
(
XwaylandCrashPolicy
xwaylandCrashPolicy
READ
xwaylandCrashPolicy
WRITE
setXwaylandCrashPolicy
NOTIFY
xwaylandCrashPolicyChanged
)
Q_PROPERTY
(
int
xwaylandMaxCrashCount
READ
xwaylandMaxCrashCount
WRITE
setXwaylandMaxCrashCount
NOTIFY
xwaylandMaxCrashCountChanged
)
...
...
@@ -226,6 +220,7 @@ public:
*/
FocusStrictlyUnderMouse
};
Q_ENUM
(
FocusPolicy
)
FocusPolicy
focusPolicy
()
const
{
return
m_focusPolicy
;
...
...
@@ -369,6 +364,7 @@ public:
SetupWindowShortcutOp
,
ApplicationRulesOp
,
};
Q_ENUM
(
WindowOperation
)
WindowOperation
operationTitlebarDblClick
()
const
{
return
OpTitlebarDblClick
;
...
...
@@ -400,6 +396,7 @@ public:
MouseClose
,
MouseNothing
};
Q_ENUM
(
MouseCommand
)
enum
MouseWheelCommand
{
MouseWheelRaiseLower
,
MouseWheelShadeUnshade
,
MouseWheelMaximizeRestore
,
...
...
@@ -407,6 +404,7 @@ public:
MouseWheelChangeOpacity
,
MouseWheelNothing
};
Q_ENUM
(
MouseWheelCommand
)
MouseCommand
operationTitlebarMouseWheel
(
int
delta
)
const
{
return
wheelToMouseCommand
(
CmdTitlebarWheel
,
delta
);
...
...
@@ -581,6 +579,7 @@ public:
}
enum
GlSwapStrategy
{
NoSwapEncourage
=
0
,
CopyFrontBuffer
=
'c'
,
PaintFullScreen
=
'p'
,
ExtendDamage
=
'e'
,
AutoSwapStrategy
=
'a'
};
Q_ENUM
(
GlSwapStrategy
)
GlSwapStrategy
glPreferBufferSwap
()
const
{
return
m_glPreferBufferSwap
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment