From 1c83414b7da6922c0f1325b70dab0bb2ef9c4bee Mon Sep 17 00:00:00 2001 From: Robert Adam Date: Sun, 13 Nov 2022 17:44:42 +0100 Subject: [PATCH] REFAC: Remove unnecessary semicolons --- src/EnvUtils.cpp | 2 +- src/EnvUtils.h | 2 +- src/LogEmitter.cpp | 4 ++-- src/MumbleProtocol.cpp | 2 +- src/MumbleProtocol.h | 8 ++++---- src/ProtoUtils.cpp | 2 +- src/ProtoUtils.h | 2 +- src/QtUtils.cpp | 4 ++-- src/QtUtils.h | 4 ++-- src/Version.cpp | 2 +- src/Version.h | 2 +- src/mumble/API.h | 4 ++-- src/mumble/DeveloperConsole.h | 2 +- src/mumble/Overlay.h | 2 +- src/mumble/OverlayPositionableItem.h | 2 +- src/mumble/OverlayUserGroup.h | 2 +- src/mumble/PluginInstaller.h | 4 ++-- src/mumble/PluginUpdater.h | 4 ++-- src/mumble/PositionalAudioViewer.h | 2 +- src/mumble/SearchDialog.cpp | 4 ++-- src/mumble/SearchDialog.h | 4 ++-- src/mumble/ServerInformation.h | 4 ++-- src/mumble/TalkingUI.h | 3 +-- src/mumble/UserLocalNicknameDialog.h | 2 +- src/mumble/widgets/RichTextItemDelegate.h | 4 ++-- src/mumble/widgets/SearchDialogItemDelegate.h | 4 ++-- src/murmur/Meta.h | 4 ++-- src/murmur/MumbleServerIce.h | 2 +- src/murmur/Server.h | 8 ++++---- src/murmur/ServerDB.h | 2 +- src/murmur/Tray.h | 2 +- src/tests/Emit.cpp | 4 ++-- .../TestAudioReceiverBuffer/TestAudioReceiverBuffer.cpp | 2 +- src/tests/TestMumbleProtocol/TestMumbleProtocol.cpp | 2 +- src/tests/TestVersion/TestVersion.cpp | 2 +- 35 files changed, 54 insertions(+), 55 deletions(-) diff --git a/src/EnvUtils.cpp b/src/EnvUtils.cpp index cf2f7857afe..e49ddc00052 100644 --- a/src/EnvUtils.cpp +++ b/src/EnvUtils.cpp @@ -61,4 +61,4 @@ bool waylandIsUsed() { return getenv(QStringLiteral("WAYLAND_DISPLAY")) != ""; } -}; // namespace EnvUtils +} // namespace EnvUtils diff --git a/src/EnvUtils.h b/src/EnvUtils.h index 7389eccedc7..ba322e8dbda 100644 --- a/src/EnvUtils.h +++ b/src/EnvUtils.h @@ -24,6 +24,6 @@ bool setenv(QString name, QString value); bool waylandIsUsed(); -}; // namespace EnvUtils +} // namespace EnvUtils #endif diff --git a/src/LogEmitter.cpp b/src/LogEmitter.cpp index 55f0a7d7882..f1419a908ec 100644 --- a/src/LogEmitter.cpp +++ b/src/LogEmitter.cpp @@ -5,8 +5,8 @@ #include "LogEmitter.h" -LogEmitter::LogEmitter(QObject *p) : QObject(p){}; +LogEmitter::LogEmitter(QObject *p) : QObject(p){} void LogEmitter::addLogEntry(const QString &msg) { emit newLogEntry(msg); -}; +} diff --git a/src/MumbleProtocol.cpp b/src/MumbleProtocol.cpp index fedeaa9d837..67545c9fe0f 100644 --- a/src/MumbleProtocol.cpp +++ b/src/MumbleProtocol.cpp @@ -883,4 +883,4 @@ namespace Protocol { #undef PROCESS_CLASS } // namespace Protocol -}; // namespace Mumble +} // namespace Mumble diff --git a/src/MumbleProtocol.h b/src/MumbleProtocol.h index 267148195bb..5732d6a5c3b 100644 --- a/src/MumbleProtocol.h +++ b/src/MumbleProtocol.h @@ -91,7 +91,7 @@ namespace Protocol { namespace ReservedTargetIDs { constexpr unsigned int REGULAR_SPEECH = 0; constexpr unsigned int SERVER_LOOPBACK = 31; - }; // namespace ReservedTargetIDs + } // namespace ReservedTargetIDs using audio_context_t = byte; namespace AudioContext { @@ -103,7 +103,7 @@ namespace Protocol { constexpr audio_context_t BEGIN = NORMAL; constexpr audio_context_t END = LISTEN + 1; - }; // namespace AudioContext + } // namespace AudioContext enum class Role { Server, Client }; @@ -273,8 +273,8 @@ namespace Protocol { bool decodeAudio_protobuf(const gsl::span< const byte > data); }; -}; // namespace Protocol -}; // namespace Mumble +} // namespace Protocol +} // namespace Mumble /** * This is merely a dummy-function (never used) that is required as a scope for dummy-switch statements on our message diff --git a/src/ProtoUtils.cpp b/src/ProtoUtils.cpp index 891be6bc0b8..1e5c94135b2 100644 --- a/src/ProtoUtils.cpp +++ b/src/ProtoUtils.cpp @@ -37,4 +37,4 @@ void setSuggestedVersion(MumbleProto::SuggestConfig &msg, const ::Version::full_ msg.set_version_v1(::Version::toLegacyVersion(version)); } -}; // namespace MumbleProto +} // namespace MumbleProto diff --git a/src/ProtoUtils.h b/src/ProtoUtils.h index 45e4b7da582..6e08cf05538 100644 --- a/src/ProtoUtils.h +++ b/src/ProtoUtils.h @@ -17,6 +17,6 @@ void setVersion(MumbleProto::Version &msg, const ::Version::full_t version); ::Version::full_t getSuggestedVersion(const MumbleProto::SuggestConfig &msg); void setSuggestedVersion(MumbleProto::SuggestConfig &msg, const ::Version::full_t version); -}; // namespace MumbleProto +} // namespace MumbleProto #endif // MUMBLE_PROTOUTILS_H_ diff --git a/src/QtUtils.cpp b/src/QtUtils.cpp index 1f0a8c097c4..fb08cce6687 100644 --- a/src/QtUtils.cpp +++ b/src/QtUtils.cpp @@ -24,5 +24,5 @@ namespace QtUtils { } -}; // namespace QtUtils -}; // namespace Mumble +} // namespace QtUtils +} // namespace Mumble diff --git a/src/QtUtils.h b/src/QtUtils.h index 8534cf966b4..c023e9619c4 100644 --- a/src/QtUtils.h +++ b/src/QtUtils.h @@ -34,8 +34,8 @@ namespace QtUtils { */ QString decode_first_utf8_qssl_string(const QStringList &list); -}; // namespace QtUtils -}; // namespace Mumble +} // namespace QtUtils +} // namespace Mumble template< typename T > using qt_unique_ptr = std::unique_ptr< T, decltype(&Mumble::QtUtils::deleteQObject) >; diff --git a/src/Version.cpp b/src/Version.cpp index d2cd86f11e3..abdbbc74756 100644 --- a/src/Version.cpp +++ b/src/Version.cpp @@ -81,4 +81,4 @@ bool getComponents(Version::component_t &major, Version::component_t &minor, Ver return false; } -}; // namespace Version +} // namespace Version diff --git a/src/Version.h b/src/Version.h index 6c2d1795601..68cc270f10c 100644 --- a/src/Version.h +++ b/src/Version.h @@ -108,6 +108,6 @@ constexpr std::uint32_t toLegacyVersion(Version::full_t version) { static_cast< std::uint32_t >(std::numeric_limits< std::uint8_t >::max()))); } -}; // namespace Version +} // namespace Version #endif diff --git a/src/mumble/API.h b/src/mumble/API.h index 63c3d2a5b33..d97df6e89df 100644 --- a/src/mumble/API.h +++ b/src/mumble/API.h @@ -67,8 +67,8 @@ struct MumbleAPICurator { /// This class is a singleton as a way to be able to write C function wrappers for the member functions /// that are needed for passing to the plugins. class MumbleAPI : public QObject { - Q_OBJECT; - Q_DISABLE_COPY(MumbleAPI); + Q_OBJECT + Q_DISABLE_COPY(MumbleAPI) public: static MumbleAPI &get(); diff --git a/src/mumble/DeveloperConsole.h b/src/mumble/DeveloperConsole.h index 90a53201d23..135a6b5ce50 100644 --- a/src/mumble/DeveloperConsole.h +++ b/src/mumble/DeveloperConsole.h @@ -14,7 +14,7 @@ class DeveloperConsole : public QObject { private: Q_OBJECT - Q_DISABLE_COPY(DeveloperConsole); + Q_DISABLE_COPY(DeveloperConsole) protected: QPointer< QMainWindow > m_window; diff --git a/src/mumble/Overlay.h b/src/mumble/Overlay.h index da5a5694b36..03184fa1a87 100644 --- a/src/mumble/Overlay.h +++ b/src/mumble/Overlay.h @@ -43,7 +43,7 @@ struct OverlayAppInfo { class OverlayGroup : public QGraphicsItem { private: - Q_DISABLE_COPY(OverlayGroup); + Q_DISABLE_COPY(OverlayGroup) public: enum { Type = UserType + 5 }; diff --git a/src/mumble/OverlayPositionableItem.h b/src/mumble/OverlayPositionableItem.h index 62edcd36fbc..c9956079a69 100644 --- a/src/mumble/OverlayPositionableItem.h +++ b/src/mumble/OverlayPositionableItem.h @@ -11,7 +11,7 @@ class OverlayPositionableItem : public QObject, public QGraphicsPixmapItem { Q_OBJECT - Q_DISABLE_COPY(OverlayPositionableItem); + Q_DISABLE_COPY(OverlayPositionableItem) public: OverlayPositionableItem(QRectF *posPtr, const bool isPositionable = false); diff --git a/src/mumble/OverlayUserGroup.h b/src/mumble/OverlayUserGroup.h index 11c3dc60774..3c154b02ac7 100644 --- a/src/mumble/OverlayUserGroup.h +++ b/src/mumble/OverlayUserGroup.h @@ -13,7 +13,7 @@ class OverlayUser; class OverlayUserGroup : public QObject, public OverlayGroup { private: Q_OBJECT - Q_DISABLE_COPY(OverlayUserGroup); + Q_DISABLE_COPY(OverlayUserGroup) public: enum { Type = UserType + 3 }; diff --git a/src/mumble/PluginInstaller.h b/src/mumble/PluginInstaller.h index 88b362e1070..3f054cd8755 100644 --- a/src/mumble/PluginInstaller.h +++ b/src/mumble/PluginInstaller.h @@ -33,8 +33,8 @@ class PluginInstallException : public QException { /// directory on the FileSystem. class PluginInstaller : public QDialog, public Ui::PluginInstaller { private: - Q_OBJECT; - Q_DISABLE_COPY(PluginInstaller); + Q_OBJECT + Q_DISABLE_COPY(PluginInstaller) protected: /// The file the installer has been invoked on diff --git a/src/mumble/PluginUpdater.h b/src/mumble/PluginUpdater.h index 42dbe179e7d..9c83d2961fe 100644 --- a/src/mumble/PluginUpdater.h +++ b/src/mumble/PluginUpdater.h @@ -40,8 +40,8 @@ struct UpdateEntry { /// a Dialog that can be used to prompt the user whether certain updates should be updated. class PluginUpdater : public QDialog, public Ui::PluginUpdater { private: - Q_OBJECT; - Q_DISABLE_COPY(PluginUpdater); + Q_OBJECT + Q_DISABLE_COPY(PluginUpdater) protected: /// An atomic flag indicating whether the plugin update has been interrupted. It is used diff --git a/src/mumble/PositionalAudioViewer.h b/src/mumble/PositionalAudioViewer.h index f6a4c465c02..aab500f3530 100644 --- a/src/mumble/PositionalAudioViewer.h +++ b/src/mumble/PositionalAudioViewer.h @@ -31,7 +31,7 @@ class PositionalAudioViewer : public QDialog { std::unique_ptr< Ui::PositionalAudioViewer > m_ui; private: - Q_OBJECT; + Q_OBJECT }; #endif diff --git a/src/mumble/SearchDialog.cpp b/src/mumble/SearchDialog.cpp index dd1ac8a67c0..2858f4f4973 100644 --- a/src/mumble/SearchDialog.cpp +++ b/src/mumble/SearchDialog.cpp @@ -51,7 +51,7 @@ QString SearchDialog::toString(ChannelAction action) { } class SearchResultItem : public QTreeWidgetItem { - Q_DISABLE_COPY(SearchResultItem); + Q_DISABLE_COPY(SearchResultItem) public: template< typename parent_t > @@ -88,7 +88,7 @@ class SearchResultItem : public QTreeWidgetItem { }; class ChannelItem : public QTreeWidgetItem { - Q_DISABLE_COPY(ChannelItem); + Q_DISABLE_COPY(ChannelItem) public: template< typename parent_t > diff --git a/src/mumble/SearchDialog.h b/src/mumble/SearchDialog.h index 7ddc7ce1825..1a2be92d21b 100644 --- a/src/mumble/SearchDialog.h +++ b/src/mumble/SearchDialog.h @@ -86,8 +86,8 @@ using SearchResultMap = std::map< SearchResult, unsigned int, SearchResultSortCo * The search result class is the one that pops up when triggering the search functionality */ class SearchDialog : public QWidget, private Ui::SearchDialog { - Q_OBJECT; - Q_DISABLE_COPY(SearchDialog); + Q_OBJECT + Q_DISABLE_COPY(SearchDialog) public: SearchDialog(QWidget *parent = nullptr); diff --git a/src/mumble/ServerInformation.h b/src/mumble/ServerInformation.h index 41dfd86ed19..b9cc27f7e31 100644 --- a/src/mumble/ServerInformation.h +++ b/src/mumble/ServerInformation.h @@ -13,8 +13,8 @@ class Connection; class ServerInformation : public QDialog, private Ui::ServerInformation { - Q_OBJECT; - Q_DISABLE_COPY(ServerInformation); + Q_OBJECT + Q_DISABLE_COPY(ServerInformation) public: ServerInformation(QWidget *parent = nullptr); diff --git a/src/mumble/TalkingUI.h b/src/mumble/TalkingUI.h index efbc327d617..0193b2df3d6 100644 --- a/src/mumble/TalkingUI.h +++ b/src/mumble/TalkingUI.h @@ -36,7 +36,7 @@ class TalkingUI : public QWidget { private: Q_OBJECT - Q_DISABLE_COPY(TalkingUI); + Q_DISABLE_COPY(TalkingUI) std::vector< std::unique_ptr< TalkingUIContainer > > m_containers; /// The Entry corresponding to the currently selected user @@ -70,7 +70,6 @@ class TalkingUI : public QWidget { /// /// @param channel A pointer to the channel that shall be added void addChannel(const Channel *channel); - ; /// Adds an UI entry for the given User, if none exists yet. /// /// @param channel A pointer to the user that shall be added diff --git a/src/mumble/UserLocalNicknameDialog.h b/src/mumble/UserLocalNicknameDialog.h index 62ea6419a5d..1505bb85d29 100644 --- a/src/mumble/UserLocalNicknameDialog.h +++ b/src/mumble/UserLocalNicknameDialog.h @@ -18,7 +18,7 @@ class UserLocalNicknameDialog; class UserLocalNicknameDialog : public QDialog, private Ui::UserLocalNicknameDialog { Q_OBJECT - Q_DISABLE_COPY(UserLocalNicknameDialog); + Q_DISABLE_COPY(UserLocalNicknameDialog) /// The session ID for the user that the dialog is changing the nickname for. unsigned int m_clientSession; diff --git a/src/mumble/widgets/RichTextItemDelegate.h b/src/mumble/widgets/RichTextItemDelegate.h index 14155b9a791..02c58e40f25 100644 --- a/src/mumble/widgets/RichTextItemDelegate.h +++ b/src/mumble/widgets/RichTextItemDelegate.h @@ -18,8 +18,8 @@ class QModelIndex; * rich text support to the *View and *Widget objects (e.g. TreeWidget). */ class RichTextItemDelegate : public QStyledItemDelegate { - Q_OBJECT; - Q_DISABLE_COPY(RichTextItemDelegate); + Q_OBJECT + Q_DISABLE_COPY(RichTextItemDelegate) public: // inherit constructors diff --git a/src/mumble/widgets/SearchDialogItemDelegate.h b/src/mumble/widgets/SearchDialogItemDelegate.h index a789af09f78..594339df612 100644 --- a/src/mumble/widgets/SearchDialogItemDelegate.h +++ b/src/mumble/widgets/SearchDialogItemDelegate.h @@ -15,8 +15,8 @@ class QModelIndex; class QObject; class SearchDialogItemDelegate : public QStyledItemDelegate { - Q_OBJECT; - Q_DISABLE_COPY(SearchDialogItemDelegate); + Q_OBJECT + Q_DISABLE_COPY(SearchDialogItemDelegate) public: constexpr static int CHANNEL_TREE_ROLE = Qt::UserRole + 1; diff --git a/src/murmur/Meta.h b/src/murmur/Meta.h index 4fc87f96eb4..59066d539b3 100644 --- a/src/murmur/Meta.h +++ b/src/murmur/Meta.h @@ -174,8 +174,8 @@ class MetaParams { class Meta : public QObject { private: - Q_OBJECT; - Q_DISABLE_COPY(Meta); + Q_OBJECT + Q_DISABLE_COPY(Meta) public: static MetaParams mp; diff --git a/src/murmur/MumbleServerIce.h b/src/murmur/MumbleServerIce.h index fdb8bd02435..a65376daf1b 100644 --- a/src/murmur/MumbleServerIce.h +++ b/src/murmur/MumbleServerIce.h @@ -29,7 +29,7 @@ struct TextMessage; class MumbleServerIce : public QObject { friend class MurmurLocker; - Q_OBJECT; + Q_OBJECT protected: int count; diff --git a/src/murmur/Server.h b/src/murmur/Server.h index 7546d3c15e1..2d0db1b48d5 100644 --- a/src/murmur/Server.h +++ b/src/murmur/Server.h @@ -65,7 +65,7 @@ struct TextMessage { class SslServer : public QTcpServer { private: - Q_OBJECT; + Q_OBJECT Q_DISABLE_COPY(SslServer) protected: QList< QSslSocket * > qlSockets; @@ -79,7 +79,7 @@ class SslServer : public QTcpServer { #define EXEC_QEVENT (QEvent::User + 959) class ExecEvent : public QEvent { - Q_DISABLE_COPY(ExecEvent); + Q_DISABLE_COPY(ExecEvent) protected: boost::function< void() > func; @@ -91,8 +91,8 @@ class ExecEvent : public QEvent { class Server : public QThread { private: - Q_OBJECT; - Q_DISABLE_COPY(Server); + Q_OBJECT + Q_DISABLE_COPY(Server) protected: bool bRunning; diff --git a/src/murmur/ServerDB.h b/src/murmur/ServerDB.h index 5d1b25419fb..aa07c4b72da 100644 --- a/src/murmur/ServerDB.h +++ b/src/murmur/ServerDB.h @@ -18,7 +18,7 @@ class QSqlDatabase; class QSqlQuery; class ServerDB : public QObject { - Q_OBJECT; + Q_OBJECT public: /// A version number that allows us to keep track of changes we make to the DB architecture diff --git a/src/murmur/Tray.h b/src/murmur/Tray.h index 5d6d2e40e64..4ffa8c07025 100644 --- a/src/murmur/Tray.h +++ b/src/murmur/Tray.h @@ -16,7 +16,7 @@ class QAction; class Tray : public QObject { private: Q_OBJECT - Q_DISABLE_COPY(Tray); + Q_DISABLE_COPY(Tray) protected: QSystemTrayIcon *qsti; diff --git a/src/tests/Emit.cpp b/src/tests/Emit.cpp index 06d261a18f0..35667d42f47 100644 --- a/src/tests/Emit.cpp +++ b/src/tests/Emit.cpp @@ -9,7 +9,7 @@ #include class Slotter : public QObject { - Q_OBJECT; + Q_OBJECT public: Slotter(QObject *p = nullptr) : QObject(p){}; @@ -18,7 +18,7 @@ public Q_SLOTS: }; class Emitter : public QObject { - Q_OBJECT; + Q_OBJECT public: Slotter *s; diff --git a/src/tests/TestAudioReceiverBuffer/TestAudioReceiverBuffer.cpp b/src/tests/TestAudioReceiverBuffer/TestAudioReceiverBuffer.cpp index fed889d07a5..422223e1b6b 100644 --- a/src/tests/TestAudioReceiverBuffer/TestAudioReceiverBuffer.cpp +++ b/src/tests/TestAudioReceiverBuffer/TestAudioReceiverBuffer.cpp @@ -89,7 +89,7 @@ class PseudoEncoder { }; class TestAudioReceiverBuffer : public QObject { - Q_OBJECT; + Q_OBJECT private slots: void test_preconditions() { // Preconditions for these test to make any sense diff --git a/src/tests/TestMumbleProtocol/TestMumbleProtocol.cpp b/src/tests/TestMumbleProtocol/TestMumbleProtocol.cpp index 1ae5eee45c3..bc43dbdb016 100644 --- a/src/tests/TestMumbleProtocol/TestMumbleProtocol.cpp +++ b/src/tests/TestMumbleProtocol/TestMumbleProtocol.cpp @@ -223,7 +223,7 @@ template< Mumble::Protocol::Role encoderRole, Mumble::Protocol::Role decoderRole } class TestMumbleProtocol : public QObject { - Q_OBJECT; + Q_OBJECT private slots: void test_ping_client_to_server() { do_test_ping< Mumble::Protocol::Role::Client, Mumble::Protocol::Role::Server >(); diff --git a/src/tests/TestVersion/TestVersion.cpp b/src/tests/TestVersion/TestVersion.cpp index 3aaa9c50a95..0890a828e03 100644 --- a/src/tests/TestVersion/TestVersion.cpp +++ b/src/tests/TestVersion/TestVersion.cpp @@ -11,7 +11,7 @@ #include class TestVersion : public QObject { - Q_OBJECT; + Q_OBJECT private slots: void legacy_encode() {