diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-07-08 05:30:58 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2010-07-13 04:39:21 (GMT) |
commit | 15855edc421d34773cda52ff510c34b1016f64d7 (patch) | |
tree | 6d93d150d90c49d6ef0da8e7092c8d6a115e4f5a /tests | |
parent | 7c1ff382b0927d8b003468c16e31333816c3ab6b (diff) | |
download | Qt-15855edc421d34773cda52ff510c34b1016f64d7.zip Qt-15855edc421d34773cda52ff510c34b1016f64d7.tar.gz Qt-15855edc421d34773cda52ff510c34b1016f64d7.tar.bz2 |
Remove Image::pixmap property. QML applications should use
QDeclarativeImageProvider to provide pixmaps instead.
Task-number: QTBUG-11980
(cherry picked from commit 33b664eabe5d9621d71e5bf3bfcc46ea385a399c)
Diffstat (limited to 'tests')
-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 c09f7fc..adee312 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(); |