Commit 92556637 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Add trailing comma to enums

parent 51a15c97
...@@ -268,7 +268,7 @@ public: ...@@ -268,7 +268,7 @@ public:
SHOW_AUX, SHOW_AUX,
HIDE_AUX, HIDE_AUX,
SHOW_HELP, SHOW_HELP,
SHOW_FACTORY_MENU SHOW_FACTORY_MENU,
} }
; ;
DBusEvent(SCIM_EVENT_TYPE t, const QVariantList &arglist = QVariantList()) DBusEvent(SCIM_EVENT_TYPE t, const QVariantList &arglist = QVariantList())
......
...@@ -31,7 +31,7 @@ struct TextAttribute { ...@@ -31,7 +31,7 @@ struct TextAttribute {
None, None,
Decorate, Decorate,
Foreground, Foreground,
Background Background,
}; };
Type type; Type type;
int start; int start;
......
...@@ -56,11 +56,11 @@ class PagerModel : public QAbstractListModel, public QQmlParserStatus ...@@ -56,11 +56,11 @@ class PagerModel : public QAbstractListModel, public QQmlParserStatus
public: public:
enum PagerType { enum PagerType {
VirtualDesktops = 0, VirtualDesktops = 0,
Activities Activities,
}; };
enum AdditionalRoles { enum AdditionalRoles {
TasksModel = Qt::UserRole + 1 TasksModel = Qt::UserRole + 1,
}; };
explicit PagerModel(QObject *parent = nullptr); explicit PagerModel(QObject *parent = nullptr);
......
...@@ -32,7 +32,7 @@ class WindowModel : public TaskManager::TaskFilterProxyModel ...@@ -32,7 +32,7 @@ class WindowModel : public TaskManager::TaskFilterProxyModel
public: public:
enum WindowModelRoles { enum WindowModelRoles {
StackingOrder = Qt::UserRole + 1 StackingOrder = Qt::UserRole + 1,
}; };
explicit WindowModel(PagerModel *parent); explicit WindowModel(PagerModel *parent);
......
...@@ -52,7 +52,7 @@ class Backend : public QObject ...@@ -52,7 +52,7 @@ class Backend : public QObject
NewInstance, NewInstance,
ToggleMinimized, ToggleMinimized,
ToggleGrouping, ToggleGrouping,
BringToCurrentDesktop BringToCurrentDesktop,
}; };
Q_ENUM(MiddleClickAction) Q_ENUM(MiddleClickAction)
......
...@@ -52,7 +52,7 @@ public: ...@@ -52,7 +52,7 @@ public:
enum Roles { enum Roles {
UrlRole = Qt::UserRole + 1, UrlRole = Qt::UserRole + 1,
MimeTypeRole = Qt::UserRole + 2, MimeTypeRole = Qt::UserRole + 2,
Thumbnail = Qt::UserRole + 3 Thumbnail = Qt::UserRole + 3,
}; };
explicit DirModel(QObject* parent=nullptr); explicit DirModel(QObject* parent=nullptr);
......
...@@ -113,20 +113,20 @@ class FOLDERPLUGIN_TESTS_EXPORT FolderModel : public QSortFilterProxyModel, publ ...@@ -113,20 +113,20 @@ class FOLDERPLUGIN_TESTS_EXPORT FolderModel : public QSortFilterProxyModel, publ
LinkDestinationUrl, LinkDestinationUrl,
SizeRole, SizeRole,
TypeRole, TypeRole,
FileNameRole FileNameRole,
}; };
enum FilterMode { enum FilterMode {
NoFilter = 0, NoFilter = 0,
FilterShowMatches, FilterShowMatches,
FilterHideMatches FilterHideMatches,
}; };
enum Status { enum Status {
None, None,
Ready, Ready,
Listing, Listing,
Canceled Canceled,
}; };
Q_ENUM(Status) Q_ENUM(Status)
......
...@@ -41,7 +41,7 @@ class FOLDERPLUGIN_TESTS_EXPORT ScreenMapper : public QObject ...@@ -41,7 +41,7 @@ class FOLDERPLUGIN_TESTS_EXPORT ScreenMapper : public QObject
public: public:
enum MappingSignalBehavior { enum MappingSignalBehavior {
DelayedSignal = 0, DelayedSignal = 0,
ImmediateSignal ImmediateSignal,
}; };
static ScreenMapper *instance(); static ScreenMapper *instance();
......
...@@ -56,7 +56,7 @@ protected: ...@@ -56,7 +56,7 @@ protected:
LastTimeUsed = KActivities::ActivitiesModel::UserRole, LastTimeUsed = KActivities::ActivitiesModel::UserRole,
LastTimeUsedString = KActivities::ActivitiesModel::UserRole + 1, LastTimeUsedString = KActivities::ActivitiesModel::UserRole + 1,
WindowCount = KActivities::ActivitiesModel::UserRole + 2, WindowCount = KActivities::ActivitiesModel::UserRole + 2,
HasWindows = KActivities::ActivitiesModel::UserRole + 3 HasWindows = KActivities::ActivitiesModel::UserRole + 3,
}; };
public Q_SLOTS: public Q_SLOTS:
......
...@@ -86,7 +86,7 @@ private: ...@@ -86,7 +86,7 @@ private:
enum Direction { enum Direction {
Next, Next,
Previous Previous,
}; };
void switchToActivity(Direction i); void switchToActivity(Direction i);
......
...@@ -39,7 +39,7 @@ public: ...@@ -39,7 +39,7 @@ public:
enum Roles { enum Roles {
ApplicationIdRole = Qt::UserRole + 1, ApplicationIdRole = Qt::UserRole + 1,
BlockedApplicationRole BlockedApplicationRole,
}; };
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
......
...@@ -60,7 +60,7 @@ private: ...@@ -60,7 +60,7 @@ private:
enum WhatToRemember { enum WhatToRemember {
AllApplications = 0, AllApplications = 0,
SpecificApplications = 1, SpecificApplications = 1,
NoApplications = 2 NoApplications = 2,
}; };
D_PTR; D_PTR;
......
...@@ -39,7 +39,7 @@ public: ...@@ -39,7 +39,7 @@ public:
Enabled = Qt::UserRole + 1, Enabled = Qt::UserRole + 1,
Source, Source,
FileName, FileName,
OnlyInPlasma OnlyInPlasma,
}; };
enum AutostartEntrySource { enum AutostartEntrySource {
......
...@@ -114,7 +114,7 @@ private: ...@@ -114,7 +114,7 @@ private:
enum RepaintCache { enum RepaintCache {
RepaintNone, RepaintNone,
RepaintAll, RepaintAll,
RepaintHands RepaintHands,
}; };
RepaintCache m_repaintCache; RepaintCache m_repaintCache;
QPixmap m_faceCache; QPixmap m_faceCache;
......
...@@ -52,13 +52,13 @@ class JoyDevice ...@@ -52,13 +52,13 @@ class JoyDevice
ERR_GET_CORR, ERR_GET_CORR,
ERR_RESTORE_CORR, ERR_RESTORE_CORR,
ERR_INIT_CAL, ERR_INIT_CAL,
ERR_APPLY_CAL ERR_APPLY_CAL,
}; };
enum EventType enum EventType
{ {
BUTTON, BUTTON,
AXIS AXIS,
}; };
// devicefile to use, e.g. "/dev/js0" // devicefile to use, e.g. "/dev/js0"
......
...@@ -54,14 +54,14 @@ public: ...@@ -54,14 +54,14 @@ public:
enum ModuleType { enum ModuleType {
UnknownType = -1, UnknownType = -1,
AutostartType, AutostartType,
OnDemandType OnDemandType,
}; };
Q_ENUM(ModuleType) Q_ENUM(ModuleType)
enum ModuleStatus { enum ModuleStatus {
UnknownStatus = -1, UnknownStatus = -1,
NotRunning, NotRunning,
Running Running,
}; };
Q_ENUM(ModuleStatus) Q_ENUM(ModuleStatus)
......
...@@ -37,7 +37,7 @@ const double DEFAULT_REPEAT_RATE = 25.0; ...@@ -37,7 +37,7 @@ const double DEFAULT_REPEAT_RATE = 25.0;
enum KeyBehaviour { enum KeyBehaviour {
AccentMenu = 0, AccentMenu = 0,
RepeatKey = 1, RepeatKey = 1,
DoNothing = 2 DoNothing = 2,
}; };
const QMap<KeyBehaviour,QString> keybehaviourNames = { const QMap<KeyBehaviour,QString> keybehaviourNames = {
...@@ -47,7 +47,7 @@ const QMap<KeyBehaviour,QString> keybehaviourNames = { ...@@ -47,7 +47,7 @@ const QMap<KeyBehaviour,QString> keybehaviourNames = {
}; };
enum TriState { enum TriState {
STATE_ON = 0, STATE_OFF = 1, STATE_UNCHANGED = 2 STATE_ON = 0, STATE_OFF = 1, STATE_UNCHANGED = 2,
}; };
class TriStateHelper { class TriStateHelper {
......
...@@ -41,13 +41,13 @@ public: ...@@ -41,13 +41,13 @@ public:
SWITCH_POLICY_GLOBAL = 0, SWITCH_POLICY_GLOBAL = 0,
SWITCH_POLICY_DESKTOP = 1, SWITCH_POLICY_DESKTOP = 1,
SWITCH_POLICY_APPLICATION = 2, SWITCH_POLICY_APPLICATION = 2,
SWITCH_POLICY_WINDOW = 3 SWITCH_POLICY_WINDOW = 3,
}; };
enum IndicatorType { enum IndicatorType {
SHOW_LABEL = 0, SHOW_LABEL = 0,
SHOW_FLAG = 1, SHOW_FLAG = 1,
SHOW_LABEL_ON_FLAG = 2 SHOW_LABEL_ON_FLAG = 2,
}; };
QString keyboardModel; QString keyboardModel;
......
...@@ -45,7 +45,7 @@ public: ...@@ -45,7 +45,7 @@ public:
TopLeft = 1, TopLeft = 1,
TopRight = 3, TopRight = 3,
BottomLeft = 0, BottomLeft = 0,
BottomRight = 2 BottomRight = 2,
}; };
Q_ENUM(Level) Q_ENUM(Level)
constexpr static int levelCount = 4; constexpr static int levelCount = 4;
......
...@@ -61,7 +61,7 @@ public: ...@@ -61,7 +61,7 @@ public:
CheckedRole, CheckedRole,
PendingDeletionRole, PendingDeletionRole,
IsDefaultRole, IsDefaultRole,
SupportsMultipleKeysRole SupportsMultipleKeysRole,
}; };
Q_ENUM(Roles) Q_ENUM(Roles)
......
...@@ -39,7 +39,7 @@ public: ...@@ -39,7 +39,7 @@ public:
enum Roles { enum Roles {
PluginNameRole = Qt::UserRole +1, PluginNameRole = Qt::UserRole +1,
ScreenshotRole, ScreenshotRole,
DescriptionRole DescriptionRole,
}; };
KCMSplashScreen(QObject* parent, const QVariantList& args); KCMSplashScreen(QObject* parent, const QVariantList& args);
......
...@@ -25,7 +25,7 @@ class X11EvdevBackend; ...@@ -25,7 +25,7 @@ class X11EvdevBackend;
enum class Handed { enum class Handed {
Right = 0, Right = 0,
Left = 1, Left = 1,
NotSupported = -1 NotSupported = -1,
}; };
struct EvdevSettings struct EvdevSettings
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
enum class InputBackendMode { enum class InputBackendMode {
KWinWayland = 0, KWinWayland = 0,
XLibinput = 1, XLibinput = 1,
XEvdev = 2 XEvdev = 2,
}; };
class InputBackend : public QObject class InputBackend : public QObject
......
...@@ -68,13 +68,13 @@ public: ...@@ -68,13 +68,13 @@ public:
IsDefaultRole, IsDefaultRole,
EventIdRole, EventIdRole,
ActionsRole ActionsRole,
}; };
Q_ENUM(Roles) Q_ENUM(Roles)
enum Type { enum Type {
ApplicationType, ApplicationType,
ServiceType ServiceType,
}; };
Q_ENUM(Type) Q_ENUM(Type)
......
...@@ -41,7 +41,7 @@ class SearchConfigModule : public KCModule ...@@ -41,7 +41,7 @@ class SearchConfigModule : public KCModule
public: public:
enum Roles { enum Roles {
RunnersRole = Qt::UserRole + 1, RunnersRole = Qt::UserRole + 1,
DescriptionRole DescriptionRole,
}; };
SearchConfigModule(QWidget* parent, const QVariantList& args); SearchConfigModule(QWidget* parent, const QVariantList& args);
......
...@@ -188,7 +188,7 @@ SynapticsTouchpad::SynapticsTouchpad(Display *display, int deviceId): XlibTouchp ...@@ -188,7 +188,7 @@ SynapticsTouchpad::SynapticsTouchpad(Display *display, int deviceId): XlibTouchp
TouchpadThreeFingerDetect, TouchpadThreeFingerDetect,
TouchpadPressureDetect, TouchpadPressureDetect,
TouchpadPalmDetect, TouchpadPalmDetect,
TouchpadCapsCount TouchpadCapsCount,
}; };
QVector<bool> cap(TouchpadCapsCount, false); QVector<bool> cap(TouchpadCapsCount, false);
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
enum ParaType { enum ParaType {
PT_INT, PT_INT,
PT_BOOL, PT_BOOL,
PT_DOUBLE PT_DOUBLE,
}; };
struct Parameter { struct Parameter {
......
...@@ -28,7 +28,7 @@ enum class TouchpadInputBackendMode { ...@@ -28,7 +28,7 @@ enum class TouchpadInputBackendMode {
Unset = 0, Unset = 0,
WaylandLibinput = 1, WaylandLibinput = 1,
XLibinput = 2, XLibinput = 2,
XSynaptics = 3 XSynaptics = 3,
}; };
class Q_DECL_EXPORT TouchpadBackend : public QObject class Q_DECL_EXPORT TouchpadBackend : public QObject
...@@ -59,7 +59,7 @@ public: ...@@ -59,7 +59,7 @@ public:
virtual int touchpadCount() const {return 0;} virtual int touchpadCount() const {return 0;}
enum TouchpadOffState { enum TouchpadOffState {
TouchpadEnabled, TouchpadTapAndScrollDisabled, TouchpadFullyDisabled TouchpadEnabled, TouchpadTapAndScrollDisabled, TouchpadFullyDisabled,
}; };
virtual void setTouchpadOff(TouchpadOffState) {} virtual void setTouchpadOff(TouchpadOffState) {}
virtual TouchpadOffState getTouchpadOff() {return TouchpadFullyDisabled;} virtual TouchpadOffState getTouchpadOff() {return TouchpadFullyDisabled;}
......
...@@ -42,7 +42,7 @@ public: ...@@ -42,7 +42,7 @@ public:
PermissionDenied, PermissionDenied,
Failed, Failed,
Unknown, Unknown,
UserFacing UserFacing,
}; };
private: private:
......
...@@ -39,12 +39,12 @@ public: ...@@ -39,12 +39,12 @@ public:
enum DeviceType { enum DeviceType {
Attached, Attached,
Detatched Detatched,
}; };
enum { enum {
UdiRole = Qt::UserRole, UdiRole = Qt::UserRole,
TypeRole TypeRole,
}; };
Qt::ItemFlags flags(const QModelIndex &index) const override; Qt::ItemFlags flags(const QModelIndex &index) const override;
......
...@@ -31,7 +31,7 @@ class AutomounterSettings : public AutomounterSettingsBase { ...@@ -31,7 +31,7 @@ class AutomounterSettings : public AutomounterSettingsBase {
using AutomounterSettingsBase::AutomounterSettingsBase; using AutomounterSettingsBase::AutomounterSettingsBase;
enum AutomountType { enum AutomountType {
Login, Login,
Attach Attach,
}; };
KConfigGroup deviceSettings(const QString &udi); KConfigGroup deviceSettings(const QString &udi);
QStringList knownDevices(); QStringList knownDevices();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment