Correct compile errorswith Qt6.7

This commit is contained in:
Lord-Grey
2023-09-09 22:10:22 +02:00
parent 013587d1fd
commit a2f6271832
17 changed files with 57 additions and 49 deletions

View File

@@ -1126,7 +1126,7 @@ bool LedDevicePhilipsHue::setLights()
if( !lArray.empty() )
{
for (const QJsonValue &id : qAsConst(lArray))
for (const QJsonValue &id : std::as_const(lArray))
{
int lightId = id.toString().toInt();
if( lightId > 0 )

View File

@@ -352,12 +352,12 @@ bool LedDeviceWled::powerOn()
}
else
{
QJsonArray propertiesSegments = _originalStateProperties[STATE_SEG].toArray();
const QJsonArray propertiesSegments = _originalStateProperties[STATE_SEG].toArray();
bool isStreamSegmentIdFound { false };
QJsonArray segments;
for (const auto& segmentItem : qAsConst(propertiesSegments))
for (const auto& segmentItem : propertiesSegments)
{
QJsonObject segmentObj = segmentItem.toObject();
@@ -505,9 +505,9 @@ bool LedDeviceWled::restoreState()
if (_isStreamToSegment)
{
QJsonArray propertiesSegments = _originalStateProperties[STATE_SEG].toArray();
const QJsonArray propertiesSegments = _originalStateProperties[STATE_SEG].toArray();
QJsonArray segments;
for (const auto& segmentItem : qAsConst(propertiesSegments))
for (const auto& segmentItem : propertiesSegments)
{
QJsonObject segmentObj = segmentItem.toObject();