summaryrefslogtreecommitdiffstats
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 05:42:47 (GMT)
commit6e2739e2a9a51ed3993964477ef6b232ca947cd4 (patch)
treeb2bfbbd145576e94e793bedf593c614eff5193a0
parent199d5e4f0a0e72fef2c59aaefe1f843592db937e (diff)
downloadQt-6e2739e2a9a51ed3993964477ef6b232ca947cd4.zip
Qt-6e2739e2a9a51ed3993964477ef6b232ca947cd4.tar.gz
Qt-6e2739e2a9a51ed3993964477ef6b232ca947cd4.tar.bz2
Test should use ceil() not floor() since ceil() is used for calculating
width in QmlGraphicsTextPrivate::setupTextLayout().
-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);