diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-02-11 04:14:16 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-02-11 05:42:47 (GMT) |
commit | 6e2739e2a9a51ed3993964477ef6b232ca947cd4 (patch) | |
tree | b2bfbbd145576e94e793bedf593c614eff5193a0 | |
parent | 199d5e4f0a0e72fef2c59aaefe1f843592db937e (diff) | |
download | Qt-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.cpp | 4 |
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); |