summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-02-19 07:26:12 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-02-19 07:26:12 (GMT)
commit6871d82c0f9c62d6b7bf0312324b51a4fbdf720c (patch)
tree8dd246870424e54a43bc028205544e7634bc4d60
parentb988ef5a3d9ac96cfa7b9fd4b87522bbab84ffce (diff)
parent5ef574960981066c50b390daf4e8fc45b6fe9f83 (diff)
downloadQt-6871d82c0f9c62d6b7bf0312324b51a4fbdf720c.zip
Qt-6871d82c0f9c62d6b7bf0312324b51a4fbdf720c.tar.gz
Qt-6871d82c0f9c62d6b7bf0312324b51a4fbdf720c.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
-rw-r--r--src/declarative/util/qmlpixmapcache.cpp9
-rw-r--r--tests/auto/declarative/qmlgraphicsloader/tst_qmlgraphicsloader.cpp4
-rw-r--r--tests/auto/declarative/qmlgraphicstextedit/tst_qmlgraphicstextedit.cpp10
3 files changed, 10 insertions, 13 deletions
diff --git a/src/declarative/util/qmlpixmapcache.cpp b/src/declarative/util/qmlpixmapcache.cpp
index 21fce5e..56903ce 100644
--- a/src/declarative/util/qmlpixmapcache.cpp
+++ b/src/declarative/util/qmlpixmapcache.cpp
@@ -267,12 +267,12 @@ QmlImageReader::QmlImageReader(QmlEngine *eng)
QmlImageReader::~QmlImageReader()
{
- quit();
- wait();
readerMutex.lock();
readers.remove(engine);
readerMutex.unlock();
- delete handler;
+
+ quit();
+ wait();
}
QmlImageReader *QmlImageReader::instance(QmlEngine *engine)
@@ -335,6 +335,9 @@ void QmlImageReader::run()
handler = new QmlImageRequestHandler(this, engine);
exec();
+
+ delete handler;
+ handler = 0;
}
//===========================================================================
diff --git a/tests/auto/declarative/qmlgraphicsloader/tst_qmlgraphicsloader.cpp b/tests/auto/declarative/qmlgraphicsloader/tst_qmlgraphicsloader.cpp
index a152ec6..2d3d5ee 100644
--- a/tests/auto/declarative/qmlgraphicsloader/tst_qmlgraphicsloader.cpp
+++ b/tests/auto/declarative/qmlgraphicsloader/tst_qmlgraphicsloader.cpp
@@ -389,7 +389,7 @@ void tst_QmlGraphicsLoader::networkRequestUrl()
{
TestHTTPServer server(SERVER_PORT);
QVERIFY(server.isValid());
- server.serveDirectory("data");
+ server.serveDirectory(SRCDIR "/data");
QmlComponent component(&engine);
component.setData(QByteArray("import Qt 4.6\nLoader { source: \"http://127.0.0.1:14445/Rect120x60.qml\" }"), TEST_FILE(""));
@@ -441,7 +441,7 @@ void tst_QmlGraphicsLoader::failNetworkRequest()
{
TestHTTPServer server(SERVER_PORT);
QVERIFY(server.isValid());
- server.serveDirectory("data");
+ server.serveDirectory(SRCDIR "/data");
QTest::ignoreMessage(QtWarningMsg, "(:-1: Network error for URL http://127.0.0.1:14445/IDontExist.qml) ");
diff --git a/tests/auto/declarative/qmlgraphicstextedit/tst_qmlgraphicstextedit.cpp b/tests/auto/declarative/qmlgraphicstextedit/tst_qmlgraphicstextedit.cpp
index 3221e9a..cc2f929 100644
--- a/tests/auto/declarative/qmlgraphicstextedit/tst_qmlgraphicstextedit.cpp
+++ b/tests/auto/declarative/qmlgraphicstextedit/tst_qmlgraphicstextedit.cpp
@@ -668,18 +668,12 @@ void tst_qmlgraphicstextedit::delegateLoading()
view->execute();
view->show();
view->setFocus();
- delegate = view->rootObject()->findChild<QmlGraphicsItem*>("delegateOkay");
- QVERIFY(delegate);
- delegate = view->rootObject()->findChild<QmlGraphicsItem*>("delegateFail");
- QVERIFY(!delegate);
+ QTRY_VERIFY(!view->rootObject()); // there is fail item inside this test
view->setSource(QUrl("http://localhost:42332/cursorHttpTestFail2.qml"));
view->execute();
view->show();
view->setFocus();
- delegate = view->rootObject()->findChild<QmlGraphicsItem*>("delegateOkay");
- QVERIFY(delegate);
- delegate = view->rootObject()->findChild<QmlGraphicsItem*>("delegateErrorA");
- QVERIFY(!delegate);
+ QTRY_VERIFY(!view->rootObject()); // there is fail item inside this test
//ErrorB should get a component which is ready but component.create() returns null
//Not sure how to accomplish this with QmlGraphicsTextEdits cursor delegate
//###This could be a case of overzealous defensive programming