diff options
author | Aleksandar Sasha Babic <aleksandar.babic@nokia.com> | 2009-12-15 12:50:01 (GMT) |
---|---|---|
committer | Aleksandar Sasha Babic <aleksandar.babic@nokia.com> | 2009-12-15 12:53:52 (GMT) |
commit | 4391014d4533e60dc4e5e413db50b21f68f4658c (patch) | |
tree | f82a40ea71e58ed44cb199daffe8305e7988b379 /src/gui/styles | |
parent | 100ad353689b8203988c87afe30953d59bdad736 (diff) | |
download | Qt-4391014d4533e60dc4e5e413db50b21f68f4658c.zip Qt-4391014d4533e60dc4e5e413db50b21f68f4658c.tar.gz Qt-4391014d4533e60dc4e5e413db50b21f68f4658c.tar.bz2 |
qreal-ization
Using math wrapper functions instead direct call. This gives us top-level
control to what (single/double) precision we are effectively using.
Task-number: QTBUG-4894
Reviewed-by: janarve
Reviewed-by: Kim Motoyoshi Kalland
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qcommonstyle.cpp | 2 | ||||
-rw-r--r-- | src/gui/styles/qstylehelper.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 5028e5f..c1beb6a 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -2775,7 +2775,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt, QSize size = (sr == SE_TabBarTabLeftButton) ? tab->leftButtonSize : tab->rightButtonSize; int w = size.width(); int h = size.height(); - int midHeight = static_cast<int>(ceil(float(tr.height() - h) / 2)); + int midHeight = static_cast<int>(qCeil(float(tr.height() - h) / 2)); int midWidth = ((tr.width() - w) / 2); bool atTheTop = true; diff --git a/src/gui/styles/qstylehelper.cpp b/src/gui/styles/qstylehelper.cpp index af30f15..f5af960 100644 --- a/src/gui/styles/qstylehelper.cpp +++ b/src/gui/styles/qstylehelper.cpp @@ -154,7 +154,7 @@ qreal angle(const QPointF &p1, const QPointF &p2) } qreal m = -(y2 - y1) / (x2 - x1); - _angle = atan(m) * rad_factor; + _angle = qAtan(m) * rad_factor; if (p1.x() < p2.x()) _angle = 180 - _angle; |