registry team mailing list archive
-
registry team
-
Mailing list archive
-
Message #19742
[Bug 642117] Re: [armel] QFloat / double / float confusion
Hey SevenMachines,
I looked at your patch, and it looks good, and should resolve the qreal/float issues on armel although there is a "neater" way to solve this issue. From your kradio diff, you have the following code patch:
--- kradio-4.0.0.orig/plugins/gui-standard-display/radioview_frequencyradio.cpp
+++ kradio-4.0.0/plugins/gui-standard-display/radioview_frequencyradio.cpp
@@ -408,7 +408,7 @@
// auxiliary variables
qreal margin = qMax(4.0, qMin(width / 50.0, height / 50.0));
- qreal tmp = qMin(height, (width - 2 * margin) / 6.0);
+ qreal tmp = qMin(height, (width - 2 * margin) / qreal(6.0));
qreal xd_st = qMin((height - margin * 2) / 3.0, tmp / 3.0);
qreal xw = qMin(tmp / 2.0, xd_st * 1.5);
qreal penw = qMax(1.0, xw / 25.0);
The following also works, and is what I use for sake of code
neatness/sanity
--- kradio-4.0.0.orig/plugins/gui-standard-display/radioview_frequencyradio.cpp
+++ kradio-4.0.0/plugins/gui-standard-display/radioview_frequencyradio.cpp
@@ -408,7 +408,7 @@
// auxiliary variables
qreal margin = qMax(4.0, qMin(width / 50.0, height / 50.0));
- qreal tmp = qMin(height, (width - 2 * margin) / 6.0);
+ qreal tmp = qMin<double>(height, (width - 2 * margin) / 6.0);
qreal xd_st = qMin((height - margin * 2) / 3.0, tmp / 3.0);
qreal xw = qMin(tmp / 2.0, xd_st * 1.5);
qreal penw = qMax(1.0, xw / 25.0);
This isn't a criticism, just a handy tip, as very few people seem to be
aware of the ability to force casting on a template by using <>.
As for the musescore patch, it looks a little odd to me since it seems
it could be fixed just by casting, and not changing the actual variable
times (less invasive patch). Was there a specific reason to implement
this chnage like this?
Anyway, thanks for all your work in this matter, and keep the patches
coming, its great to see someone putting so much work into this :-)
--
[armel] QFloat / double / float confusion
https://bugs.launchpad.net/bugs/642117
You received this bug notification because you are a member of Registry
Administrators, which is the registrant for Debian.