diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-04-15 06:49:35 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-04-15 06:49:35 (GMT) |
commit | 5783d51bcaed2a769c222ae7f6123f7638d6388a (patch) | |
tree | c672130f70e84bf788667c9389d1a2c7bc3d2b21 /tests | |
parent | b0830166fb28ad26257602b55e3158bb61a9d5cd (diff) | |
download | Qt-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.cpp | 6 |
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); } } |