From a41e7c75c18d6fb6db341118d128590a172579a7 Mon Sep 17 00:00:00 2001 From: RickyRister <42636155+RickyRister@users.noreply.github.com> Date: Sat, 25 Jan 2025 06:05:00 -0800 Subject: [PATCH] add missing override and explicit specifiers in src/deck and src/utility (#5525) * add missing override and explicit specifiers in src/deck * add missing override and explicit specifiers in src/utility --- cockatrice/src/deck/custom_line_edit.h | 2 +- cockatrice/src/deck/deck_loader.h | 4 ++-- cockatrice/src/deck/deck_stats_interface.h | 2 +- cockatrice/src/utility/sequence_edit.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cockatrice/src/deck/custom_line_edit.h b/cockatrice/src/deck/custom_line_edit.h index e6d003906..075ec012e 100644 --- a/cockatrice/src/deck/custom_line_edit.h +++ b/cockatrice/src/deck/custom_line_edit.h @@ -35,7 +35,7 @@ protected: void keyPressEvent(QKeyEvent *event) override; public: - SearchLineEdit() : LineEditUnfocusable(), treeView(nullptr) + SearchLineEdit() : treeView(nullptr) { } void setTreeView(QTreeView *_treeView) diff --git a/cockatrice/src/deck/deck_loader.h b/cockatrice/src/deck/deck_loader.h index d9863ac3e..ceb103009 100644 --- a/cockatrice/src/deck/deck_loader.h +++ b/cockatrice/src/deck/deck_loader.h @@ -29,8 +29,8 @@ private: public: DeckLoader(); - DeckLoader(const QString &nativeString); - DeckLoader(const DeckList &other); + explicit DeckLoader(const QString &nativeString); + explicit DeckLoader(const DeckList &other); DeckLoader(const DeckLoader &other); const QString &getLastFileName() const { diff --git a/cockatrice/src/deck/deck_stats_interface.h b/cockatrice/src/deck/deck_stats_interface.h index a6d77d1dc..c3611df81 100644 --- a/cockatrice/src/deck/deck_stats_interface.h +++ b/cockatrice/src/deck/deck_stats_interface.h @@ -31,7 +31,7 @@ private slots: void getAnalyzeRequestData(DeckList *deck, QByteArray *data); public: - DeckStatsInterface(CardDatabase &_cardDatabase, QObject *parent = nullptr); + explicit DeckStatsInterface(CardDatabase &_cardDatabase, QObject *parent = nullptr); void analyzeDeck(DeckList *deck); }; diff --git a/cockatrice/src/utility/sequence_edit.h b/cockatrice/src/utility/sequence_edit.h index ddb7847d6..e2ce6845e 100644 --- a/cockatrice/src/utility/sequence_edit.h +++ b/cockatrice/src/utility/sequence_edit.h @@ -11,7 +11,7 @@ class SequenceEdit : public QWidget { Q_OBJECT public: - SequenceEdit(const QString &_shortcutName, QWidget *parent = nullptr); + explicit SequenceEdit(const QString &_shortcutName, QWidget *parent = nullptr); QString getSequence(); void setShortcutName(const QString &_shortcutName); void refreshShortcut(); @@ -23,7 +23,7 @@ private slots: void restoreDefault(); protected: - bool eventFilter(QObject *, QEvent *event); + bool eventFilter(QObject *, QEvent *event) override; private: QString shortcutName;