Skip to content

QmlWaveformOverview: fix float conversion warning with Qt6#4440

Merged
Holzhaus merged 1 commit intomixxxdj:mainfrom
Be-ing:qmlwaveformoverview_float
Oct 17, 2021
Merged

QmlWaveformOverview: fix float conversion warning with Qt6#4440
Holzhaus merged 1 commit intomixxxdj:mainfrom
Be-ing:qmlwaveformoverview_float

Conversation

@Be-ing
Copy link
Copy Markdown
Contributor

@Be-ing Be-ing commented Oct 16, 2021

[184/695] Building CXX object CMakeFiles/mixxx-lib.dir/src/qml/qmlwaveformoverview.cpp.o
../src/qml/qmlwaveformoverview.cpp: In member function ‘QColor mixxx::qml::QmlWaveformOverview::getRgbPenColor(ConstWaveformPointer, int) const’:
../src/qml/qmlwaveformoverview.cpp:258:27: warning: conversion from ‘qreal’ {aka ‘double’} to ‘float’ may change value [-Wfloat-conversion]
  258 |         color.setRgbF(red / max, green / max, blue / max);
      |                       ~~~~^~~~~
../src/qml/qmlwaveformoverview.cpp:258:40: warning: conversion from ‘qreal’ {aka ‘double’} to ‘float’ may change value [-Wfloat-conversion]
  258 |         color.setRgbF(red / max, green / max, blue / max);
      |                                  ~~~~~~^~~~~
../src/qml/qmlwaveformoverview.cpp:258:52: warning: conversion from ‘qreal’ {aka ‘double’} to ‘float’ may change value [-Wfloat-conversion]
  258 |         color.setRgbF(red / max, green / max, blue / max);
      |                                               ~~~~~^~~~~

[184/695] Building CXX object CMakeFiles/mixxx-lib.dir/src/qml/qmlwaveformoverview.cpp.o
../src/qml/qmlwaveformoverview.cpp: In member function ‘QColor mixxx::qml::QmlWaveformOverview::getRgbPenColor(ConstWaveformPointer, int) const’:
../src/qml/qmlwaveformoverview.cpp:258:27: warning: conversion from ‘qreal’ {aka ‘double’} to ‘float’ may change value [-Wfloat-conversion]
  258 |         color.setRgbF(red / max, green / max, blue / max);
      |                       ~~~~^~~~~
../src/qml/qmlwaveformoverview.cpp:258:40: warning: conversion from ‘qreal’ {aka ‘double’} to ‘float’ may change value [-Wfloat-conversion]
  258 |         color.setRgbF(red / max, green / max, blue / max);
      |                                  ~~~~~~^~~~~
../src/qml/qmlwaveformoverview.cpp:258:52: warning: conversion from ‘qreal’ {aka ‘double’} to ‘float’ may change value [-Wfloat-conversion]
  258 |         color.setRgbF(red / max, green / max, blue / max);
      |                                               ~~~~~^~~~~
@Be-ing Be-ing force-pushed the qmlwaveformoverview_float branch from 92b38f7 to 6253493 Compare October 16, 2021 20:02
@Holzhaus Holzhaus merged commit ef02afb into mixxxdj:main Oct 17, 2021
@Be-ing Be-ing deleted the qmlwaveformoverview_float branch October 17, 2021 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants