summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-02-11 04:14:16 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-02-11 04:14:16 (GMT)
commit2d8bc0a7a87e4b3e1f3ab29e9e2c667137d9942e (patch)
treeb2bfbbd145576e94e793bedf593c614eff5193a0 /tests
parent199d5e4f0a0e72fef2c59aaefe1f843592db937e (diff)
downloadQt-2d8bc0a7a87e4b3e1f3ab29e9e2c667137d9942e.zip
Qt-2d8bc0a7a87e4b3e1f3ab29e9e2c667137d9942e.tar.gz
Qt-2d8bc0a7a87e4b3e1f3ab29e9e2c667137d9942e.tar.bz2
Test should use ceil() not floor() since ceil() is used for calculating
with in QmlGraphicsTextPrivate::setupTextLayout().
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp b/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp
index eed84ea..4626fe6 100644
--- a/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp
+++ b/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp
@@ -46,7 +46,7 @@
#include <private/qmlvaluetype_p.h>
#include <QFontMetrics>
#include <QGraphicsSceneMouseEvent>
-#include <math.h>
+#include <qmath.h>
class tst_qmlgraphicstext : public QObject
@@ -212,7 +212,7 @@ void tst_qmlgraphicstext::width()
QFont f;
QFontMetricsF fm(f);
qreal metricWidth = fm.size(Qt::TextExpandTabs && Qt::TextShowMnemonic, standard.at(i)).width();
- metricWidth = floor(metricWidth);
+ metricWidth = qCeil(metricWidth);
QString componentStr = "import Qt 4.6\nText { text: \"" + standard.at(i) + "\" }";
QmlComponent textComponent(&engine);