refactor: clang-tidy

This commit is contained in:
Lars Toenning
2025-06-09 21:22:28 +02:00
parent 5004db1885
commit 71c868866c
12 changed files with 195 additions and 169 deletions

View File

@@ -34,17 +34,29 @@ namespace swift::misc
/*!
* Just a subclass of QThread whose destructor waits for the thread to finish.
*/
class SWIFT_MISC_EXPORT CRegularThread : public QThread
class SWIFT_MISC_EXPORT CRegularThread final : public QThread
{
Q_OBJECT
public:
//! Constructor
CRegularThread(QObject *parent = nullptr) : QThread(parent) {}
explicit CRegularThread(QObject *parent = nullptr) : QThread(parent) {}
//! Destructor
~CRegularThread() override;
//! Copy constructor
CRegularThread(const CRegularThread &) = delete;
//! Copy assignment
CRegularThread &operator=(const CRegularThread &) = delete;
//! Move constructor
CRegularThread(CRegularThread &&) = delete;
//! Move assignment
CRegularThread &operator=(CRegularThread &&) = delete;
protected:
//! \copydoc QThread::run
void run() override;
@@ -61,6 +73,21 @@ namespace swift::misc
Q_OBJECT
public:
//! Destructor.
~CWorkerBase() override;
//! Copy constructor
CWorkerBase(const CWorkerBase &) = delete;
//! Copy assignment
CWorkerBase &operator=(const CWorkerBase &) = delete;
//! Move constructor
CWorkerBase(CWorkerBase &&) = delete;
//! Move assignment
CWorkerBase &operator=(CWorkerBase &&) = delete;
//! Log categories
static const QStringList &getLogCategories();
@@ -147,9 +174,6 @@ namespace swift::misc
//! Constructor.
CWorkerBase();
//! Destructor.
~CWorkerBase() override;
//! For the task to check whether it can finish early.
//! \threadsafe
bool isAbandoned() const;