Commit 69b539f1 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Add trailing comma to enums

parent b5102fe5
......@@ -22,7 +22,12 @@ class AKONADITESTFAKE_EXPORT FakeAkonadiServerCommand : public QObject
{
Q_OBJECT
public:
enum Type { Notification, RespondToCollectionFetch, RespondToItemFetch, RespondToTagFetch };
enum Type {
Notification,
RespondToCollectionFetch,
RespondToItemFetch,
RespondToTagFetch,
};
FakeAkonadiServerCommand(Type type, FakeServerData *serverData);
......@@ -330,7 +335,10 @@ class AKONADITESTFAKE_EXPORT FakeJobResponse : public FakeAkonadiServerCommand
{
Q_OBJECT
struct Token {
enum Type { Branch, Leaf };
enum Type {
Branch,
Leaf,
};
Type type;
QString content;
};
......
......@@ -17,7 +17,10 @@ class AKONADITESTFAKE_EXPORT FakeSession : public Session
{
Q_OBJECT
public:
enum Mode { EndJobsImmediately, EndJobsManually };
enum Mode {
EndJobsImmediately,
EndJobsManually,
};
explicit FakeSession(const QByteArray &sessionId = QByteArray(), Mode mode = EndJobsImmediately, QObject *parent = nullptr);
......
......@@ -65,7 +65,12 @@ private Q_SLOTS:
private:
struct MessageStruct {
enum Position { Queued, FilterPipelined, Pipelined, Emitted };
enum Position {
Queued,
FilterPipelined,
Pipelined,
Emitted,
};
Position position;
};
QQueue<MessageStruct> m_messages;
......
......@@ -65,7 +65,12 @@ private Q_SLOTS:
private:
struct MessageStruct {
enum Position { Queued, FilterPipelined, Pipelined, Emitted };
enum Position {
Queued,
FilterPipelined,
Pipelined,
Emitted,
};
Position position;
};
QQueue<MessageStruct> m_messages;
......
......@@ -12,7 +12,16 @@
#include <QObject>
#include <QVariantList>
enum SignalType { NoSignal, RowsAboutToBeInserted, RowsInserted, RowsAboutToBeRemoved, RowsRemoved, RowsAboutToBeMoved, RowsMoved, DataChanged };
enum SignalType {
NoSignal,
RowsAboutToBeInserted,
RowsInserted,
RowsAboutToBeRemoved,
RowsRemoved,
RowsAboutToBeMoved,
RowsMoved,
DataChanged,
};
struct ExpectedSignal {
ExpectedSignal(SignalType type, int start, int end, const QVariantList &newData)
......
......@@ -32,7 +32,13 @@ class TestScenario
public:
typedef QList<TestScenario> List;
enum Action { ServerCmd, ClientCmd, Wait, Quit, Ignore };
enum Action {
ServerCmd,
ClientCmd,
Wait,
Quit,
Ignore,
};
Action action;
QByteArray data;
......
......@@ -33,7 +33,9 @@ class SubscriptionDialogTest : public QObject
Q_OBJECT
struct TestSetup {
enum { defaultCollectionCount = 7 };
enum {
defaultCollectionCount = 7,
};
TestSetup()
{
......
......@@ -29,7 +29,10 @@ class ImapSet;
class AKONADIAGENTBASE_EXPORT AgentSearchInterface
{
public:
enum ResultScope { Uid, Rid };
enum ResultScope {
Uid,
Rid,
};
/**
* Creates a new agent search interface.
......
......@@ -30,7 +30,10 @@ public:
* @li StopOnCrash - The application won't be restarted.
* @li RestartOnCrash - The application is restarted with the same arguments.
*/
enum CrashPolicy { StopOnCrash, RestartOnCrash };
enum CrashPolicy {
StopOnCrash,
RestartOnCrash,
};
/**
* Creates a new process control.
......
......@@ -33,7 +33,13 @@ using ChangeNotificationPtr = QSharedPointer<ChangeNotification>;
class AKONADICORE_EXPORT ChangeNotification
{
public:
enum Type { Items, Collection, Tag, Relation, Subscription };
enum Type {
Items,
Collection,
Tag,
Relation,
Subscription,
};
explicit ChangeNotification();
ChangeNotification(const ChangeNotification &other);
......
......@@ -19,7 +19,13 @@ namespace Akonadi
class AKONADI_TESTS_EXPORT ChangeRecorderJournalReader
{
public:
enum LegacyType { InvalidType, Item, Collection, Tag, Relation };
enum LegacyType {
InvalidType,
Item,
Collection,
Tag,
Relation,
};
// Ancient QSettings legacy store
static Protocol::ChangeNotificationPtr loadQSettingsNotification(QSettings *settings);
......@@ -27,7 +33,20 @@ public:
static QQueue<Protocol::ChangeNotificationPtr> loadFrom(QFile *device, bool &needsFullSave);
private:
enum LegacyOp { InvalidOp, Add, Modify, Move, Remove, Link, Unlink, Subscribe, Unsubscribe, ModifyFlags, ModifyTags, ModifyRelations };
enum LegacyOp {
InvalidOp,
Add,
Modify,
Move,
Remove,
Link,
Unlink,
Subscribe,
Unsubscribe,
ModifyFlags,
ModifyTags,
ModifyRelations,
};
static Protocol::ChangeNotificationPtr loadQSettingsItemNotification(QSettings *settings);
static Protocol::ChangeNotificationPtr loadQSettingsCollectionNotification(QSettings *settings);
......
......@@ -28,7 +28,10 @@ class AKONADICORE_EXPORT Connection : public QObject
Q_OBJECT
public:
enum ConnectionType { CommandConnection, NotificationConnection };
enum ConnectionType {
CommandConnection,
NotificationConnection,
};
Q_ENUM(ConnectionType)
explicit Connection(ConnectionType connType, const QByteArray &sessionId, CommandBuffer *commandBuffer, QObject *parent = nullptr);
......
......@@ -30,7 +30,11 @@ class Item;
class AKONADI_TESTS_EXPORT ItemSerializer
{
public:
enum PayloadStorage { Internal, External, Foreign };
enum PayloadStorage {
Internal,
External,
Foreign,
};
/** throws ItemSerializerException on failure */
static void deserialize(Item &item, const QByteArray &label, const QByteArray &data, int version, PayloadStorage storage);
......
......@@ -42,7 +42,10 @@ class AKONADICORE_EXPORT ItemSync : public Job
Q_OBJECT
public:
enum MergeMode { RIDMerge, GIDMerge };
enum MergeMode {
RIDMerge,
GIDMerge,
};
/**
* Creates a new item synchronizer.
......
......@@ -26,7 +26,12 @@ using ModifyItemsCommandPtr = QSharedPointer<ModifyItemsCommand>;
class AKONADICORE_EXPORT ItemModifyJobPrivate : public JobPrivate
{
public:
enum Operation { RemoteId, RemoteRevision, Gid, Dirty };
enum Operation {
RemoteId,
RemoteRevision,
Gid,
Dirty,
};
explicit ItemModifyJobPrivate(ItemModifyJob *parent);
......
......@@ -22,7 +22,13 @@ public:
{
}
enum TransactionState { Idle, Running, WaitingForSubjobs, RollingBack, Committing };
enum TransactionState {
Idle,
Running,
WaitingForSubjobs,
RollingBack,
Committing,
};
Q_DECLARE_PUBLIC(TransactionSequence)
......
......@@ -30,7 +30,10 @@ class AgentInstance;
struct Node {
using Id = qint64;
enum Type : char { Item, Collection };
enum Type : char {
Item,
Collection,
};
explicit Node(Type type, Id id, Akonadi::Collection::Id parentId)
: id(id)
......@@ -167,7 +170,10 @@ public:
~EntityTreeModelPrivate();
EntityTreeModel *const q_ptr;
enum RetrieveDepth { Base, Recursive };
enum RetrieveDepth {
Base,
Recursive,
};
void init(Monitor *monitor);
......
......@@ -68,7 +68,10 @@ inline uint qHash(SignalId sig)
class AKONADICORE_EXPORT MonitorPrivate
{
public:
enum ListenerAction { AddListener, RemoveListener };
enum ListenerAction {
AddListener,
RemoveListener,
};
MonitorPrivate(ChangeNotificationDependenciesFactory *dependenciesFactory_, Monitor *parent);
virtual ~MonitorPrivate();
......
......@@ -52,7 +52,11 @@ class ProtocolHelper
{
public:
/** Part namespaces. */
enum PartNamespace { PartGlobal, PartPayload, PartAttribute };
enum PartNamespace {
PartGlobal,
PartPayload,
PartAttribute,
};
/**
Parse a cache policy definition.
......
......@@ -25,9 +25,19 @@ namespace Akonadi
class AKONADICORE_EXPORT SearchTerm
{
public:
enum Relation { RelAnd, RelOr };
enum Relation {
RelAnd,
RelOr,
};
enum Condition { CondEqual, CondGreaterThan, CondGreaterOrEqual, CondLessThan, CondLessOrEqual, CondContains };
enum Condition {
CondEqual,
CondGreaterThan,
CondGreaterOrEqual,
CondLessThan,
CondLessOrEqual,
CondContains,
};
/**
* Constructs a term where all subterms will be in given relation
......
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