[Fix-Warnings] Remove more redundant empty declarations. (extra semicolons) (#6374)

This commit is contained in:
BruebachL
2025-11-29 14:19:11 +01:00
committed by GitHub
parent 858361e6d3
commit 8abd04dab1
21 changed files with 37 additions and 37 deletions

View File

@@ -22,7 +22,7 @@ public:
inline QString getCardUpdaterBinaryName() inline QString getCardUpdaterBinaryName()
{ {
return "oracle"; return "oracle";
}; }
QByteArray getHash(const QString fileName); QByteArray getHash(const QString fileName);
QByteArray getHash(QByteArray data); QByteArray getHash(QByteArray data);
static bool deleteSpoilerFile(); static bool deleteSpoilerFile();

View File

@@ -99,15 +99,15 @@ public:
void setSequence(const QList &_sequence) void setSequence(const QList &_sequence)
{ {
QList::operator=(_sequence); QList::operator=(_sequence);
}; }
[[nodiscard]] QString getName() const [[nodiscard]] QString getName() const
{ {
return QApplication::translate("shortcutsTab", name.toUtf8().data()); return QApplication::translate("shortcutsTab", name.toUtf8().data());
}; }
[[nodiscard]] QString getGroupName() const [[nodiscard]] QString getGroupName() const
{ {
return ShortcutGroup::getGroupName(group); return ShortcutGroup::getGroupName(group);
}; }
private: private:
QString name; QString name;
@@ -129,7 +129,7 @@ public:
[[nodiscard]] QList<QString> getAllShortcutKeys() const [[nodiscard]] QList<QString> getAllShortcutKeys() const
{ {
return shortCuts.keys(); return shortCuts.keys();
}; }
void setShortcuts(const QString &name, const QList<QKeySequence> &Sequence); void setShortcuts(const QString &name, const QList<QKeySequence> &Sequence);
void setShortcuts(const QString &name, const QKeySequence &Sequence); void setShortcuts(const QString &name, const QKeySequence &Sequence);

View File

@@ -15,7 +15,7 @@ public:
[[nodiscard]] bool getIncludeRebalancedCards() const override [[nodiscard]] bool getIncludeRebalancedCards() const override
{ {
return SettingsCache::instance().getIncludeRebalancedCards(); return SettingsCache::instance().getIncludeRebalancedCards();
}; }
}; };
#endif // COCKATRICE_SETTINGS_CARD_PREFERENCE_PROVIDER_H #endif // COCKATRICE_SETTINGS_CARD_PREFERENCE_PROVIDER_H

View File

