summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-11-04 23:37:02 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-11-04 23:37:02 (GMT)
commit1409b6cacc743e71830a73a2bf3dcca374106449 (patch)
tree244dec03c048fbe7dffb05447a0e67d89d6c8e48 /tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp
parent0ced984d3e2cb2a7a1a219ae7a9b09ff4e15a55c (diff)
downloadQt-1409b6cacc743e71830a73a2bf3dcca374106449.zip
Qt-1409b6cacc743e71830a73a2bf3dcca374106449.tar.gz
Qt-1409b6cacc743e71830a73a2bf3dcca374106449.tar.bz2
autotests
Diffstat (limited to 'tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp')
-rw-r--r--tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp b/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp
index 3e86cab..c650af2 100644
--- a/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp
+++ b/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp
@@ -269,7 +269,7 @@ void tst_qmlgraphicstext::wrap()
void tst_qmlgraphicstext::elide()
{
- for (Qt::TextElideMode m = Qt::ElideLeft; m<=Qt::ElideNone; m=Qt::TextElideMode(int(m)+1)) {
+ for (QmlGraphicsText::TextElideMode m = QmlGraphicsText::ElideLeft; m<=QmlGraphicsText::ElideNone; m=QmlGraphicsText::TextElideMode(int(m)+1)) {
const char* elidename[]={"ElideLeft", "ElideRight", "ElideMiddle", "ElideNone"};
QString elide = "elide: Text." + QString(elidename[int(m)]) + ";";
@@ -279,6 +279,7 @@ void tst_qmlgraphicstext::elide()
QmlComponent textComponent(&engine, ("import Qt 4.6\nText { text: \"\"; "+elide+" width: 100 }").toLatin1(), QUrl("file://"));
QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
+ QCOMPARE(textObject->elideMode(), m);
QCOMPARE(textObject->width(), 100.);
}
@@ -288,6 +289,7 @@ void tst_qmlgraphicstext::elide()
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
+ QCOMPARE(textObject->elideMode(), m);
QCOMPARE(textObject->width(), 100.);
}
@@ -298,6 +300,7 @@ void tst_qmlgraphicstext::elide()
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
+ QCOMPARE(textObject->elideMode(), m);
QCOMPARE(textObject->width(), 100.);
}
}