Expand enums to multiple lines

Most of our enum declaratons are on multiple lines, but not all of them.

Expand the remaining ones to be consistent
wilder-5.22
Nicolas Fella 5 years ago
parent 8b1ba47dec
commit 7f5d8768c1
  1. 6
      applets/kicker/plugin/abstractentry.h
  2. 5
      applets/kicker/plugin/recentusagemodel.h
  3. 13
      dataengines/filebrowser/filebrowserengine.h
  4. 6
      dataengines/geolocation/geolocationprovider.h
  5. 5
      dataengines/soliddevice/hddtemp.h
  6. 65
      dataengines/weather/ions/ion.h
  7. 5
      kcms/cursortheme/xcursor/thememodel.h
  8. 5
      kioslave/applications/kio_applications.cpp
  9. 5
      klipper/klipper.h
  10. 6
      ksmserver/server.h
  11. 10
      libkworkspace/kdisplaymanager.cpp
  12. 6
      runners/kill/config_keys.h
  13. 7
      runners/sessions/sessionrunner.h

@ -32,7 +32,11 @@ class AbstractEntry
explicit AbstractEntry(AbstractModel *owner); explicit AbstractEntry(AbstractModel *owner);
virtual ~AbstractEntry(); virtual ~AbstractEntry();
enum EntryType { RunnableType, GroupType, SeparatorType }; enum EntryType {
RunnableType,
GroupType,
SeparatorType,
};
virtual EntryType type() const = 0; virtual EntryType type() const = 0;

