diff --git a/logdoctor/customs/treewidgetitems.h b/logdoctor/customs/treewidgetitems.h index cd1539d3..15367c3b 100644 --- a/logdoctor/customs/treewidgetitems.h +++ b/logdoctor/customs/treewidgetitems.h @@ -5,7 +5,7 @@ #include -class LogFileTreeWidgetItem : public QTreeWidgetItem { +class LogFileTreeWidgetItem final : public QTreeWidgetItem { public: LogFileTreeWidgetItem(QTreeWidget*parent=nullptr):QTreeWidgetItem(parent){} bool operator < (const QTreeWidgetItem& other) const { diff --git a/logdoctor/games/crisscross/game.h b/logdoctor/games/crisscross/game.h index d4d2fb13..90afac5b 100644 --- a/logdoctor/games/crisscross/game.h +++ b/logdoctor/games/crisscross/game.h @@ -17,7 +17,7 @@ namespace Ui { /*! Player vs AI criss-cross game */ -class CrissCross : public QWidget +class CrissCross final : public QWidget { Q_OBJECT diff --git a/logdoctor/games/game_dialog.h b/logdoctor/games/game_dialog.h index dda912bd..83efa134 100644 --- a/logdoctor/games/game_dialog.h +++ b/logdoctor/games/game_dialog.h @@ -14,7 +14,7 @@ namespace Ui { /*! A dialog message to provide informations to the user */ -class GameDialog : public QDialog +class GameDialog final : public QDialog { Q_OBJECT diff --git a/logdoctor/games/snake/food.h b/logdoctor/games/snake/food.h index d433c49d..8e426162 100644 --- a/logdoctor/games/snake/food.h +++ b/logdoctor/games/snake/food.h @@ -8,7 +8,7 @@ class Snake; class QGraphicsPixmapItem; -class Food +class Food final { public: explicit Food( const bool can_move=false ); diff --git a/logdoctor/games/snake/game.h b/logdoctor/games/snake/game.h index 120b6862..e268d4ce 100644 --- a/logdoctor/games/snake/game.h +++ b/logdoctor/games/snake/game.h @@ -23,7 +23,7 @@ namespace Ui { /*! A reproduction of the timeless classic game */ -class SnakeGame : public QWidget +class SnakeGame final : public QWidget { Q_OBJECT diff --git a/logdoctor/games/snake/snake.h b/logdoctor/games/snake/snake.h index 2ab65153..c7a60424 100644 --- a/logdoctor/games/snake/snake.h +++ b/logdoctor/games/snake/snake.h @@ -21,7 +21,7 @@ enum Direction { //! Instance of a part of the body of the snake -struct BodyPart { +struct BodyPart final { unsigned x; //!< The position on the X-axis unsigned y; //!< The position on the Y-axis Direction direction; //!< The current direction of the part @@ -32,7 +32,7 @@ struct BodyPart { }; -class Snake : public std::vector +class Snake final : public std::vector { public: explicit Snake( const bool is_adversary=false ); @@ -90,7 +90,7 @@ private: F, // food }; - struct Tile { + struct Tile final { Entity entity; unsigned s_index; }; diff --git a/logdoctor/mainwindow.h b/logdoctor/mainwindow.h index 73f020c2..313c6da9 100644 --- a/logdoctor/mainwindow.h +++ b/logdoctor/mainwindow.h @@ -33,7 +33,7 @@ namespace Ui { /*! The parent window */ -class MainWindow : public QMainWindow +class MainWindow final : public QMainWindow { Q_OBJECT diff --git a/logdoctor/modules/craphelp/craphelp.h b/logdoctor/modules/craphelp/craphelp.h index 287f82ca..8d0c3001 100644 --- a/logdoctor/modules/craphelp/craphelp.h +++ b/logdoctor/modules/craphelp/craphelp.h @@ -16,7 +16,7 @@ namespace Ui { /*! Displays an help window */ -class Craphelp : public QWidget +class Craphelp final : public QWidget { Q_OBJECT diff --git a/logdoctor/modules/crapinfo/crapinfo.h b/logdoctor/modules/crapinfo/crapinfo.h index 723f8339..6d87937d 100644 --- a/logdoctor/modules/crapinfo/crapinfo.h +++ b/logdoctor/modules/crapinfo/crapinfo.h @@ -14,7 +14,7 @@ namespace Ui { /*! Displays informations */ -class Crapinfo : public QWidget +class Crapinfo final : public QWidget { Q_OBJECT diff --git a/logdoctor/modules/craplog/craplog.h b/logdoctor/modules/craplog/craplog.h index 3d97cb22..4d261b7b 100644 --- a/logdoctor/modules/craplog/craplog.h +++ b/logdoctor/modules/craplog/craplog.h @@ -17,7 +17,7 @@ /*! Performs operations related to the logs */ -class Craplog : public QObject +class Craplog final : public QObject { Q_OBJECT @@ -549,7 +549,7 @@ private: The rules to be used to decide whether a file name is valid or not \see isFileNameValid() */ - struct LogName { + struct LogName final { std::string starts; //!< What should be the initial part of the name std::string contains; //!< What should be contained in the middle of the name std::string ends; //!< What should be the final part of the name diff --git a/logdoctor/modules/craplog/modules/donuts.h b/logdoctor/modules/craplog/modules/donuts.h index 207607bc..f7430ea8 100644 --- a/logdoctor/modules/craplog/modules/donuts.h +++ b/logdoctor/modules/craplog/modules/donuts.h @@ -13,7 +13,7 @@ /*! Builds the donut chart to be displayed */ -class DonutBreakdown : public QChart +class DonutBreakdown final : public QChart { public: @@ -47,7 +47,7 @@ private: /*! A slice to be added at the donut */ -class MainSlice : public QPieSlice +class MainSlice final : public QPieSlice { Q_OBJECT diff --git a/logdoctor/modules/craplog/modules/formats.h b/logdoctor/modules/craplog/modules/formats.h index 520e5304..4a53bee5 100644 --- a/logdoctor/modules/craplog/modules/formats.h +++ b/logdoctor/modules/craplog/modules/formats.h @@ -13,7 +13,7 @@ struct LogsFormat; /*! Operations for the logs formats */ -class FormatOps +class FormatOps final { public: diff --git a/logdoctor/modules/craplog/modules/hash.h b/logdoctor/modules/craplog/modules/hash.h index 1de807f4..7a6fbb48 100644 --- a/logdoctor/modules/craplog/modules/hash.h +++ b/logdoctor/modules/craplog/modules/hash.h @@ -16,7 +16,7 @@ class QSqlQuery; /*! Operations for the hashes */ -class HashOps +class HashOps final { public: diff --git a/logdoctor/modules/craplog/modules/lib.h b/logdoctor/modules/craplog/modules/lib.h index 3b3ea9b4..62b5b73c 100644 --- a/logdoctor/modules/craplog/modules/lib.h +++ b/logdoctor/modules/craplog/modules/lib.h @@ -26,7 +26,7 @@ enum class LogType //! Holds informations about a log file -struct LogFile { +struct LogFile final { explicit LogFile() = default; explicit LogFile (const bool sel,const bool used,const size_t sz,const QString& nm,const std::string& hs,const std::string& pt) @@ -67,7 +67,7 @@ Q_DECLARE_METATYPE( LogFile ) //! Holds informations about a log format -struct LogsFormat { +struct LogsFormat final { explicit LogsFormat() = default; explicit LogsFormat (const std::string& str,const std::string& itl,const std::string& fnl,const std::vector& seps,const std::vector& flds,const unsigned nl) @@ -82,7 +82,7 @@ struct LogsFormat { //! Hold the items of a blacklist/warnlist -struct BWlist { +struct BWlist final { bool used; //!< Whether the list is set to be used or not std::vector list; //!< The list of items }; diff --git a/logdoctor/modules/craplog/modules/workers/lib.h b/logdoctor/modules/craplog/modules/workers/lib.h index 7f46696e..aa6a131e 100644 --- a/logdoctor/modules/craplog/modules/workers/lib.h +++ b/logdoctor/modules/craplog/modules/workers/lib.h @@ -29,7 +29,7 @@ Q_DECLARE_METATYPE(WorkerDialog) Holds the data of a single field from a log line \see LogLineData */ -struct FieldData +struct FieldData final { FieldData() noexcept : is_set{false} {} @@ -65,7 +65,7 @@ inline size_t operator +(const size_t lhs, const FieldData& rhs) /*! Holds the data of a single log line */ -struct LogLineData +struct LogLineData final { LogLineData(const std::string& line, const LogsFormat& logs_format); ~LogLineData() noexcept = default; diff --git a/logdoctor/modules/craplog/modules/workers/lister.h b/logdoctor/modules/craplog/modules/workers/lister.h index f8189c91..cb22b45a 100644 --- a/logdoctor/modules/craplog/modules/workers/lister.h +++ b/logdoctor/modules/craplog/modules/workers/lister.h @@ -11,7 +11,7 @@ class HashOps; enum class WorkerDialog; -class CraplogLister : public QObject +class CraplogLister final : public QObject { Q_OBJECT diff --git a/logdoctor/modules/craplog/modules/workers/parser.h b/logdoctor/modules/craplog/modules/workers/parser.h index 0952b276..c448580a 100644 --- a/logdoctor/modules/craplog/modules/workers/parser.h +++ b/logdoctor/modules/craplog/modules/workers/parser.h @@ -17,7 +17,7 @@ enum class WorkerDialog; class QSqlDatabase; -class CraplogParser : public QObject +class CraplogParser final : public QObject { Q_OBJECT diff --git a/logdoctor/modules/crapup/crapup.h b/logdoctor/modules/crapup/crapup.h index a95e9a1d..0cd33f28 100644 --- a/logdoctor/modules/crapup/crapup.h +++ b/logdoctor/modules/crapup/crapup.h @@ -18,7 +18,7 @@ namespace Ui { /*! */ -class Crapup : public QWidget +class Crapup final : public QWidget { Q_OBJECT diff --git a/logdoctor/modules/crapview/crapview.h b/logdoctor/modules/crapview/crapview.h index 6a43eeba..c44635c9 100644 --- a/logdoctor/modules/crapview/crapview.h +++ b/logdoctor/modules/crapview/crapview.h @@ -16,7 +16,7 @@ class QTableWidget; /*! Performs operations related to the visualization of the statistics */ -class Crapview : public QObject +class Crapview final : public QObject { Q_OBJECT DATA_TYPEDEFS diff --git a/logdoctor/modules/crapview/modules/query.h b/logdoctor/modules/crapview/modules/query.h index 7b5254d9..8191450b 100644 --- a/logdoctor/modules/crapview/modules/query.h +++ b/logdoctor/modules/crapview/modules/query.h @@ -16,7 +16,7 @@ using stats_count_items_t = std::multimap; -class DbQuery +class DbQuery final { DATA_TYPEDEFS diff --git a/logdoctor/modules/dialogs.h b/logdoctor/modules/dialogs.h index 27aa219f..22fd215f 100644 --- a/logdoctor/modules/dialogs.h +++ b/logdoctor/modules/dialogs.h @@ -10,7 +10,7 @@ Implements various dialog models \see DialogMsg, DialogBool, DialogDia */ -class DialogSec : public QObject +class DialogSec final : public QObject { Q_OBJECT diff --git a/logdoctor/modules/dialogs/boolean_dialog.h b/logdoctor/modules/dialogs/boolean_dialog.h index 67414135..36a62d4e 100644 --- a/logdoctor/modules/dialogs/boolean_dialog.h +++ b/logdoctor/modules/dialogs/boolean_dialog.h @@ -13,7 +13,7 @@ namespace Ui { /*! YES/NO choice dialog */ -class DialogBool : public QDialog +class DialogBool final : public QDialog { Q_OBJECT diff --git a/logdoctor/modules/dialogs/ida_dialog.h b/logdoctor/modules/dialogs/ida_dialog.h index 40406b05..44797560 100644 --- a/logdoctor/modules/dialogs/ida_dialog.h +++ b/logdoctor/modules/dialogs/ida_dialog.h @@ -14,7 +14,7 @@ namespace Ui { /*! IGNORE/DISCARD/ABORT choice dialog */ -class DialogIda : public QDialog +class DialogIda final : public QDialog { Q_OBJECT diff --git a/logdoctor/modules/dialogs/message_dialog.h b/logdoctor/modules/dialogs/message_dialog.h index 77cd15aa..aedebfa4 100644 --- a/logdoctor/modules/dialogs/message_dialog.h +++ b/logdoctor/modules/dialogs/message_dialog.h @@ -21,7 +21,7 @@ namespace Ui { /*! A dialog message to provide informations to the user */ -class DialogMsg : public QDialog +class DialogMsg final : public QDialog { Q_OBJECT diff --git a/logdoctor/modules/exceptions.h b/logdoctor/modules/exceptions.h index 1094bc4b..364c4709 100644 --- a/logdoctor/modules/exceptions.h +++ b/logdoctor/modules/exceptions.h @@ -11,7 +11,7 @@ /*! Generic exception for general purposes */ -class GenericException : public std::exception { +class GenericException final : public std::exception { public: explicit GenericException( const std::string& msg, const bool to_sys=false ); const QString& what(); @@ -26,7 +26,7 @@ private: /*! Exception related to a Web Server */ -class WebServerException : public std::exception { +class WebServerException final : public std::exception { public: explicit WebServerException( const std::string& msg ); /*const QString& what(); @@ -41,7 +41,7 @@ private: /*! Exception related to a Logs Format */ -class LogFormatException : public std::exception { +class LogFormatException final : public std::exception { public: explicit LogFormatException( const std::string& msg ); const QString& what(); @@ -56,7 +56,7 @@ private: /*! Exception related to the logs parser */ -class LogParserException : public std::exception { +class LogParserException final : public std::exception { public: explicit LogParserException( const std::string& txt, const std::string& val ); const QString& what(); @@ -71,7 +71,7 @@ private: /*! Exception related to a date/time */ -class DateTimeException : public std::exception { +class DateTimeException final : public std::exception { public: explicit DateTimeException( const std::string& msg ); /*const QString& what(); @@ -86,7 +86,7 @@ private: /*! Exception related to a blacklist/warnlist */ -class BWlistException : public std::exception { +class BWlistException final : public std::exception { public: explicit BWlistException( const std::string& msg ); /*const QString& what(); diff --git a/logdoctor/modules/shared.h b/logdoctor/modules/shared.h index 37505f30..9a32c8f1 100644 --- a/logdoctor/modules/shared.h +++ b/logdoctor/modules/shared.h @@ -9,7 +9,7 @@ /*! Fictitious class for the translations */ -class TR : public QObject +class TR final : public QObject { Q_OBJECT public: diff --git a/logdoctor/modules/tb.h b/logdoctor/modules/tb.h index d1e1188e..374442f7 100644 --- a/logdoctor/modules/tb.h +++ b/logdoctor/modules/tb.h @@ -12,7 +12,7 @@ /*! Perform operations for files visualization */ -class TextBrowser +class TextBrowser final { public: diff --git a/logdoctor/tools/crapnote/crapnote.h b/logdoctor/tools/crapnote/crapnote.h index ea9575d8..7b98fa4c 100644 --- a/logdoctor/tools/crapnote/crapnote.h +++ b/logdoctor/tools/crapnote/crapnote.h @@ -14,7 +14,7 @@ namespace Ui { /*! A simple block-note like widget */ -class Crapnote : public QWidget +class Crapnote final : public QWidget { Q_OBJECT diff --git a/logdoctor/utilities/gzip.cpp b/logdoctor/utilities/gzip.cpp index 28e8cfe1..a59c3196 100644 --- a/logdoctor/utilities/gzip.cpp +++ b/logdoctor/utilities/gzip.cpp @@ -25,7 +25,7 @@ //! RAII class to handle s file resource -class FileHandler +class FileHandler final { FILE* file; diff --git a/logdoctor/utilities/io.cpp b/logdoctor/utilities/io.cpp index 7ba99c42..5640cba9 100644 --- a/logdoctor/utilities/io.cpp +++ b/logdoctor/utilities/io.cpp @@ -12,7 +12,7 @@ //! RAII class to handle a file stream resource template -class FileHandler +class FileHandler final { Stream file; diff --git a/logdoctor/utilities/rtf.h b/logdoctor/utilities/rtf.h index ae32bde2..d75c708b 100644 --- a/logdoctor/utilities/rtf.h +++ b/logdoctor/utilities/rtf.h @@ -15,7 +15,7 @@ class QString; /*! Utilities for the TextBrowser */ -class RichText : public QObject +class RichText final : public QObject { Q_OBJECT