From 75a8db1ec566a59da91ea7f5baf1e7e3a5d1f9da Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Fri, 21 Jul 2023 20:22:59 +0200 Subject: [PATCH] Use pragma once in plugins For non-library code, this is simpler and more concise --- plugins/battery/batteryplugin.h | 5 +---- plugins/bigscreen/bigscreenplugin.h | 5 +---- plugins/clipboard/clipboard_config.h | 5 +---- plugins/clipboard/clipboardlistener.h | 5 +---- plugins/clipboard/clipboardplugin.h | 5 +---- plugins/connectivity-report/connectivity_reportplugin.h | 5 +---- plugins/contacts/contactsplugin.h | 5 +---- plugins/findmyphone/findmyphoneplugin.h | 5 +---- plugins/findthisdevice/findthisdevice_config.h | 5 +---- plugins/findthisdevice/findthisdeviceplugin.h | 5 +---- plugins/lockdevice/lockdeviceplugin-win.h | 5 +---- plugins/lockdevice/lockdeviceplugin.h | 5 +---- plugins/mmtelephony/mmtelephonyplugin.h | 5 +---- plugins/mousepad/abstractremoteinput.h | 5 +---- plugins/mousepad/macosremoteinput.h | 5 +---- plugins/mousepad/mousepadplugin.h | 5 +---- plugins/mousepad/waylandremoteinput.h | 5 +---- plugins/mousepad/windowsremoteinput.h | 5 +---- plugins/mousepad/x11remoteinput.h | 5 +---- plugins/mpriscontrol/mpriscontrolplugin-win.h | 4 +--- plugins/mpriscontrol/mpriscontrolplugin.h | 5 +---- plugins/mprisremote/mprisremoteplugin.h | 5 +---- plugins/notifications/notification.h | 5 +---- plugins/notifications/notificationsplugin.h | 5 +---- plugins/notifications/sendreplydialog.h | 5 +---- plugins/pausemusic/pausemusic_config.h | 5 +---- plugins/pausemusic/pausemusicplugin-win.h | 5 +---- plugins/pausemusic/pausemusicplugin.h | 5 +---- plugins/photo/photoplugin.h | 5 +---- plugins/ping/pingplugin.h | 5 +---- plugins/presenter/presenterplugin.h | 5 +---- plugins/remotecommands/remotecommandsplugin.h | 5 +---- plugins/remotecontrol/remotecontrolplugin.h | 5 +---- plugins/remotekeyboard/remotekeyboardplugin.h | 5 +---- plugins/remotesystemvolume/remotesystemvolumeplugin.h | 5 +---- plugins/runcommand/runcommand_config.h | 5 +---- plugins/runcommand/runcommandplugin.h | 5 +---- plugins/screensaver-inhibit/screensaverinhibitplugin-macos.h | 5 +---- plugins/screensaver-inhibit/screensaverinhibitplugin-win.h | 5 +---- plugins/screensaver-inhibit/screensaverinhibitplugin.h | 5 +---- plugins/sendnotifications/notificationslistener.h | 5 +---- plugins/sendnotifications/notifyingapplication.h | 5 +---- plugins/sendnotifications/notifyingapplicationmodel.h | 5 +---- plugins/sendnotifications/sendnotifications_config.h | 5 +---- plugins/sendnotifications/sendnotificationsplugin.h | 5 +---- plugins/sftp/mounter.h | 5 +---- plugins/sftp/mountloop.h | 5 +---- plugins/sftp/sftpplugin-win.h | 5 +---- plugins/sftp/sftpplugin.h | 5 +---- plugins/share/share_config.h | 5 +---- plugins/share/shareplugin.h | 4 +--- plugins/sms/conversationsdbusinterface.h | 5 +---- plugins/sms/requestconversationworker.h | 5 +---- plugins/sms/smsplugin.h | 5 +---- plugins/systemvolume/systemvolumeplugin-macos.h | 5 +---- plugins/systemvolume/systemvolumeplugin-pulse.h | 5 +---- plugins/systemvolume/systemvolumeplugin-win.h | 5 +---- plugins/telephony/telephonyplugin.h | 5 +---- plugins/virtualmonitor/virtualmonitorplugin.h | 5 +---- 59 files changed, 59 insertions(+), 234 deletions(-) diff --git a/plugins/battery/batteryplugin.h b/plugins/battery/batteryplugin.h index 728cdd833..bba477ec5 100644 --- a/plugins/battery/batteryplugin.h +++ b/plugins/battery/batteryplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef BATTERYPLUGIN_H -#define BATTERYPLUGIN_H +#pragma once #include @@ -42,5 +41,3 @@ private: int m_charge = -1; bool m_isCharging = false; }; - -#endif diff --git a/plugins/bigscreen/bigscreenplugin.h b/plugins/bigscreen/bigscreenplugin.h index d1e135596..9f7c47725 100644 --- a/plugins/bigscreen/bigscreenplugin.h +++ b/plugins/bigscreen/bigscreenplugin.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef BIGSCREENPLUGIN_H -#define BIGSCREENPLUGIN_H +#pragma once #include @@ -26,5 +25,3 @@ public: Q_SIGNALS: Q_SCRIPTABLE void messageReceived(const QString &message); }; - -#endif diff --git a/plugins/clipboard/clipboard_config.h b/plugins/clipboard/clipboard_config.h index 7624d3603..95ab27778 100644 --- a/plugins/clipboard/clipboard_config.h +++ b/plugins/clipboard/clipboard_config.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef CLIPBOARD_CONFIG_H -#define CLIPBOARD_CONFIG_H +#pragma once #include "kcmplugin/kdeconnectpluginkcm.h" @@ -29,5 +28,3 @@ private: void autoShareChanged(); Ui::ClipboardConfigUi *m_ui; }; - -#endif diff --git a/plugins/clipboard/clipboardlistener.h b/plugins/clipboard/clipboardlistener.h index e84d8a72e..dbe460cb6 100644 --- a/plugins/clipboard/clipboardlistener.h +++ b/plugins/clipboard/clipboardlistener.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef CLIPBOARDLISTENER_H -#define CLIPBOARDLISTENER_H +#pragma once #include #include @@ -56,5 +55,3 @@ private: #endif KSystemClipboard *clipboard; }; - -#endif diff --git a/plugins/clipboard/clipboardplugin.h b/plugins/clipboard/clipboardplugin.h index 4da26b566..c350c9224 100644 --- a/plugins/clipboard/clipboardplugin.h +++ b/plugins/clipboard/clipboardplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef CLIPBOARDPLUGIN_H -#define CLIPBOARDPLUGIN_H +#pragma once #include #include @@ -66,5 +65,3 @@ private: bool autoShare; bool sharePasswords; }; - -#endif diff --git a/plugins/connectivity-report/connectivity_reportplugin.h b/plugins/connectivity-report/connectivity_reportplugin.h index f1adff5d7..13a601a9a 100644 --- a/plugins/connectivity-report/connectivity_reportplugin.h +++ b/plugins/connectivity-report/connectivity_reportplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef CONNECTIVITY_REPORT_H -#define CONNECTIVITY_REPORT_H +#pragma once #include @@ -55,5 +54,3 @@ private: QString m_cellularNetworkType; int m_cellularNetworkStrength = -1; }; - -#endif diff --git a/plugins/contacts/contactsplugin.h b/plugins/contacts/contactsplugin.h index 5d2eca697..0016e2758 100644 --- a/plugins/contacts/contactsplugin.h +++ b/plugins/contacts/contactsplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef CONTACTSPLUGIN_H -#define CONTACTSPLUGIN_H +#pragma once class QObject; #include @@ -147,5 +146,3 @@ protected: */ bool sendRequestWithIDs(const QString &packetType, const uIDList_t &uIDs); }; - -#endif // CONTACTSPLUGIN_H diff --git a/plugins/findmyphone/findmyphoneplugin.h b/plugins/findmyphone/findmyphoneplugin.h index bd603ca47..89c7be0b4 100644 --- a/plugins/findmyphone/findmyphoneplugin.h +++ b/plugins/findmyphone/findmyphoneplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef FINDMYPHONEPLUGIN_H -#define FINDMYPHONEPLUGIN_H +#pragma once #include @@ -26,5 +25,3 @@ public: QString dbusPath() const override; bool receivePacket(const NetworkPacket &np) override; }; - -#endif // FINDMYPHONEPLUGIN_H diff --git a/plugins/findthisdevice/findthisdevice_config.h b/plugins/findthisdevice/findthisdevice_config.h index c86759c3d..7406387b0 100644 --- a/plugins/findthisdevice/findthisdevice_config.h +++ b/plugins/findthisdevice/findthisdevice_config.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef FINDTHISDEVICE_CONFIG_H -#define FINDTHISDEVICE_CONFIG_H +#pragma once #include @@ -29,5 +28,3 @@ private: void playSound(const QUrl &soundUrl); Ui::FindThisDeviceConfigUi *m_ui; }; - -#endif diff --git a/plugins/findthisdevice/findthisdeviceplugin.h b/plugins/findthisdevice/findthisdeviceplugin.h index 197b50205..366087bbe 100644 --- a/plugins/findthisdevice/findthisdeviceplugin.h +++ b/plugins/findthisdevice/findthisdeviceplugin.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef FINDTHISDEVICEPLUGIN_H -#define FINDTHISDEVICEPLUGIN_H +#pragma once #include @@ -63,5 +62,3 @@ inline QString defaultSound() } return soundURL.toLocalFile(); } - -#endif // FINDTHISDEVICEPLUGIN_H diff --git a/plugins/lockdevice/lockdeviceplugin-win.h b/plugins/lockdevice/lockdeviceplugin-win.h index f6c18da33..06a46f67b 100644 --- a/plugins/lockdevice/lockdeviceplugin-win.h +++ b/plugins/lockdevice/lockdeviceplugin-win.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef LOCKDEVICEPLUGIN_WIN_H -#define LOCKDEVICEPLUGIN_WIN_H +#pragma once #include @@ -39,5 +38,3 @@ private: bool m_remoteLocked = false; bool m_localLocked = false; }; - -#endif // LOCKDEVICEPLUGIN_WIN_H diff --git a/plugins/lockdevice/lockdeviceplugin.h b/plugins/lockdevice/lockdeviceplugin.h index ff08fcc23..7144c7719 100644 --- a/plugins/lockdevice/lockdeviceplugin.h +++ b/plugins/lockdevice/lockdeviceplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef LOCKDEVICEPLUGIN_H -#define LOCKDEVICEPLUGIN_H +#pragma once #include @@ -45,5 +44,3 @@ private: OrgFreedesktopLogin1SessionInterface m_login1Interface; OrgFreedesktopDBusPropertiesInterface m_propertiesInterface; }; - -#endif diff --git a/plugins/mmtelephony/mmtelephonyplugin.h b/plugins/mmtelephony/mmtelephonyplugin.h index aca07efbb..f01ac6fc1 100644 --- a/plugins/mmtelephony/mmtelephonyplugin.h +++ b/plugins/mmtelephony/mmtelephonyplugin.h @@ -7,8 +7,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef TELEPHONYPLUGIN_H -#define TELEPHONYPLUGIN_H +#pragma once #include #include @@ -50,5 +49,3 @@ private: void sendCancelMMTelephonyPacket(ModemManager::Call *call, const QString &lastState); static QString stateName(MMCallState state); }; - -#endif diff --git a/plugins/mousepad/abstractremoteinput.h b/plugins/mousepad/abstractremoteinput.h index 2c4f07ea0..7cdc9152b 100644 --- a/plugins/mousepad/abstractremoteinput.h +++ b/plugins/mousepad/abstractremoteinput.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef ABSTRACTREMOTEINPUT_H -#define ABSTRACTREMOTEINPUT_H +#pragma once #include #include @@ -26,5 +25,3 @@ public: return false; }; }; - -#endif diff --git a/plugins/mousepad/macosremoteinput.h b/plugins/mousepad/macosremoteinput.h index 1bf743d7d..2806e0869 100644 --- a/plugins/mousepad/macosremoteinput.h +++ b/plugins/mousepad/macosremoteinput.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef MACOSREMOTEINPUT_H -#define MACOSREMOTEINPUT_H +#pragma once #include "abstractremoteinput.h" @@ -19,5 +18,3 @@ public: bool handlePacket(const NetworkPacket &np) override; bool hasKeyboardSupport() override; }; - -#endif diff --git a/plugins/mousepad/mousepadplugin.h b/plugins/mousepad/mousepadplugin.h index d62531b19..8c2b7404c 100644 --- a/plugins/mousepad/mousepadplugin.h +++ b/plugins/mousepad/mousepadplugin.h @@ -6,8 +6,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef MOUSEPADPLUGIN_H -#define MOUSEPADPLUGIN_H +#pragma once #include #include @@ -30,5 +29,3 @@ public: private: AbstractRemoteInput *m_impl; }; - -#endif diff --git a/plugins/mousepad/waylandremoteinput.h b/plugins/mousepad/waylandremoteinput.h index de9e4fff7..4605ade4e 100644 --- a/plugins/mousepad/waylandremoteinput.h +++ b/plugins/mousepad/waylandremoteinput.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef WAYLANDREMOTEINPUT_H -#define WAYLANDREMOTEINPUT_H +#pragma once #include "abstractremoteinput.h" #include "xdp_dbus_remotedesktop_interface.h" @@ -49,5 +48,3 @@ public: return true; } }; - -#endif diff --git a/plugins/mousepad/windowsremoteinput.h b/plugins/mousepad/windowsremoteinput.h index 4036a2e01..cbab43748 100644 --- a/plugins/mousepad/windowsremoteinput.h +++ b/plugins/mousepad/windowsremoteinput.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef WINDOWSREMOTEINPUT_H -#define WINDOWSREMOTEINPUT_H +#pragma once #include "abstractremoteinput.h" @@ -19,5 +18,3 @@ public: bool handlePacket(const NetworkPacket &np) override; bool hasKeyboardSupport() override; }; - -#endif diff --git a/plugins/mousepad/x11remoteinput.h b/plugins/mousepad/x11remoteinput.h index 0a11de7df..cb3edb914 100644 --- a/plugins/mousepad/x11remoteinput.h +++ b/plugins/mousepad/x11remoteinput.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef X11REMOTEINPUT_H -#define X11REMOTEINPUT_H +#pragma once #include "abstractremoteinput.h" @@ -25,5 +24,3 @@ public: private: FakeKey *m_fakekey; }; - -#endif diff --git a/plugins/mpriscontrol/mpriscontrolplugin-win.h b/plugins/mpriscontrol/mpriscontrolplugin-win.h index 2db29abd6..e31892071 100644 --- a/plugins/mpriscontrol/mpriscontrolplugin-win.h +++ b/plugins/mpriscontrol/mpriscontrolplugin-win.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef MPRISCONTROLPLUGINWIN_H -#define MPRISCONTROLPLUGINWIN_H +#pragma once #include @@ -55,4 +54,3 @@ private: QString randomUrl(); }; -#endif // MPRISCONTROLPLUGINWIN_H diff --git a/plugins/mpriscontrol/mpriscontrolplugin.h b/plugins/mpriscontrol/mpriscontrolplugin.h index 5e0e44b0d..93df82914 100644 --- a/plugins/mpriscontrol/mpriscontrolplugin.h +++ b/plugins/mpriscontrol/mpriscontrolplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef MPRISCONTROLPLUGIN_H -#define MPRISCONTROLPLUGIN_H +#pragma once #include #include @@ -70,5 +69,3 @@ private: int prevVolume; QDBusServiceWatcher *m_watcher; }; - -#endif diff --git a/plugins/mprisremote/mprisremoteplugin.h b/plugins/mprisremote/mprisremoteplugin.h index a7fe94831..8a662b2b5 100644 --- a/plugins/mprisremote/mprisremoteplugin.h +++ b/plugins/mprisremote/mprisremoteplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef MPRISREMOTEPLUGIN_H -#define MPRISREMOTEPLUGIN_H +#pragma once #include @@ -65,5 +64,3 @@ private: QString m_currentPlayer; QMap m_players; }; - -#endif diff --git a/plugins/notifications/notification.h b/plugins/notifications/notification.h index 20c567417..9f4f49239 100644 --- a/plugins/notifications/notification.h +++ b/plugins/notifications/notification.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef NOTIFICATION_H -#define NOTIFICATION_H +#pragma once #include #include @@ -118,5 +117,3 @@ private: static QMap s_downloadsInProgress; }; - -#endif diff --git a/plugins/notifications/notificationsplugin.h b/plugins/notifications/notificationsplugin.h index d9e95fc52..2dfc72ee9 100644 --- a/plugins/notifications/notificationsplugin.h +++ b/plugins/notifications/notificationsplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef NOTIFICATIONSPLUGIN_H -#define NOTIFICATIONSPLUGIN_H +#pragma once #include @@ -52,5 +51,3 @@ private: QHash m_internalIdToPublicId; int m_lastId = 0; }; - -#endif diff --git a/plugins/notifications/sendreplydialog.h b/plugins/notifications/sendreplydialog.h index 92b33e72b..a4eb6a025 100644 --- a/plugins/notifications/sendreplydialog.h +++ b/plugins/notifications/sendreplydialog.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef SENDREPLYDIALOG_H -#define SENDREPLYDIALOG_H +#pragma once #include #include @@ -44,5 +43,3 @@ public: Q_SIGNAL void send(); }; - -#endif diff --git a/plugins/pausemusic/pausemusic_config.h b/plugins/pausemusic/pausemusic_config.h index 8879af4c1..5b6ded725 100644 --- a/plugins/pausemusic/pausemusic_config.h +++ b/plugins/pausemusic/pausemusic_config.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef PAUSEMUSIC_CONFIG_H -#define PAUSEMUSIC_CONFIG_H +#pragma once #include "kcmplugin/kdeconnectpluginkcm.h" @@ -28,5 +27,3 @@ public: private: Ui::PauseMusicConfigUi *m_ui; }; - -#endif diff --git a/plugins/pausemusic/pausemusicplugin-win.h b/plugins/pausemusic/pausemusicplugin-win.h index 1111eeb4b..ca558ad78 100644 --- a/plugins/pausemusic/pausemusicplugin-win.h +++ b/plugins/pausemusic/pausemusicplugin-win.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef PAUSEMUSICPLUGINWIN_H -#define PAUSEMUSICPLUGINWIN_H +#pragma once #include #include @@ -50,5 +49,3 @@ private: QSet pausedSources; QSet mutedSinks; }; - -#endif // PAUSEMUSICPLUGINWIN_H diff --git a/plugins/pausemusic/pausemusicplugin.h b/plugins/pausemusic/pausemusicplugin.h index 321bb7b5b..4aecd2d26 100644 --- a/plugins/pausemusic/pausemusicplugin.h +++ b/plugins/pausemusic/pausemusicplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef PAUSEMUSICPLUGIN_H -#define PAUSEMUSICPLUGIN_H +#pragma once #include #include @@ -26,5 +25,3 @@ private: QSet pausedSources; QSet mutedSinks; }; - -#endif diff --git a/plugins/photo/photoplugin.h b/plugins/photo/photoplugin.h index c3bd08c8f..fe241bdc3 100644 --- a/plugins/photo/photoplugin.h +++ b/plugins/photo/photoplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef PHOTOPLUGIN_H -#define PHOTOPLUGIN_H +#pragma once class QObject; @@ -34,5 +33,3 @@ Q_SIGNALS: private: QStringList requestedFiles; }; - -#endif diff --git a/plugins/ping/pingplugin.h b/plugins/ping/pingplugin.h index 03dd3ceaf..70e1b22ef 100644 --- a/plugins/ping/pingplugin.h +++ b/plugins/ping/pingplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef PINGPLUGIN_H -#define PINGPLUGIN_H +#pragma once #include @@ -28,5 +27,3 @@ public: bool receivePacket(const NetworkPacket &np) override; QString dbusPath() const override; }; - -#endif diff --git a/plugins/presenter/presenterplugin.h b/plugins/presenter/presenterplugin.h index 3f99839da..cba6911e9 100644 --- a/plugins/presenter/presenterplugin.h +++ b/plugins/presenter/presenterplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef PRESENTERPLUGIN_H -#define PRESENTERPLUGIN_H +#pragma once #include #include @@ -31,5 +30,3 @@ private: QTimer *m_timer; float m_xPos, m_yPos; }; - -#endif diff --git a/plugins/remotecommands/remotecommandsplugin.h b/plugins/remotecommands/remotecommandsplugin.h index 7dfc0f854..b9e2e6358 100644 --- a/plugins/remotecommands/remotecommandsplugin.h +++ b/plugins/remotecommands/remotecommandsplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef REMOTECOMMANDSPLUGIN_H -#define REMOTECOMMANDSPLUGIN_H +#pragma once class QObject; @@ -52,5 +51,3 @@ private: QByteArray m_commands; bool m_canAddCommand; }; - -#endif diff --git a/plugins/remotecontrol/remotecontrolplugin.h b/plugins/remotecontrol/remotecontrolplugin.h index 2bb1b742a..c89c4f229 100644 --- a/plugins/remotecontrol/remotecontrolplugin.h +++ b/plugins/remotecontrol/remotecontrolplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef REMOTECONTROLPLUGIN_H -#define REMOTECONTROLPLUGIN_H +#pragma once #include @@ -30,5 +29,3 @@ public: Q_SCRIPTABLE void moveCursor(const QPoint &p); Q_SCRIPTABLE void sendCommand(const QVariantMap &body); }; - -#endif diff --git a/plugins/remotekeyboard/remotekeyboardplugin.h b/plugins/remotekeyboard/remotekeyboardplugin.h index 507ba14fe..3d5da495a 100644 --- a/plugins/remotekeyboard/remotekeyboardplugin.h +++ b/plugins/remotekeyboard/remotekeyboardplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef REMOTEKEYBOARDPLUGIN_H -#define REMOTEKEYBOARDPLUGIN_H +#pragma once #include #include @@ -45,5 +44,3 @@ Q_SIGNALS: Q_SCRIPTABLE void keyPressReceived(const QString &key, int specialKey = 0, bool shift = false, bool ctrl = false, bool alt = false); Q_SCRIPTABLE void remoteStateChanged(bool state); }; - -#endif diff --git a/plugins/remotesystemvolume/remotesystemvolumeplugin.h b/plugins/remotesystemvolume/remotesystemvolumeplugin.h index a9721b092..6ab0a7c14 100644 --- a/plugins/remotesystemvolume/remotesystemvolumeplugin.h +++ b/plugins/remotesystemvolume/remotesystemvolumeplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef REMOTESYSTEMVOLUMEPLUGIN_H -#define REMOTESYSTEMVOLUMEPLUGIN_H +#pragma once #include @@ -45,5 +44,3 @@ Q_SIGNALS: private: QByteArray m_sinks; }; - -#endif // REMOTESYSTEMVOLUMEPLUGIN_H diff --git a/plugins/runcommand/runcommand_config.h b/plugins/runcommand/runcommand_config.h index 27ab4eda4..735d34b03 100644 --- a/plugins/runcommand/runcommand_config.h +++ b/plugins/runcommand/runcommand_config.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef RUNCOMMAND_CONFIG_H -#define RUNCOMMAND_CONFIG_H +#pragma once #include "kcmplugin/kdeconnectpluginkcm.h" @@ -33,5 +32,3 @@ private: QStandardItemModel *m_entriesModel; }; - -#endif // RUNCOMMAND_CONFIG_H diff --git a/plugins/runcommand/runcommandplugin.h b/plugins/runcommand/runcommandplugin.h index 95289c100..c9b263200 100644 --- a/plugins/runcommand/runcommandplugin.h +++ b/plugins/runcommand/runcommandplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef RUNCOMMANDPLUGIN_H -#define RUNCOMMANDPLUGIN_H +#pragma once #include @@ -29,5 +28,3 @@ public: private: void sendConfig(); }; - -#endif diff --git a/plugins/screensaver-inhibit/screensaverinhibitplugin-macos.h b/plugins/screensaver-inhibit/screensaverinhibitplugin-macos.h index b36f41e46..29317956d 100644 --- a/plugins/screensaver-inhibit/screensaverinhibitplugin-macos.h +++ b/plugins/screensaver-inhibit/screensaverinhibitplugin-macos.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef SCREENSAVERINHIBITPLUGIN_H -#define SCREENSAVERINHIBITPLUGIN_H +#pragma once #include #include @@ -25,5 +24,3 @@ public: private: QProcess *m_caffeinateProcess; }; - -#endif diff --git a/plugins/screensaver-inhibit/screensaverinhibitplugin-win.h b/plugins/screensaver-inhibit/screensaverinhibitplugin-win.h index 8185574e6..eaadc9f68 100644 --- a/plugins/screensaver-inhibit/screensaverinhibitplugin-win.h +++ b/plugins/screensaver-inhibit/screensaverinhibitplugin-win.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef SCREENSAVERINHIBITPLUGIN_H -#define SCREENSAVERINHIBITPLUGIN_H +#pragma once #include @@ -21,5 +20,3 @@ public: bool receivePacket(const NetworkPacket &np) override; }; - -#endif diff --git a/plugins/screensaver-inhibit/screensaverinhibitplugin.h b/plugins/screensaver-inhibit/screensaverinhibitplugin.h index eebe2f015..8a9e14f21 100644 --- a/plugins/screensaver-inhibit/screensaverinhibitplugin.h +++ b/plugins/screensaver-inhibit/screensaverinhibitplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef SCREENSAVERINHIBITPLUGIN_H -#define SCREENSAVERINHIBITPLUGIN_H +#pragma once #include @@ -24,5 +23,3 @@ public: private: uint inhibitCookie; }; - -#endif diff --git a/plugins/sendnotifications/notificationslistener.h b/plugins/sendnotifications/notificationslistener.h index f1d55a453..7a4631b50 100644 --- a/plugins/sendnotifications/notificationslistener.h +++ b/plugins/sendnotifications/notificationslistener.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef NOTIFICATIONSLISTENER_H -#define NOTIFICATIONSLISTENER_H +#pragma once #include #include @@ -56,5 +55,3 @@ private: GDBusConnection *m_gdbusConnection = nullptr; unsigned m_gdbusFilterId = 0; }; - -#endif // NOTIFICATIONSLISTENER_H diff --git a/plugins/sendnotifications/notifyingapplication.h b/plugins/sendnotifications/notifyingapplication.h index 841a46e5a..5bbc34de5 100644 --- a/plugins/sendnotifications/notifyingapplication.h +++ b/plugins/sendnotifications/notifyingapplication.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef NOTIFYINGAPPLICATION_H -#define NOTIFYINGAPPLICATION_H +#pragma once #include @@ -26,5 +25,3 @@ Q_DECLARE_METATYPE(NotifyingApplication); QDataStream &operator<<(QDataStream &out, const NotifyingApplication &app); QDataStream &operator>>(QDataStream &in, NotifyingApplication &app); QDebug operator<<(QDebug dbg, const NotifyingApplication &a); - -#endif // NOTIFYINGAPPLICATION_H diff --git a/plugins/sendnotifications/notifyingapplicationmodel.h b/plugins/sendnotifications/notifyingapplicationmodel.h index e0cf164f8..282908de1 100644 --- a/plugins/sendnotifications/notifyingapplicationmodel.h +++ b/plugins/sendnotifications/notifyingapplicationmodel.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef NOTIFYINGAPPLICATIONMODEL_H -#define NOTIFYINGAPPLICATIONMODEL_H +#pragma once #include @@ -37,5 +36,3 @@ Q_SIGNALS: private: QVector m_apps; }; - -#endif // NOTIFYINGAPPLICATIONMODEL_H diff --git a/plugins/sendnotifications/sendnotifications_config.h b/plugins/sendnotifications/sendnotifications_config.h index 046c686a6..899a00d75 100644 --- a/plugins/sendnotifications/sendnotifications_config.h +++ b/plugins/sendnotifications/sendnotifications_config.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef SENDNOTIFICATIONS_CONFIG_H -#define SENDNOTIFICATIONS_CONFIG_H +#pragma once #include "kcmplugin/kdeconnectpluginkcm.h" @@ -32,5 +31,3 @@ private: Ui::SendNotificationsConfigUi *m_ui; NotifyingApplicationModel *appModel; }; - -#endif diff --git a/plugins/sendnotifications/sendnotificationsplugin.h b/plugins/sendnotifications/sendnotificationsplugin.h index 2edb98e40..4a161ae48 100644 --- a/plugins/sendnotifications/sendnotificationsplugin.h +++ b/plugins/sendnotifications/sendnotificationsplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef SENDNOTIFICATIONSPLUGIN_H -#define SENDNOTIFICATIONSPLUGIN_H +#pragma once #include "core/kdeconnectplugin.h" @@ -32,5 +31,3 @@ public: protected: NotificationsListener *notificationsListener; }; - -#endif diff --git a/plugins/sftp/mounter.h b/plugins/sftp/mounter.h index 16506a387..a476870a4 100644 --- a/plugins/sftp/mounter.h +++ b/plugins/sftp/mounter.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef SFTPPLUGIN_MOUNTER_H -#define SFTPPLUGIN_MOUNTER_H +#pragma once #include #include @@ -50,5 +49,3 @@ private: QString m_mountPoint; bool m_started; }; - -#endif diff --git a/plugins/sftp/mountloop.h b/plugins/sftp/mountloop.h index 6b2edd0dd..ac35898f7 100644 --- a/plugins/sftp/mountloop.h +++ b/plugins/sftp/mountloop.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef SFTPPLUGIN_MOUNTLOOP_H -#define SFTPPLUGIN_MOUNTLOOP_H +#pragma once #include @@ -25,5 +24,3 @@ public Q_SLOTS: void succeeded(); void exitWith(bool status); }; - -#endif diff --git a/plugins/sftp/sftpplugin-win.h b/plugins/sftp/sftpplugin-win.h index 16094cc6e..689b01fef 100644 --- a/plugins/sftp/sftpplugin-win.h +++ b/plugins/sftp/sftpplugin-win.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef SFTPPLUGIN_WIN_H -#define SFTPPLUGIN_WIN_H +#pragma once #include #include @@ -35,5 +34,3 @@ public Q_SLOTS: private: QString deviceId; // Storing it to avoid accessing device() from the destructor which could cause a crash }; - -#endif diff --git a/plugins/sftp/sftpplugin.h b/plugins/sftp/sftpplugin.h index 1ac25c7f2..fc82a1366 100644 --- a/plugins/sftp/sftpplugin.h +++ b/plugins/sftp/sftpplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef SFTPPLUGIN_H -#define SFTPPLUGIN_H +#pragma once #include #include @@ -61,5 +60,3 @@ private: QVariantMap remoteDirectories; // Actually a QMap, but QDBus prefers this QString mountError; }; - -#endif diff --git a/plugins/share/share_config.h b/plugins/share/share_config.h index 746d80c74..1c5fdad6a 100644 --- a/plugins/share/share_config.h +++ b/plugins/share/share_config.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef SHARE_CONFIG_H -#define SHARE_CONFIG_H +#pragma once #include "kcmplugin/kdeconnectpluginkcm.h" @@ -28,5 +27,3 @@ public: private: Ui::ShareConfigUi *m_ui; }; - -#endif diff --git a/plugins/share/shareplugin.h b/plugins/share/shareplugin.h index fd87e62f8..35b3089df 100644 --- a/plugins/share/shareplugin.h +++ b/plugins/share/shareplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef SHAREPLUGIN_H -#define SHAREPLUGIN_H +#pragma once #include @@ -54,4 +53,3 @@ private: QPointer m_compositeJob; }; -#endif diff --git a/plugins/sms/conversationsdbusinterface.h b/plugins/sms/conversationsdbusinterface.h index 94af786d3..b3e37463e 100644 --- a/plugins/sms/conversationsdbusinterface.h +++ b/plugins/sms/conversationsdbusinterface.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef CONVERSATIONSDBUSINTERFACE_H -#define CONVERSATIONSDBUSINTERFACE_H +#pragma once #include #include @@ -163,5 +162,3 @@ private /*attributes*/: QMutex waitingForMessagesLock; QWaitCondition waitingForMessages; }; - -#endif // CONVERSATIONSDBUSINTERFACE_H diff --git a/plugins/sms/requestconversationworker.h b/plugins/sms/requestconversationworker.h index f70ab6a57..38443349a 100644 --- a/plugins/sms/requestconversationworker.h +++ b/plugins/sms/requestconversationworker.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef REQUESTCONVERSATIONWORKER_H -#define REQUESTCONVERSATIONWORKER_H +#pragma once #include "conversationsdbusinterface.h" @@ -61,5 +60,3 @@ private: */ size_t replyForConversation(const QList &conversation, int start, size_t howMany); }; - -#endif // REQUESTCONVERSATIONWORKER_H diff --git a/plugins/sms/smsplugin.h b/plugins/sms/smsplugin.h index 66a9b2d18..bc3f41fc0 100644 --- a/plugins/sms/smsplugin.h +++ b/plugins/sms/smsplugin.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef SMSPLUGIN_H -#define SMSPLUGIN_H +#pragma once #include @@ -206,5 +205,3 @@ private: ConversationsDbusInterface *m_conversationInterface; QTextCodec *m_codec; }; - -#endif diff --git a/plugins/systemvolume/systemvolumeplugin-macos.h b/plugins/systemvolume/systemvolumeplugin-macos.h index 2f11c93ee..ebcaf49ff 100644 --- a/plugins/systemvolume/systemvolumeplugin-macos.h +++ b/plugins/systemvolume/systemvolumeplugin-macos.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef SYSTEMVOLUMEPLUGINMACOS_H -#define SYSTEMVOLUMEPLUGINMACOS_H +#pragma once #include #include @@ -37,5 +36,3 @@ public: private: QMap m_sinksMap; }; - -#endif // SYSTEMVOLUMEPLUGINMACOS_H diff --git a/plugins/systemvolume/systemvolumeplugin-pulse.h b/plugins/systemvolume/systemvolumeplugin-pulse.h index 7aee45328..29d2d72c8 100644 --- a/plugins/systemvolume/systemvolumeplugin-pulse.h +++ b/plugins/systemvolume/systemvolumeplugin-pulse.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef SYSTEMVOLUMEPLUGINPULSE_H -#define SYSTEMVOLUMEPLUGINPULSE_H +#pragma once #include #include @@ -31,5 +30,3 @@ private: void sendSinkList(); QMap sinksMap; }; - -#endif diff --git a/plugins/systemvolume/systemvolumeplugin-win.h b/plugins/systemvolume/systemvolumeplugin-win.h index c23997492..27805f3b8 100644 --- a/plugins/systemvolume/systemvolumeplugin-win.h +++ b/plugins/systemvolume/systemvolumeplugin-win.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef SYSTEMVOLUMEPLUGINWIN_H -#define SYSTEMVOLUMEPLUGINWIN_H +#pragma once #include #include @@ -46,5 +45,3 @@ private: bool sendSinkList(); HRESULT setDefaultAudioPlaybackDevice(QString &name, bool enabled); }; - -#endif // SYSTEMVOLUMEPLUGINWIN_H diff --git a/plugins/telephony/telephonyplugin.h b/plugins/telephony/telephonyplugin.h index 231e85df2..74bfc94f8 100644 --- a/plugins/telephony/telephonyplugin.h +++ b/plugins/telephony/telephonyplugin.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef TELEPHONYPLUGIN_H -#define TELEPHONYPLUGIN_H +#pragma once #include @@ -59,5 +58,3 @@ private: QPointer m_currentCallNotification; }; - -#endif diff --git a/plugins/virtualmonitor/virtualmonitorplugin.h b/plugins/virtualmonitor/virtualmonitorplugin.h index 834fbbd77..3bab552ce 100644 --- a/plugins/virtualmonitor/virtualmonitorplugin.h +++ b/plugins/virtualmonitor/virtualmonitorplugin.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#ifndef VIRTUALMONITORPLUGIN_H -#define VIRTUALMONITORPLUGIN_H +#pragma once #include "plugin_virtualmonitor_debug.h" #include @@ -38,5 +37,3 @@ private: QJsonObject m_remoteResolution; uint m_retries = 0; }; - -#endif