summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfontmetrics
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2010-10-04 14:21:32 +1000
committerRohan McGovern <rohan.mcgovern@nokia.com>2010-10-04 14:21:32 +1000
commit5171bb1613ecc537f3f0d0962532e3ee059b8870 (patch)
tree02d0e565d8fc397573a2d35845c11ba74b912c8d /tests/auto/qfontmetrics
parentc372896c5293633d75674a320a9b715a0501a42d (diff)
parent33b76a659b2f44fa7038e375bbfb4cfd449ae617 (diff)
Merge remote branch 'origin/4.7' into master-from-4.7
Conflicts: doc/src/snippets/code/doc_src_qmake-manual.qdoc src/corelib/arch/symbian/arch.pri src/declarative/graphicsitems/qdeclarativeflickable.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h tests/auto/qfontmetrics/tst_qfontmetrics.cpp
Diffstat (limited to 'tests/auto/qfontmetrics')
-rw-r--r--tests/auto/qfontmetrics/tst_qfontmetrics.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
index 42504158df..eda421bc4b 100644
--- a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
+++ b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
@@ -75,6 +75,7 @@ private slots:
void elidedMultiLength();
void elidedMultiLengthF();
void inFontUcs4();
+ void lineWidth();
};
tst_QFontMetrics::tst_QFontMetrics()
@@ -288,5 +289,22 @@ void tst_QFontMetrics::inFontUcs4()
QFontDatabase::removeApplicationFont(id);
}
+void tst_QFontMetrics::lineWidth()
+{
+ // QTBUG-13009, QTBUG-13011
+ QFont smallFont;
+ smallFont.setPointSize(8);
+ smallFont.setWeight(QFont::Light);
+ const QFontMetrics smallFontMetrics(smallFont);
+
+ QFont bigFont;
+ bigFont.setPointSize(40);
+ bigFont.setWeight(QFont::Black);
+ const QFontMetrics bigFontMetrics(bigFont);
+
+ QVERIFY(smallFontMetrics.lineWidth() >= 1);
+ QVERIFY(smallFontMetrics.lineWidth() < bigFontMetrics.lineWidth());
+}
+
QTEST_MAIN(tst_QFontMetrics)
#include "tst_qfontmetrics.moc"