Commit 5bbb207d authored by Gus Grubba's avatar Gus Grubba

CP - Cleanup warnings

parent e4367ef6
...@@ -16,7 +16,7 @@ Item { ...@@ -16,7 +16,7 @@ Item {
height: _valid ? weatherRow.height : 0 height: _valid ? weatherRow.height : 0
width: _valid ? weatherRow.width : 0 width: _valid ? weatherRow.width : 0
property color contentColor: "#ffffff" property color contentColor: "#ffffff"
property var iconHeight: ScreenTools.defaultFontPixelHeight * 2 property real iconHeight: ScreenTools.defaultFontPixelHeight * 2
property bool _valid: QGroundControl.airspaceManager.weatherInfo.valid property bool _valid: QGroundControl.airspaceManager.weatherInfo.valid
property bool _celcius: QGroundControl.settingsManager.unitsSettings.temperatureUnits.rawValue === UnitsSettings.TemperatureUnitsCelsius property bool _celcius: QGroundControl.settingsManager.unitsSettings.temperatureUnits.rawValue === UnitsSettings.TemperatureUnitsCelsius
property int _tempC: _valid ? QGroundControl.airspaceManager.weatherInfo.temperature : 0 property int _tempC: _valid ? QGroundControl.airspaceManager.weatherInfo.temperature : 0
......
...@@ -23,10 +23,10 @@ Fact::Fact(QObject* parent) ...@@ -23,10 +23,10 @@ Fact::Fact(QObject* parent)
, _componentId (-1) , _componentId (-1)
, _rawValue (0) , _rawValue (0)
, _type (FactMetaData::valueTypeInt32) , _type (FactMetaData::valueTypeInt32)
, _metaData (NULL) , _metaData (nullptr)
, _sendValueChangedSignals (true) , _sendValueChangedSignals (true)
, _deferredValueChangeSignal(false) , _deferredValueChangeSignal(false)
, _valueSliderModel (NULL) , _valueSliderModel (nullptr)
{ {
FactMetaData* metaData = new FactMetaData(_type, this); FactMetaData* metaData = new FactMetaData(_type, this);
setMetaData(metaData); setMetaData(metaData);
...@@ -40,10 +40,10 @@ Fact::Fact(int componentId, QString name, FactMetaData::ValueType_t type, QObjec ...@@ -40,10 +40,10 @@ Fact::Fact(int componentId, QString name, FactMetaData::ValueType_t type, QObjec
, _componentId (componentId) , _componentId (componentId)
, _rawValue (0) , _rawValue (0)
, _type (type) , _type (type)
, _metaData (NULL) , _metaData (nullptr)
, _sendValueChangedSignals (true) , _sendValueChangedSignals (true)
, _deferredValueChangeSignal(false) , _deferredValueChangeSignal(false)
, _valueSliderModel (NULL) , _valueSliderModel (nullptr)
{ {
FactMetaData* metaData = new FactMetaData(_type, this); FactMetaData* metaData = new FactMetaData(_type, this);
setMetaData(metaData); setMetaData(metaData);
...@@ -57,10 +57,10 @@ Fact::Fact(const QString& settingsGroup, FactMetaData* metaData, QObject* parent ...@@ -57,10 +57,10 @@ Fact::Fact(const QString& settingsGroup, FactMetaData* metaData, QObject* parent
, _componentId (0) , _componentId (0)
, _rawValue (0) , _rawValue (0)
, _type (metaData->type()) , _type (metaData->type())
, _metaData (NULL) , _metaData (nullptr)
, _sendValueChangedSignals (true) , _sendValueChangedSignals (true)
, _deferredValueChangeSignal(false) , _deferredValueChangeSignal(false)
, _valueSliderModel (NULL) , _valueSliderModel (nullptr)
{ {
qgcApp()->toolbox()->corePlugin()->adjustSettingMetaData(settingsGroup, *metaData); qgcApp()->toolbox()->corePlugin()->adjustSettingMetaData(settingsGroup, *metaData);
setMetaData(metaData, true /* setDefaultFromMetaData */); setMetaData(metaData, true /* setDefaultFromMetaData */);
...@@ -90,11 +90,11 @@ const Fact& Fact::operator=(const Fact& other) ...@@ -90,11 +90,11 @@ const Fact& Fact::operator=(const Fact& other)
_type = other._type; _type = other._type;
_sendValueChangedSignals = other._sendValueChangedSignals; _sendValueChangedSignals = other._sendValueChangedSignals;
_deferredValueChangeSignal = other._deferredValueChangeSignal; _deferredValueChangeSignal = other._deferredValueChangeSignal;
_valueSliderModel = NULL; _valueSliderModel = nullptr;
if (_metaData && other._metaData) { if (_metaData && other._metaData) {
*_metaData = *other._metaData; *_metaData = *other._metaData;
} else { } else {
_metaData = NULL; _metaData = nullptr;
} }
return *this; return *this;
......
...@@ -48,10 +48,10 @@ public: ...@@ -48,10 +48,10 @@ public:
typedef QVariant (*Translator)(const QVariant& from); typedef QVariant (*Translator)(const QVariant& from);
FactMetaData(QObject* parent = NULL); FactMetaData(QObject* parent = nullptr);
FactMetaData(ValueType_t type, QObject* parent = NULL); FactMetaData(ValueType_t type, QObject* parent = nullptr);
FactMetaData(ValueType_t type, const QString name, QObject* parent = NULL); FactMetaData(ValueType_t type, const QString name, QObject* parent = nullptr);
FactMetaData(const FactMetaData& other, QObject* parent = NULL); FactMetaData(const FactMetaData& other, QObject* parent = nullptr);
static QMap<QString, FactMetaData*> createMapFromJsonFile(const QString& jsonFilename, QObject* metaDataParent); static QMap<QString, FactMetaData*> createMapFromJsonFile(const QString& jsonFilename, QObject* metaDataParent);
static QMap<QString, FactMetaData*> createMapFromJsonArray(const QJsonArray jsonArray, QObject* metaDataParent); static QMap<QString, FactMetaData*> createMapFromJsonArray(const QJsonArray jsonArray, QObject* metaDataParent);
......
...@@ -157,7 +157,7 @@ Item { ...@@ -157,7 +157,7 @@ Item {
id: instrumentsColumn id: instrumentsColumn
spacing: ScreenTools.defaultFontPixelHeight * 0.25 spacing: ScreenTools.defaultFontPixelHeight * 0.25
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: QGroundControl.corePlugin.options.instrumentWidget.widgetTopMargin + (ScreenTools.defaultFontPixelHeight * 0.5) anchors.topMargin: QGroundControl.corePlugin.options.instrumentWidget ? (QGroundControl.corePlugin.options.instrumentWidget.widgetTopMargin + (ScreenTools.defaultFontPixelHeight * 0.5)) : 0
anchors.margins: ScreenTools.defaultFontPixelHeight * 0.5 anchors.margins: ScreenTools.defaultFontPixelHeight * 0.5
anchors.right: parent.right anchors.right: parent.right
//------------------------------------------------------- //-------------------------------------------------------
......
...@@ -254,8 +254,8 @@ bool CameraCalc::load(const QJsonObject& json, QString& errorString) ...@@ -254,8 +254,8 @@ bool CameraCalc::load(const QJsonObject& json, QString& errorString)
{ sideOverlapName, QJsonValue::Double, true }, { sideOverlapName, QJsonValue::Double, true },
}; };
if (!JsonHelper::validateKeys(v1Json, keyInfoList2, errorString)) { if (!JsonHelper::validateKeys(v1Json, keyInfoList2, errorString)) {
return false;
_disableRecalc = false; _disableRecalc = false;
return false;
} }
_valueSetIsDistanceFact.setRawValue (v1Json[valueSetIsDistanceName].toBool()); _valueSetIsDistanceFact.setRawValue (v1Json[valueSetIsDistanceName].toBool());
......
...@@ -15,17 +15,17 @@ ...@@ -15,17 +15,17 @@
SettingsManager::SettingsManager(QGCApplication* app, QGCToolbox* toolbox) SettingsManager::SettingsManager(QGCApplication* app, QGCToolbox* toolbox)
: QGCTool(app, toolbox) : QGCTool(app, toolbox)
#if defined(QGC_AIRMAP_ENABLED) #if defined(QGC_AIRMAP_ENABLED)
, _airMapSettings (NULL) , _airMapSettings (nullptr)
#endif #endif
, _appSettings (NULL) , _appSettings (nullptr)
, _unitsSettings (NULL) , _unitsSettings (nullptr)
, _autoConnectSettings (NULL) , _autoConnectSettings (nullptr)
, _videoSettings (NULL) , _videoSettings (nullptr)
, _flightMapSettings (NULL) , _flightMapSettings (nullptr)
, _rtkSettings (NULL) , _rtkSettings (nullptr)
, _flyViewSettings (NULL) , _flyViewSettings (nullptr)
, _planViewSettings (NULL) , _planViewSettings (nullptr)
, _brandImageSettings (NULL) , _brandImageSettings (nullptr)
{ {
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment