Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QmlWaveformOverview: fix float conversion warning with Qt6 #4440

Merged
merged 1 commit into from
Oct 17, 2021

Conversation

Be-ing
Copy link
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);
      |                                               ~~~~~^~~~~
@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