Commit b7869bf2 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Add trailing commas to enums

We do this sometimes, but not consistenly.

The benefit is twofold.
First it improves the diff when adding new values since no existing line needs to be touched.
Second it prevents clang-format from collapsing the definition into a single line, which is undesired for large enums.
parent 7f5d8768
......@@ -43,7 +43,7 @@ class AppMenuApplet : public Plasma::Applet
public:
enum ViewType {
FullView,
CompactView
CompactView,
};
explicit AppMenuApplet(QObject *parent, const QVariantList &data);
......
......@@ -49,7 +49,7 @@ public:
enum AppMenuRole {
MenuRole = Qt::UserRole+1, // TODO this should be Qt::DisplayRole
ActionRole
ActionRole,
};
QVariant data(const QModelIndex &index, int role) const override;
......
......@@ -68,7 +68,7 @@ public:
CityRole,
CommentRole,
CheckedRole,
IsLocalTimeZoneRole
IsLocalTimeZoneRole,
};
int rowCount(const QModelIndex &parent) const override;
......
......@@ -41,7 +41,7 @@ enum {
HasActionListRole,
ActionListRole,
UrlRole,
DisabledRole
DisabledRole,
};
QVariantMap createActionItem(const QString &label, const QString &icon, const QString &actionId, const QVariant &argument = QVariant());
......
......@@ -35,7 +35,7 @@ class AppEntry : public AbstractEntry
NameOnly = 0,
GenericNameOnly,
NameAndGenericName,
GenericNameAndName
GenericNameAndName,
};
explicit AppEntry(AbstractModel *owner, KService::Ptr service, NameFormat nameFormat);
......
......@@ -35,7 +35,7 @@ class ContainmentInterface : public QObject
enum Target {
Desktop = 0,
Panel,
TaskManager
TaskManager,
};
Q_ENUM(Target)
......
......@@ -72,7 +72,7 @@ class RecentUsageModel : public ForwardingModel, public QQmlParserStatus
enum IncludeUsage {
AppsAndDocs,
OnlyApps,
OnlyDocs
OnlyDocs,
};
Q_ENUM(IncludeUsage)
......
......@@ -41,7 +41,7 @@ class SystemEntry : public QObject, public AbstractEntry
Suspend,
Hibernate,
Reboot,
Shutdown
Shutdown,
};
explicit SystemEntry(AbstractModel *owner, Action action);
......
......@@ -27,7 +27,7 @@ class SortedSystemTrayModel : public QSortFilterProxyModel {
public:
enum class SortingType {
ConfigurationPage,
SystemTray
SystemTray,
};
explicit SortedSystemTrayModel(SortingType sorting, QObject *parent = nullptr);
......
......@@ -51,7 +51,7 @@ public:
Category,
Status,
EffectiveStatus,
LastBaseRole
LastBaseRole,
};
explicit BaseModel(QPointer<SystemTraySettings> settings, QObject *parent = nullptr);
......@@ -81,7 +81,7 @@ class PlasmoidModel: public BaseModel
public:
enum class Role {
Applet = static_cast<int>(BaseModel::BaseRole::LastBaseRole) + 1,
HasApplet
HasApplet,
};
explicit PlasmoidModel(QPointer<SystemTraySettings> settings, QPointer<PlasmoidRegistry> plasmoidRegistry, QObject *parent = nullptr);
......@@ -134,7 +134,7 @@ public:
Title,
ToolTipSubTitle,
ToolTipTitle,
WindowId
WindowId,
};
StatusNotifierModel(QPointer<SystemTraySettings> settings, QObject* parent = nullptr);
......
......@@ -82,7 +82,7 @@ public:
LeftToRight,
RightToLeft,
TopToBottom,
BottomToTop
BottomToTop,
};
Q_ENUM(PreferredLayoutDirection)
......
......@@ -79,7 +79,7 @@ public:
Manual = AppletsLayout::EditModeCondition::Manual,
AfterPressAndHold = AppletsLayout::EditModeCondition::AfterPressAndHold,
AfterPress,
AfterMouseOver
AfterMouseOver,
};
Q_ENUMS(EditModeCondition)
......
......@@ -39,7 +39,7 @@ public:
Right,
BottomRight,
Bottom,
BottomLeft
BottomLeft,
};
Q_ENUMS(Corner)
......
......@@ -72,7 +72,7 @@ public:
VtNumber,
Session,
IsTty,
IconName //name of an icon
IconName, //name of an icon
};
bool canSwitchUser() const;
......
......@@ -57,7 +57,7 @@ public:
enum ConsoleMode {
PlasmaConsole,
KWinConsole
KWinConsole,
};
void setMode(const QString &mode);
......
......@@ -92,7 +92,7 @@ public:
enum Roles {
FilterTypeRole = Qt::UserRole+1,
FilterDataRole = Qt::UserRole+2,
SeparatorRole = Qt::UserRole+3
SeparatorRole = Qt::UserRole+3,
};
explicit DefaultFilterModel(QObject *parent = nullptr);
......
......@@ -80,7 +80,7 @@ public:
EmailRole = Qt::UserRole+9,
RunningRole = Qt::UserRole+10,
LocalRole = Qt::UserRole+11,
ScreenshotRole = Qt::UserRole+12
ScreenshotRole = Qt::UserRole+12,
};
explicit PlasmaAppletItemModel(QObject * parent = nullptr);
......
......@@ -59,7 +59,7 @@ class SwitchWindow : public Plasma::ContainmentActions
enum MenuMode {
AllFlat = 0,
DesktopSubmenus,
CurrentDesktop
CurrentDesktop,
};
QList<QAction *> m_actions;
......
......@@ -58,7 +58,7 @@ private:
enum class SolidReplyType {
Setup,
Teardown,
Eject
Eject,
};
void onSolidReply(SolidReplyType type, Solid::ErrorType error, const QVariant &errorData, const QString &udi);
......
......@@ -55,7 +55,7 @@ public:
/**
* The operation name is unknown
*/
UnknownOperation
UnknownOperation,
};
void start() override;
......
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