diff --git a/src/FirmwarePlugin/APM/APMParameterMetaData.cc b/src/FirmwarePlugin/APM/APMParameterMetaData.cc index e463808efe28e1eb7546cd2f10801bb67d3113ac..7859fea5b764cdbf4f282ccca8bf51e0d91990a1 100644 --- a/src/FirmwarePlugin/APM/APMParameterMetaData.cc +++ b/src/FirmwarePlugin/APM/APMParameterMetaData.cc @@ -260,7 +260,7 @@ void APMParameterMetaData::loadParameterFactMetaDataFile(const QString& metaData qCDebug(APMParameterMetaDataLog) << "Duplicate parameter found:" << name; rawMetaData = _vehicleTypeToParametersMap[currentCategory][name]; } else { - rawMetaData = new APMFactMetaDataRaw(); + rawMetaData = new APMFactMetaDataRaw(this); _vehicleTypeToParametersMap[currentCategory][name] = rawMetaData; groupMembers[group] << name; } diff --git a/src/FirmwarePlugin/APM/APMParameterMetaData.h b/src/FirmwarePlugin/APM/APMParameterMetaData.h index fc028f30432a5c508ea086ff74cacecf92b0d554..51ca87b4569621c28a61ccb936df5a80922092eb 100644 --- a/src/FirmwarePlugin/APM/APMParameterMetaData.h +++ b/src/FirmwarePlugin/APM/APMParameterMetaData.h @@ -24,11 +24,12 @@ Q_DECLARE_LOGGING_CATEGORY(APMParameterMetaDataLog) Q_DECLARE_LOGGING_CATEGORY(APMParameterMetaDataVerboseLog) -class APMFactMetaDataRaw +class APMFactMetaDataRaw : public QObject { + Q_OBJECT public: - APMFactMetaDataRaw(void) - : rebootRequired(false) + APMFactMetaDataRaw(QObject *parent = nullptr) + : QObject(parent), rebootRequired(false) { } QString name; diff --git a/src/FirmwarePlugin/PX4/PX4ParameterMetaData.cc b/src/FirmwarePlugin/PX4/PX4ParameterMetaData.cc index fc5b403c6158959dc535fa31acc79dcbd00d00ab..9dc467ae13f9f63a38c76a70d4dffdc1cfac22f9 100644 --- a/src/FirmwarePlugin/PX4/PX4ParameterMetaData.cc +++ b/src/FirmwarePlugin/PX4/PX4ParameterMetaData.cc @@ -213,9 +213,7 @@ void PX4ParameterMetaData::loadParameterFactMetaDataFile(const QString& metaData } // Now that we know type we can create meta data object and add it to the system - - metaData = new FactMetaData(foundType); - Q_CHECK_PTR(metaData); + metaData = new FactMetaData(foundType, this); if (_mapParameterName2FactMetaData.contains(name)) { // We can't trust the meta data since we have dups qCWarning(PX4ParameterMetaDataLog) << "Duplicate parameter found:" << name;