From 626dc1006ad7126c1c706cb8db192e844810a3a8 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Tue, 5 Nov 2024 23:35:14 +0100 Subject: [PATCH] Fix clang format --- core/backends/lan/compositeuploadjob.h | 7 ++++++- core/notificationserverinfo.h | 5 ++++- interfaces/commandsmodel.h | 6 +++++- interfaces/remotecommandsmodel.h | 6 +++++- interfaces/remotesinksmodel.h | 8 +++++++- plugins/battery/batteryplugin.h | 5 ++++- plugins/clipboard/clipboardlistener.h | 5 ++++- plugins/mousepad/x11remoteinput.cpp | 8 +++++++- 8 files changed, 42 insertions(+), 8 deletions(-) diff --git a/core/backends/lan/compositeuploadjob.h b/core/backends/lan/compositeuploadjob.h index 0dad09b0d..3ee13ff0d 100644 --- a/core/backends/lan/compositeuploadjob.h +++ b/core/backends/lan/compositeuploadjob.h @@ -34,7 +34,12 @@ protected: bool doKill() override; private: - enum { NoPortAvailable = UserDefinedError, SendingNetworkPacketFailed, SocketError, SslError }; + enum { + NoPortAvailable = UserDefinedError, + SendingNetworkPacketFailed, + SocketError, + SslError, + }; Server *const m_server; QSslSocket *m_socket; diff --git a/core/notificationserverinfo.h b/core/notificationserverinfo.h index 653e6f8d9..9da0555ec 100644 --- a/core/notificationserverinfo.h +++ b/core/notificationserverinfo.h @@ -14,7 +14,10 @@ class KDECONNECTCORE_EXPORT NotificationServerInfo : public QObject Q_OBJECT public: - enum Hint { X_KDE_DISPLAY_APPNAME = 1, X_KDE_ORIGIN_NAME = 2 }; + enum Hint { + X_KDE_DISPLAY_APPNAME = 1, + X_KDE_ORIGIN_NAME = 2, + }; Q_DECLARE_FLAGS(Hints, Hint) diff --git a/interfaces/commandsmodel.h b/interfaces/commandsmodel.h index 6bc262b36..ee86d7b49 100644 --- a/interfaces/commandsmodel.h +++ b/interfaces/commandsmodel.h @@ -23,7 +23,11 @@ class KDECONNECTINTERFACES_EXPORT CommandsModel : public QAbstractListModel Q_PROPERTY(QString deviceId READ deviceId WRITE setDeviceId NOTIFY deviceIdChanged) public: - enum ModelRoles { KeyRole, NameRole, CommandRole }; + enum ModelRoles { + KeyRole, + NameRole, + CommandRole, + }; explicit CommandsModel(QObject *parent = nullptr); ~CommandsModel() override; diff --git a/interfaces/remotecommandsmodel.h b/interfaces/remotecommandsmodel.h index 721521851..52fe6f840 100644 --- a/interfaces/remotecommandsmodel.h +++ b/interfaces/remotecommandsmodel.h @@ -23,7 +23,11 @@ class KDECONNECTINTERFACES_EXPORT RemoteCommandsModel : public QAbstractListMode Q_PROPERTY(QString deviceId READ deviceId WRITE setDeviceId NOTIFY deviceIdChanged) public: - enum ModelRoles { KeyRole, NameRole, CommandRole }; + enum ModelRoles { + KeyRole, + NameRole, + CommandRole, + }; explicit RemoteCommandsModel(QObject *parent = nullptr); ~RemoteCommandsModel() override; diff --git a/interfaces/remotesinksmodel.h b/interfaces/remotesinksmodel.h index b2bb8723f..d501f831a 100644 --- a/interfaces/remotesinksmodel.h +++ b/interfaces/remotesinksmodel.h @@ -25,7 +25,13 @@ class KDECONNECTINTERFACES_EXPORT RemoteSinksModel : public QAbstractListModel Q_PROPERTY(QString deviceId READ deviceId WRITE setDeviceId NOTIFY deviceIdChanged) public: - enum ModelRoles { NameRole, DescriptionRole, MaxVolumeRole, VolumeRole, MutedRole }; + enum ModelRoles { + NameRole, + DescriptionRole, + MaxVolumeRole, + VolumeRole, + MutedRole, + }; explicit RemoteSinksModel(QObject *parent = nullptr); ~RemoteSinksModel() override; diff --git a/plugins/battery/batteryplugin.h b/plugins/battery/batteryplugin.h index 745d64f36..df0531c20 100644 --- a/plugins/battery/batteryplugin.h +++ b/plugins/battery/batteryplugin.h @@ -36,7 +36,10 @@ private: // Keep these values in sync with THRESHOLD* constants in // kdeconnect-android:BatteryPlugin.java // see README for their meaning - enum ThresholdBatteryEvent { ThresholdNone = 0, ThresholdBatteryLow = 1 }; + enum ThresholdBatteryEvent { + ThresholdNone = 0, + ThresholdBatteryLow = 1, + }; int m_charge = -1; bool m_isCharging = false; diff --git a/plugins/clipboard/clipboardlistener.h b/plugins/clipboard/clipboardlistener.h index dbe460cb6..ed8bba5e2 100644 --- a/plugins/clipboard/clipboardlistener.h +++ b/plugins/clipboard/clipboardlistener.h @@ -24,7 +24,10 @@ class ClipboardListener : public QObject Q_OBJECT public: - enum ClipboardContentType { ClipboardContentTypeUnknown = 0, ClipboardContentTypePassword = 1 }; + enum ClipboardContentType { + ClipboardContentTypeUnknown = 0, + ClipboardContentTypePassword = 1, + }; protected: ClipboardListener(); diff --git a/plugins/mousepad/x11remoteinput.cpp b/plugins/mousepad/x11remoteinput.cpp index be42409ef..c6af80155 100644 --- a/plugins/mousepad/x11remoteinput.cpp +++ b/plugins/mousepad/x11remoteinput.cpp @@ -15,7 +15,13 @@ #include #include -enum MouseButtons { LeftMouseButton = 1, MiddleMouseButton = 2, RightMouseButton = 3, MouseWheelUp = 4, MouseWheelDown = 5 }; +enum MouseButtons { + LeftMouseButton = 1, + MiddleMouseButton = 2, + RightMouseButton = 3, + MouseWheelUp = 4, + MouseWheelDown = 5, +}; // Translation table to keep in sync within all the implementations int SpecialKeysMap[] = {