summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp
diff options
context:
space:
mode:
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 fc47d41..ba5c835 100644
--- a/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp
+++ b/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp
@@ -273,7 +273,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)]) + ";";
@@ -283,6 +283,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.);
}
@@ -292,6 +293,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.);
}
@@ -302,6 +304,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.);
}
}