From 8d71e67a75f35e4f779563c671155f49da9dae77 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 8 Sep 2021 13:23:20 +0200 Subject: [PATCH] Add Q_OBJECT macro where it's missing - Transifex tools complain about missing Q_OBJECT (which makes some sense -- you end up with a different context for calls to tr(), of the base class). --- src/calamares/VariantModel.h | 1 + src/libcalamares/JobExample.h | 3 +++ src/libcalamares/JobQueue.cpp | 5 +++++ src/modules/license/LicenseWidget.h | 1 + 4 files changed, 10 insertions(+) diff --git a/src/calamares/VariantModel.h b/src/calamares/VariantModel.h index 3b0b594b7..9d3323145 100644 --- a/src/calamares/VariantModel.h +++ b/src/calamares/VariantModel.h @@ -30,6 +30,7 @@ */ class VariantModel : public QAbstractItemModel { + Q_OBJECT public: /** @brief Auxiliary data * diff --git a/src/libcalamares/JobExample.h b/src/libcalamares/JobExample.h index 5c527af6d..e3506fec1 100644 --- a/src/libcalamares/JobExample.h +++ b/src/libcalamares/JobExample.h @@ -23,6 +23,7 @@ namespace Calamares */ class DLLEXPORT NamedJob : public Job { + Q_OBJECT public: explicit NamedJob( const QString& name, QObject* parent = nullptr ) : Job( parent ) @@ -39,6 +40,7 @@ protected: /// @brief Job does nothing, always succeeds class DLLEXPORT GoodJob : public NamedJob { + Q_OBJECT public: explicit GoodJob( const QString& name, QObject* parent = nullptr ) : NamedJob( name, parent ) @@ -52,6 +54,7 @@ public: /// @brief Job does nothing, always fails class DLLEXPORT FailJob : public NamedJob { + Q_OBJECT public: explicit FailJob( const QString& name, QObject* parent = nullptr ) : NamedJob( name, parent ) diff --git a/src/libcalamares/JobQueue.cpp b/src/libcalamares/JobQueue.cpp index a975c2c91..00b30f318 100644 --- a/src/libcalamares/JobQueue.cpp +++ b/src/libcalamares/JobQueue.cpp @@ -47,6 +47,7 @@ using WeightedJobList = QList< WeightedJob >; class JobThread : public QThread { + Q_OBJECT public: JobThread( JobQueue* queue ) : QThread( queue ) @@ -288,3 +289,7 @@ JobQueue::globalStorage() const } } // namespace Calamares + +#include "utils/moc-warnings.h" + +#include "JobQueue.moc" diff --git a/src/modules/license/LicenseWidget.h b/src/modules/license/LicenseWidget.h index 3f99163b9..eb7d8edd8 100644 --- a/src/modules/license/LicenseWidget.h +++ b/src/modules/license/LicenseWidget.h @@ -22,6 +22,7 @@ class QPushButton; class LicenseWidget : public QWidget { + Q_OBJECT public: LicenseWidget( LicenseEntry e, QWidget* parent = nullptr ); ~LicenseWidget() override;