Skip to content

Commit

Permalink
REFAC: Remove unnecessary semicolons
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzmbrzl committed Dec 30, 2023
1 parent a4072e0 commit 1c83414
Show file tree
Hide file tree
Showing 35 changed files with 54 additions and 55 deletions.
2 changes: 1 addition & 1 deletion src/EnvUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ bool waylandIsUsed() {
return getenv(QStringLiteral("WAYLAND_DISPLAY")) != "";
}

}; // namespace EnvUtils
} // namespace EnvUtils
2 changes: 1 addition & 1 deletion src/EnvUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ bool setenv(QString name, QString value);

bool waylandIsUsed();

}; // namespace EnvUtils
} // namespace EnvUtils

#endif
4 changes: 2 additions & 2 deletions src/LogEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
}
2 changes: 1 addition & 1 deletion src/MumbleProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -883,4 +883,4 @@ namespace Protocol {
#undef PROCESS_CLASS

} // namespace Protocol
}; // namespace Mumble
} // namespace Mumble
8 changes: 4 additions & 4 deletions src/MumbleProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 };

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/ProtoUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ void setSuggestedVersion(MumbleProto::SuggestConfig &msg, const ::Version::full_
msg.set_version_v1(::Version::toLegacyVersion(version));
}

}; // namespace MumbleProto
} // namespace MumbleProto
2 changes: 1 addition & 1 deletion src/ProtoUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_
4 changes: 2 additions & 2 deletions src/QtUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ namespace QtUtils {
}


}; // namespace QtUtils
}; // namespace Mumble
} // namespace QtUtils
} // namespace Mumble
4 changes: 2 additions & 2 deletions src/QtUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) >;

Expand Down
2 changes: 1 addition & 1 deletion src/Version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ bool getComponents(Version::component_t &major, Version::component_t &minor, Ver
return false;
}

}; // namespace Version
} // namespace Version
2 changes: 1 addition & 1 deletion src/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions src/mumble/API.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/mumble/DeveloperConsole.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class DeveloperConsole : public QObject {
private:
Q_OBJECT
Q_DISABLE_COPY(DeveloperConsole);
Q_DISABLE_COPY(DeveloperConsole)

protected:
QPointer< QMainWindow > m_window;
Expand Down
2 changes: 1 addition & 1 deletion src/mumble/Overlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct OverlayAppInfo {

class OverlayGroup : public QGraphicsItem {
private:
Q_DISABLE_COPY(OverlayGroup);
Q_DISABLE_COPY(OverlayGroup)

public:
enum { Type = UserType + 5 };
Expand Down
2 changes: 1 addition & 1 deletion src/mumble/OverlayPositionableItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/mumble/OverlayUserGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down
4 changes: 2 additions & 2 deletions src/mumble/PluginInstaller.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/mumble/PluginUpdater.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/mumble/PositionalAudioViewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class PositionalAudioViewer : public QDialog {
std::unique_ptr< Ui::PositionalAudioViewer > m_ui;

private:
Q_OBJECT;
Q_OBJECT
};

#endif
4 changes: 2 additions & 2 deletions src/mumble/SearchDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 >
Expand Down Expand Up @@ -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 >
Expand Down
4 changes: 2 additions & 2 deletions src/mumble/SearchDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/mumble/ServerInformation.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions src/mumble/TalkingUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/mumble/UserLocalNicknameDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/mumble/widgets/RichTextItemDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/mumble/widgets/SearchDialogItemDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/murmur/Meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/MumbleServerIce.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct TextMessage;

class MumbleServerIce : public QObject {
friend class MurmurLocker;
Q_OBJECT;
Q_OBJECT

protected:
int count;
Expand Down
8 changes: 4 additions & 4 deletions src/murmur/Server.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ struct TextMessage {

class SslServer : public QTcpServer {
private:
Q_OBJECT;
Q_OBJECT
Q_DISABLE_COPY(SslServer)
protected:
QList< QSslSocket * > qlSockets;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/ServerDB.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/Tray.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class QAction;
class Tray : public QObject {
private:
Q_OBJECT
Q_DISABLE_COPY(Tray);
Q_DISABLE_COPY(Tray)

protected:
QSystemTrayIcon *qsti;
Expand Down
4 changes: 2 additions & 2 deletions src/tests/Emit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <boost/signals.hpp>

class Slotter : public QObject {
Q_OBJECT;
Q_OBJECT

public:
Slotter(QObject *p = nullptr) : QObject(p){};
Expand All @@ -18,7 +18,7 @@ public Q_SLOTS:
};

class Emitter : public QObject {
Q_OBJECT;
Q_OBJECT

public:
Slotter *s;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/tests/TestMumbleProtocol/TestMumbleProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 >();
Expand Down
2 changes: 1 addition & 1 deletion src/tests/TestVersion/TestVersion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <limits>

class TestVersion : public QObject {
Q_OBJECT;
Q_OBJECT
private slots:

void legacy_encode() {
Expand Down

0 comments on commit 1c83414

Please sign in to comment.