Details
-
Suggestion
-
Resolution: Won't Do
-
P4: Low
-
None
-
None
-
None
-
98aed8c76 (dev)
Description
https://codereview.qt-project.org/#/c/138524/ brought up this Android issue: https://code.google.com/p/android/issues/detail?id=54418
And in general, sometimes you want to round a qreal without losing precision, and without knowing whether qreal is actually a double or a float. qRound returns an int whereas qRound64 returns a qint64, so you have to know which one you want.
If we have a need to write code like this
template<typename T> static T Round(T t) { return round(t); } template<> float Round<float>(float f) { return roundf(f); }
for one use case, chances are we will need it somewhere else too.
Attachments
Issue Links
- relates to
-
QTBUG-48018 QML Flickable truncates contentX to signed 32-bits (0x80000000)
- Closed
For Gerrit Dashboard: QTBUG-50260 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
490561,3 | Flickable: use std::round instead of custom Round | dev | qt/qtdeclarative | Status: MERGED | -1 | 0 |