Browse Source

Fix deprecated usage

QGC4.4
DonLakeFlyer 5 years ago
parent
commit
a986c0298f
  1. 4
      src/FactSystem/FactMetaData.cc

4
src/FactSystem/FactMetaData.cc

@ -1450,13 +1450,13 @@ QMap<QString, FactMetaData*> FactMetaData::createMapFromJsonArray(const QJsonArr
QVariant FactMetaData::cookedMax(void) const QVariant FactMetaData::cookedMax(void) const
{ {
// We have to be careful with cooked min/max. Running the raw values through the translator could flip min and max. // We have to be careful with cooked min/max. Running the raw values through the translator could flip min and max.
return qMax(_rawTranslator(_rawMax), _rawTranslator(_rawMin)); return qMax(_rawTranslator(_rawMax).toDouble(), _rawTranslator(_rawMin).toDouble());
} }
QVariant FactMetaData::cookedMin(void) const QVariant FactMetaData::cookedMin(void) const
{ {
// We have to be careful with cooked min/max. Running the raw values through the translator could flip min and max. // We have to be careful with cooked min/max. Running the raw values through the translator could flip min and max.
return qMin(_rawTranslator(_rawMax), _rawTranslator(_rawMin)); return qMin(_rawTranslator(_rawMax).toDouble(), _rawTranslator(_rawMin).toDouble());
} }
void FactMetaData::setVolatileValue(bool bValue) void FactMetaData::setVolatileValue(bool bValue)

Loading…
Cancel
Save