diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-11-04 06:15:58 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-11-04 06:15:58 (GMT) |
commit | 9c817b7a6959a7c8bade12de71d3629fae9b5859 (patch) | |
tree | f62a5d7d1f8c7d75a211c265c83b25f49e5aa4f6 /tests | |
parent | cc06fb21f890613c396936561501737a23d1cd9f (diff) | |
download | Qt-9c817b7a6959a7c8bade12de71d3629fae9b5859.zip Qt-9c817b7a6959a7c8bade12de71d3629fae9b5859.tar.gz Qt-9c817b7a6959a7c8bade12de71d3629fae9b5859.tar.bz2 |
Fix test.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp b/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp index 3e86cab..fc47d41 100644 --- a/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp +++ b/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp @@ -198,6 +198,8 @@ void tst_qmlgraphicstext::width() for (int i = 0; i < standard.size(); i++) { + QVERIFY(!Qt::mightBeRichText(standard.at(i))); // self-test + QFont f; QFontMetrics fm(f); int metricWidth = fm.size(Qt::TextExpandTabs && Qt::TextShowMnemonic, standard.at(i)).width(); @@ -208,11 +210,13 @@ void tst_qmlgraphicstext::width() QVERIFY(textObject != 0); QCOMPARE(textObject->width(), qreal(metricWidth)); - QVERIFY(textObject->textFormat() == QmlGraphicsText::PlainText); + QVERIFY(textObject->textFormat() == QmlGraphicsText::AutoText); // setting text doesn't change format } for (int i = 0; i < richText.size(); i++) { + QVERIFY(Qt::mightBeRichText(richText.at(i))); // self-test + QTextDocument document; document.setHtml(richText.at(i)); document.setDocumentMargin(0); @@ -225,7 +229,7 @@ void tst_qmlgraphicstext::width() QVERIFY(textObject != 0); QCOMPARE(textObject->width(), qreal(documentWidth)); - QVERIFY(textObject->textFormat() == QmlGraphicsText::RichText); + QVERIFY(textObject->textFormat() == QmlGraphicsText::AutoText); // setting text doesn't change format } } |