Skip to content

Commit

Permalink
Merge pull request #4440 from Be-ing/qmlwaveformoverview_float
Browse files Browse the repository at this point in the history
QmlWaveformOverview: fix float conversion warning with Qt6
  • Loading branch information
Holzhaus committed Oct 17, 2021
2 parents 0f08384 + 6253493 commit ef02afb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/qml/qmlwaveformoverview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,10 @@ QColor QmlWaveformOverview::getRgbPenColor(ConstWaveformPointer pWaveform, int c
qreal max = math_max3(red, green, blue);
if (max > 0.0) {
QColor color;
color.setRgbF(red / max, green / max, blue / max);
color.setRgbF(
static_cast<float>(red / max),
static_cast<float>(green / max),
static_cast<float>(blue / max));
return color;
}
return QColor();
Expand Down

0 comments on commit ef02afb

Please sign in to comment.