@ -76,7 +76,10 @@ class RecentUsageModel : public ForwardingModel, public QQmlParserStatus
}; };
Q_ENUM(IncludeUsage) Q_ENUM(IncludeUsage)
enum Ordering { Recent, Popular }; enum Ordering {
Recent,
Popular,
};
explicit RecentUsageModel( explicit RecentUsageModel(
QObject *parent = nullptr, QObject *parent = nullptr,

@ -45,8 +45,17 @@ protected Q_SLOTS:
void dirDeleted(const QString &path); void dirDeleted(const QString &path);
private: private:
enum EventType {INIT, DIRTY, CREATED, DELETED}; enum EventType {
enum ObjectType {NOTHING, FILE, DIRECTORY}; INIT,
DIRTY,
CREATED,
DELETED,
};
enum ObjectType {
NOTHING,
FILE,
DIRECTORY,
};
KDirWatch * m_dirWatch; KDirWatch * m_dirWatch;
void updateData(const QString &path, EventType event); void updateData(const QString &path, EventType event);

@ -33,7 +33,11 @@ class GEOLOCATION_EXPORT GeolocationProvider : public QObject
Q_OBJECT Q_OBJECT
public: public:
enum UpdateTrigger { ForcedUpdate = 0, SourceEvent = 1, NetworkConnected = 2 }; enum UpdateTrigger {
ForcedUpdate = 0,
SourceEvent = 1,
NetworkConnected = 2,
};
Q_DECLARE_FLAGS(UpdateTriggers, UpdateTrigger) Q_DECLARE_FLAGS(UpdateTriggers, UpdateTrigger)
explicit GeolocationProvider(QObject *parent = nullptr, const QVariantList &args = QVariantList()); explicit GeolocationProvider(QObject *parent = nullptr, const QVariantList &args = QVariantList());

@ -33,7 +33,10 @@ class HddTemp : public QObject
Q_OBJECT Q_OBJECT
public: public:
enum DataType {Temperature=0, Unit}; enum DataType {
Temperature=0,
Unit,
};
explicit HddTemp(QObject *parent = nullptr); explicit HddTemp(QObject *parent = nullptr);
~HddTemp() override; ~HddTemp() override;

@ -119,15 +119,62 @@ class ION_EXPORT IonInterface : public Plasma::DataEngine
public: public:
enum ConditionIcons { ClearDay = 1, ClearWindyDay, FewCloudsDay, FewCloudsWindyDay, PartlyCloudyDay, PartlyCloudyWindyDay, Overcast, OvercastWindy, enum ConditionIcons {
Rain, LightRain, Showers, ChanceShowersDay, Thunderstorm, Hail, ClearDay = 1,
Snow, LightSnow, Flurries, FewCloudsNight, FewCloudsWindyNight, ChanceShowersNight, ClearWindyDay,
PartlyCloudyNight, PartlyCloudyWindyNight, ClearNight, ClearWindyNight, Mist, Haze, FreezingRain, FewCloudsDay,
RainSnow, FreezingDrizzle, ChanceThunderstormDay, ChanceThunderstormNight, FewCloudsWindyDay,
ChanceSnowDay, ChanceSnowNight, NotAvailable PartlyCloudyDay,
}; PartlyCloudyWindyDay,
Overcast,
enum WindDirections { N, NNE, NE, ENE, E, SSE, SE, ESE, S, NNW, NW, WNW, W, SSW, SW, WSW, VR }; OvercastWindy,
Rain,
LightRain,
Showers,
ChanceShowersDay,
Thunderstorm,
Hail,
Snow,
LightSnow,
Flurries,
FewCloudsNight,
FewCloudsWindyNight,
ChanceShowersNight,
PartlyCloudyNight,
PartlyCloudyWindyNight,
ClearNight,
ClearWindyNight,
Mist,
Haze,
FreezingRain,
RainSnow,
FreezingDrizzle,
ChanceThunderstormDay,
ChanceThunderstormNight,
ChanceSnowDay,
ChanceSnowNight,
NotAvailable,
};
enum WindDirections {
N,
NNE,
NE,
ENE,
E,
SSE,
SE,
ESE,
S,
NNW,
NW,
WNW,
W,
SSW,
SW,
WSW,
VR,
};
/** /**
* Constructor for the ion * Constructor for the ion

@ -27,7 +27,10 @@ class QDir;
class CursorTheme; class CursorTheme;
// The two TableView/TreeView columns provided by the model // The two TableView/TreeView columns provided by the model
enum Columns { NameColumn = 0, DescColumn }; enum Columns {
NameColumn = 0,
DescColumn,
};
/** /**

@ -30,7 +30,10 @@
class ApplicationsProtocol : public KIO::SlaveBase class ApplicationsProtocol : public KIO::SlaveBase
{ {
public: public:
enum RunMode { ProgramsMode, ApplicationsMode }; enum RunMode {
ProgramsMode,
ApplicationsMode,
};
ApplicationsProtocol(const QByteArray &protocol, const QByteArray &pool, const QByteArray &app); ApplicationsProtocol(const QByteArray &protocol, const QByteArray &pool, const QByteArray &app);
~ApplicationsProtocol() override; ~ApplicationsProtocol() override;
void get( const QUrl& url ) override; void get( const QUrl& url ) override;

@ -98,7 +98,10 @@ protected:
* Don't use 1, as I use that as a guard against passing * Don't use 1, as I use that as a guard against passing
* a boolean true as a mode. * a boolean true as a mode.
*/ */
enum SelectionMode { Clipboard = 2, Selection = 4 }; enum SelectionMode {
Clipboard = 2,
Selection = 4,
};
enum class ClipboardUpdateReason { enum class ClipboardUpdateReason {
UpdateClipboard, UpdateClipboard,
PreventEmptyClipboard PreventEmptyClipboard

@ -64,7 +64,11 @@ class KSMClient;
class OrgKdeKWinSessionInterface; class OrgKdeKWinSessionInterface;
enum SMType { SM_ERROR, SM_WMCOMMAND, SM_WMSAVEYOURSELF }; enum SMType {
SM_ERROR,
SM_WMCOMMAND,
SM_WMSAVEYOURSELF,
};
struct SMData struct SMData
{ {
SMType type; SMType type;

@ -278,7 +278,15 @@ public:
QDBusConnection::systemBus()) {} QDBusConnection::systemBus()) {}
}; };
static enum { Dunno, NoDM, NewKDM, OldKDM, NewGDM, OldGDM, LightDM } DMType = Dunno; static enum {
Dunno,
NoDM,
NewKDM,
OldKDM,
NewGDM,
OldGDM,
LightDM,
} DMType = Dunno;
static const char *ctl, *dpy; static const char *ctl, *dpy;
class KDisplayManager::Private class KDisplayManager::Private

@ -27,6 +27,10 @@ static const char CONFIG_TRIGGERWORD[] = "triggerWord";
static const char CONFIG_SORTING[] = "sorting"; static const char CONFIG_SORTING[] = "sorting";
/** Possibilities to sort */ /** Possibilities to sort */
enum Sort {NONE = 0, CPU, CPUI}; enum Sort {
NONE = 0,
CPU,
CPUI,
};
#endif #endif

@ -39,7 +39,12 @@ class SessionRunner : public Plasma::AbstractRunner
void match(Plasma::RunnerContext &context) override; void match(Plasma::RunnerContext &context) override;
void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &action) override; void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &action) override;
enum { LogoutAction = 1, ShutdownAction, RestartAction, LockAction }; enum {
LogoutAction = 1,
ShutdownAction,
RestartAction,
LockAction,
};
private: private:
void matchCommands(QList<Plasma::QueryMatch> &matches, const QString& term); void matchCommands(QList<Plasma::QueryMatch> &matches, const QString& term);

Loading…
Cancel
Save