summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-04-07 03:26:59 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-04-07 04:27:47 (GMT)
commit0bfcb67886df2c446b38c4ca0ec8309a32493d00 (patch)
tree4304b4191c6a77d6f926cfb9de4eea30af3d4d15 /tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
parent0bd3c6b059986e92ecca1c926afd123074187f49 (diff)
downloadQt-0bfcb67886df2c446b38c4ca0ec8309a32493d00.zip
Qt-0bfcb67886df2c446b38c4ca0ec8309a32493d00.tar.gz
Qt-0bfcb67886df2c446b38c4ca0ec8309a32493d00.tar.bz2
Make sure tests cleanup after themselves.
Diffstat (limited to 'tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
index 05d968c..abdd210 100644
--- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
+++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
@@ -133,7 +133,7 @@ void tst_QDeclarativeLoader::component()
QVERIFY(c);
QCOMPARE(loader->sourceComponent(), c);
- delete loader;
+ delete item;
}
void tst_QDeclarativeLoader::invalidUrl()
@@ -196,7 +196,7 @@ void tst_QDeclarativeLoader::clear()
QCOMPARE(loader->status(), QDeclarativeLoader::Null);
QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 0);
- delete loader;
+ delete item;
}
}
@@ -242,7 +242,7 @@ void tst_QDeclarativeLoader::componentToUrl()
QCOMPARE(loader->width(), 120.0);
QCOMPARE(loader->height(), 60.0);
- delete loader;
+ delete item;
}
void tst_QDeclarativeLoader::sizeLoaderToItem()
@@ -275,6 +275,8 @@ void tst_QDeclarativeLoader::sizeLoaderToItem()
QCOMPARE(spy.count(),1);
loader->setResizeMode(QDeclarativeLoader::NoResize);
QCOMPARE(spy.count(),1);
+
+ delete loader;
}
void tst_QDeclarativeLoader::sizeItemToLoader()
@@ -303,6 +305,8 @@ void tst_QDeclarativeLoader::sizeItemToLoader()
rect->setHeight(45);
QCOMPARE(loader->width(), 160.0);
QCOMPARE(loader->height(), 45.0);
+
+ delete loader;
}
void tst_QDeclarativeLoader::noResize()
@@ -317,6 +321,8 @@ void tst_QDeclarativeLoader::noResize()
QVERIFY(rect);
QCOMPARE(rect->width(), 120.0);
QCOMPARE(rect->height(), 60.0);
+
+ delete loader;
}
void tst_QDeclarativeLoader::sizeLoaderToGraphicsWidget()
@@ -344,6 +350,8 @@ void tst_QDeclarativeLoader::sizeLoaderToGraphicsWidget()
loader->setHeight(30);
QCOMPARE(widget->size().width(), 180.0);
QCOMPARE(widget->size().height(), 30.0);
+
+ delete loader;
}
void tst_QDeclarativeLoader::sizeGraphicsWidgetToLoader()
@@ -374,6 +382,8 @@ void tst_QDeclarativeLoader::sizeGraphicsWidgetToLoader()
widget->resize(QSizeF(160,45));
QCOMPARE(loader->width(), 160.0);
QCOMPARE(loader->height(), 45.0);
+
+ delete loader;
}
void tst_QDeclarativeLoader::noResizeGraphicsWidget()
@@ -391,6 +401,8 @@ void tst_QDeclarativeLoader::noResizeGraphicsWidget()
QVERIFY(widget);
QCOMPARE(widget->size().width(), 250.0);
QCOMPARE(widget->size().height(), 250.0);
+
+ delete loader;
}
void tst_QDeclarativeLoader::networkRequestUrl()