LibreVNA-GUI: Fix obsolete calls 'setBackgroundColor'

'setBackgroundColor' is deprecated. Instead we use 'setBackground'.
This commit is contained in:
Alexander Voronov 2023-03-24 21:55:05 +03:00
parent f4b8a0b3ad
commit f0d0f3bde2

View File

@ -232,10 +232,10 @@ QTableWidgetItem *CalibrationMeasurement::OnePort::getStatisticsItem()
auto ret = Base::getStatisticsItem();
if(numPoints() > 0) {
if(!standard) {
ret->setBackgroundColor(Qt::red);
ret->setBackground(Qt::red);
ret->setToolTip("No calibration standard assigned, unable to use this measurement");
} else if(standard->minFrequency() > points.front().frequency || standard->maxFrequency() < points.back().frequency) {
ret->setBackgroundColor(Qt::yellow);
ret->setBackground(Qt::yellow);
ret->setToolTip("Usable frequency range constrained by calibration standard to "+Unit::ToString(minUsableFreq(), "Hz", " kMG", 4)+" - "+Unit::ToString(maxUsableFreq(), "Hz", " kMG", 4));
}
}
@ -391,10 +391,10 @@ QTableWidgetItem *CalibrationMeasurement::TwoPort::getStatisticsItem()
auto ret = Base::getStatisticsItem();
if(numPoints() > 0) {
if(!standard) {
ret->setBackgroundColor(Qt::red);
ret->setBackground(Qt::red);
ret->setToolTip("No calibration standard assigned, unable to use this measurement");
} else if(standard->minFrequency() > points.front().frequency || standard->maxFrequency() < points.back().frequency) {
ret->setBackgroundColor(Qt::yellow);
ret->setBackground(Qt::yellow);
ret->setToolTip("Usable frequency range constrained by calibration standard to "+Unit::ToString(minUsableFreq(), "Hz", " kMG", 4)+" - "+Unit::ToString(maxUsableFreq(), "Hz", " kMG", 4));
}
}