summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-04-15 06:49:35 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-04-15 06:49:35 (GMT)
commit5783d51bcaed2a769c222ae7f6123f7638d6388a (patch)
treec672130f70e84bf788667c9389d1a2c7bc3d2b21 /tests
parentb0830166fb28ad26257602b55e3158bb61a9d5cd (diff)
downloadQt-5783d51bcaed2a769c222ae7f6123f7638d6388a.zip
Qt-5783d51bcaed2a769c222ae7f6123f7638d6388a.tar.gz
Qt-5783d51bcaed2a769c222ae7f6123f7638d6388a.tar.bz2
Simplify dynamic resource loading to avoid cluttering Text API.
Task-number: QTBUG-9900 QT-3287
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
index ca7dfe7..edb4a32 100644
--- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
+++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
@@ -897,10 +897,14 @@ void tst_qdeclarativetext::embeddedImages()
QTRY_COMPARE(textObject->resourcesLoading(), 0);
+ QPixmap pm(SRCDIR "/data/http/exists.png");
if (error.isEmpty()) {
- QPixmap pm(SRCDIR "/data/http/exists.png");
QCOMPARE(textObject->width(), double(pm.width()));
QCOMPARE(textObject->height(), double(pm.height()));
+ } else {
+ QVERIFY(16 != pm.width()); // check test is effective
+ QCOMPARE(textObject->width(), 16.0); // default size of QTextDocument broken image icon
+ QCOMPARE(textObject->height(), 16.0);
}
}