@@ -113,7 +113,7 @@ public:
[[nodiscard]] PlayerActions *getPlayerActions() const [[nodiscard]] PlayerActions *getPlayerActions() const
{ {
return playerActions; return playerActions;
}; }
[[nodiscard]] PlayerEventHandler *getPlayerEventHandler() const [[nodiscard]] PlayerEventHandler *getPlayerEventHandler() const
{ {
@@ -123,7 +123,7 @@ public:
[[nodiscard]] PlayerInfo *getPlayerInfo() const [[nodiscard]] PlayerInfo *getPlayerInfo() const
{ {
return playerInfo; return playerInfo;
}; }
[[nodiscard]] PlayerMenu *getPlayerMenu() const [[nodiscard]] PlayerMenu *getPlayerMenu() const
{ {

View File

@@ -52,7 +52,7 @@ public:
void rawInsertCard(CardItem *card, int index) void rawInsertCard(CardItem *card, int index)
{ {
cards.insert(index, card); cards.insert(index, card);
}; }
[[nodiscard]] const CardList &getCards() const [[nodiscard]] const CardList &getCards() const
{ {

View File

@@ -23,15 +23,15 @@ public:
[[nodiscard]] bool isColorActive() const [[nodiscard]] bool isColorActive() const
{ {
return isActive; return isActive;
}; }
[[nodiscard]] QString getSymbol() const [[nodiscard]] QString getSymbol() const
{ {
return symbol; return symbol;
}; }
[[nodiscard]] QChar getSymbolChar() const [[nodiscard]] QChar getSymbolChar() const
{ {
return symbol[0]; return symbol[0];
}; }
void loadManaIcon(); void loadManaIcon();

View File

@@ -32,7 +32,7 @@ public:
QTreeView *getDatabaseView() QTreeView *getDatabaseView()
{ {
return databaseView; return databaseView;
}; }
public slots: public slots:
ExactCard currentCard() const; ExactCard currentCard() const;

View File

@@ -39,7 +39,7 @@ public:
[[nodiscard]] DeckListModel *getDeckModel() const [[nodiscard]] DeckListModel *getDeckModel() const
{ {
return deckModel; return deckModel;
}; }
public slots: public slots:
void retranslateUi(); void retranslateUi();

View File

@@ -167,4 +167,4 @@ const ServerInfo_User *UserListManager::getOnlineUser(const QString &userName) c
} }
return nullptr; return nullptr;
}; }

View File

@@ -24,7 +24,7 @@ public:
[[nodiscard]] QString getBannerText() const [[nodiscard]] QString getBannerText() const
{ {
return header->getText(); return header->getText();
}; }
private: private:
QVBoxLayout *layout; QVBoxLayout *layout;

View File

@@ -44,7 +44,7 @@ public:
{ {
state = newState; state = newState;
update(); update();
}; }
signals: signals:
/** /**

View File

@@ -31,7 +31,7 @@ public:
[[nodiscard]] FlowWidget *getFlowWidget() const [[nodiscard]] FlowWidget *getFlowWidget() const
{ {
return flowWidget; return flowWidget;
}; }
public slots: public slots:
void updateVisibility(bool recursive = true); void updateVisibility(bool recursive = true);

View File

@@ -135,7 +135,7 @@ private:
inline QString getCardUpdaterBinaryName() inline QString getCardUpdaterBinaryName()
{ {
return "oracle"; return "oracle";
}; }
void createCardUpdateProcess(bool background = false); void createCardUpdateProcess(bool background = false);
void exitCardDatabaseUpdate(); void exitCardDatabaseUpdate();

View File

@@ -190,7 +190,7 @@ public:
const QSet<QString> &getAltNames() const QSet<QString> &getAltNames()
{ {
return altNames; return altNames;
}; }
[[nodiscard]] const QString &getText() const [[nodiscard]] const QString &getText() const
{ {
return text; return text;

View File

@@ -53,6 +53,6 @@ inline static const QString getNicePropertyName(QString key)
return QCoreApplication::translate("Mtg", "Color Identity"); return QCoreApplication::translate("Mtg", "Color Identity");
return key; return key;
} }
}; // namespace Mtg } // namespace Mtg
#endif #endif

View File

@@ -158,7 +158,7 @@ protected:
virtual QString getCardZoneFromName(const QString /*cardName*/, QString currentZoneName) virtual QString getCardZoneFromName(const QString /*cardName*/, QString currentZoneName)
{ {
return currentZoneName; return currentZoneName;
}; }
/** /**
* @brief Produce the complete display name of a card. * @brief Produce the complete display name of a card.
@@ -169,7 +169,7 @@ protected:
virtual QString getCompleteCardName(const QString &cardName) const virtual QString getCompleteCardName(const QString &cardName) const
{ {
return cardName; return cardName;
}; }
signals: signals:
/// Emitted when the deck hash changes. /// Emitted when the deck hash changes.

View File

@@ -203,7 +203,7 @@ public:
[[nodiscard]] QModelIndex getRoot() const [[nodiscard]] QModelIndex getRoot() const
{ {
return nodeToIndex(root); return nodeToIndex(root);
}; }
/** /**
* @brief Returns the value of the grouping category for a card based on the current criteria. * @brief Returns the value of the grouping category for a card based on the current criteria.

View File

@@ -25,7 +25,7 @@ public:
QString getConnectionType() const override QString getConnectionType() const override
{ {
return "local"; return "local";
}; }
void transmitProtocolItem(const ServerMessage &item) override; void transmitProtocolItem(const ServerMessage &item) override;
signals: signals:
void itemToClient(const ServerMessage &item); void itemToClient(const ServerMessage &item);

View File

@@ -76,7 +76,7 @@ public:
virtual void prepareDestroy() virtual void prepareDestroy()
{ {
removeFromGame(); removeFromGame();
}; }
void removeFromGame(); void removeFromGame();
Server_AbstractUserInterface *getUserInterface() const Server_AbstractUserInterface *getUserInterface() const
{ {

View File

@@ -83,7 +83,7 @@ public:
virtual bool usernameIsValid(const QString & /*userName */, QString & /* error */) virtual bool usernameIsValid(const QString & /*userName */, QString & /* error */)
{ {
return true; return true;
}; }
public slots: public slots:
virtual void endSession(qint64 /* sessionId */) virtual void endSession(qint64 /* sessionId */)
{ {
@@ -154,16 +154,16 @@ public:
int & /* banSecondsRemaining */) int & /* banSecondsRemaining */)
{ {
return false; return false;
}; }
virtual int checkNumberOfUserAccounts(const QString & /* email */) virtual int checkNumberOfUserAccounts(const QString & /* email */)
{ {
return 0; return 0;
}; }
virtual bool virtual bool
changeUserPassword(const QString & /* user */, const QString & /* password */, bool /* passwordNeedsHash */) changeUserPassword(const QString & /* user */, const QString & /* password */, bool /* passwordNeedsHash */)
{ {
return false; return false;
}; }
virtual bool changeUserPassword(const QString & /* user */, virtual bool changeUserPassword(const QString & /* user */,
const QString & /* oldPassword */, const QString & /* oldPassword */,
bool /* oldPasswordNeedsHash */, bool /* oldPasswordNeedsHash */,
@@ -171,7 +171,7 @@ public:
bool /* newPasswordNeedsHash */) bool /* newPasswordNeedsHash */)
{ {
return false; return false;
}; }
}; };
#endif #endif

View File

@@ -177,7 +177,7 @@ public:
QString getConnectionType() const QString getConnectionType() const
{ {
return "tcp"; return "tcp";
}; }
private: private:
QTcpSocket *socket; QTcpSocket *socket;
@@ -190,11 +190,11 @@ protected:
void writeToSocket(QByteArray &data) void writeToSocket(QByteArray &data)
{ {
socket->write(data); socket->write(data);
}; }
void flushSocket() void flushSocket()
{ {
socket->flush(); socket->flush();
}; }
void initSessionDeprecated(); void initSessionDeprecated();
bool initTcpSession(); bool initTcpSession();
protected slots: protected slots:
@@ -224,7 +224,7 @@ public:
QString getConnectionType() const QString getConnectionType() const
{ {
return "websocket"; return "websocket";
}; }
private: private:
QWebSocket *socket; QWebSocket *socket;
@@ -234,11 +234,11 @@ protected:
void writeToSocket(QByteArray &data) void writeToSocket(QByteArray &data)
{ {
socket->sendBinaryMessage(data); socket->sendBinaryMessage(data);
}; }
void flushSocket() void flushSocket()
{ {
socket->flush(); socket->flush();
}; }
bool initWebsocketSession(); bool initWebsocketSession();
protected slots: protected slots:
void binaryMessageReceived(const QByteArray &message); void binaryMessageReceived(const QByteArray &message);