diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-22 16:04:19 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-22 16:04:19 (GMT) |
commit | cce89db1e2555cbca8fc28072e1c6dd737cec6c4 (patch) | |
tree | 13b8e5aaff7c529860a6b1458a2cfe27158414e2 /tests/auto/declarative/qdeclarativetext | |
parent | 1b95c4e6502ede5a980aaf5a2ed9dad283b3eadd (diff) | |
parent | 87c03292dce257f1f72d3fdc4e9457f1e1269ce2 (diff) | |
download | Qt-cce89db1e2555cbca8fc28072e1c6dd737cec6c4.zip Qt-cce89db1e2555cbca8fc28072e1c6dd737cec6c4.tar.gz Qt-cce89db1e2555cbca8fc28072e1c6dd737cec6c4.tar.bz2 |
Merge branch 4.7 into qt-4.8-from-4.7
Diffstat (limited to 'tests/auto/declarative/qdeclarativetext')
-rw-r--r-- | tests/auto/declarative/qdeclarativetext/data/elideimplicitwidth.qml | 7 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativetext/data/elideimplicitwidth.qml b/tests/auto/declarative/qdeclarativetext/data/elideimplicitwidth.qml new file mode 100644 index 0000000..60ae15c --- /dev/null +++ b/tests/auto/declarative/qdeclarativetext/data/elideimplicitwidth.qml @@ -0,0 +1,7 @@ +import QtQuick 1.1 + +Text { + text: "Hello World" + elide: Text.ElideRight + width: 30 +} diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp index 3d6641b..557603f 100644 --- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp +++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp @@ -390,6 +390,13 @@ void tst_qdeclarativetext::elide() QCOMPARE(textObject->width(), 100.); } } + + // QTBUG-18627 + QUrl qmlfile = QUrl::fromLocalFile(SRCDIR "/data/elideimplicitwidth.qml"); + QDeclarativeComponent textComponent(&engine, qmlfile); + QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(textComponent.create()); + QVERIFY(item != 0); + QVERIFY(item->implicitWidth() > item->width()); } void tst_qdeclarativetext::textFormat() |