diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-07-08 05:30:58 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-07-08 05:35:49 (GMT) |
commit | 33b664eabe5d9621d71e5bf3bfcc46ea385a399c (patch) | |
tree | edf48fab794c7292a04203b93ec848e24ad4b1b3 /tests/auto | |
parent | c3ee63fd9a1428718ca2f2a32e81a3f977878fad (diff) | |
download | Qt-33b664eabe5d9621d71e5bf3bfcc46ea385a399c.zip Qt-33b664eabe5d9621d71e5bf3bfcc46ea385a399c.tar.gz Qt-33b664eabe5d9621d71e5bf3bfcc46ea385a399c.tar.bz2 |
Remove Image::pixmap property. QML applications should use
QDeclarativeImageProvider to provide pixmaps instead.
Task-number: QTBUG-11980
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp index df029f5..38fd458 100644 --- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp +++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp @@ -88,7 +88,6 @@ private slots: void resized(); void preserveAspectRatio(); void smooth(); - void pixmap(); void svg(); void big(); void tiling_QTBUG_6716(); @@ -261,36 +260,6 @@ void tst_qdeclarativeimage::smooth() delete obj; } -void tst_qdeclarativeimage::pixmap() -{ - QString componentStr = "import Qt 4.7\nImage { pixmap: testPixmap }"; - - QPixmap pixmap; - QDeclarativeContext *ctxt = engine.rootContext(); - ctxt->setContextProperty("testPixmap", pixmap); - - QDeclarativeComponent component(&engine); - component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - - QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create()); - QVERIFY(obj != 0); - QCOMPARE(obj->source(), QUrl()); - QVERIFY(obj->status() == QDeclarativeImage::Null); - QCOMPARE(obj->width(), 0.); - QCOMPARE(obj->height(), 0.); - QCOMPARE(obj->fillMode(), QDeclarativeImage::Stretch); - QCOMPARE(obj->progress(), 0.0); - QVERIFY(obj->pixmap().isNull()); - - pixmap = QPixmap(SRCDIR "/data/colors.png"); - ctxt->setContextProperty("testPixmap", pixmap); - QCOMPARE(obj->width(), 120.); - QCOMPARE(obj->height(), 120.); - QVERIFY(obj->status() == QDeclarativeImage::Ready); - - delete obj; -} - void tst_qdeclarativeimage::svg() { QString src = QUrl::fromLocalFile(SRCDIR "/data/heart.svg").toString(); |