diff options
author | Toby Tomkins <toby.tomkins@nokia.com> | 2010-04-01 01:23:42 (GMT) |
---|---|---|
committer | Toby Tomkins <toby.tomkins@nokia.com> | 2010-04-01 01:23:42 (GMT) |
commit | 878a99e89dd1c542f4bfb3e88f42f4a57ccf0b50 (patch) | |
tree | 230923d501ba4bdb9be1806d44e43fbfb6ccb9b3 /tests/auto/qnetworkreply/tst_qnetworkreply.cpp | |
parent | 49c16ca689d09120587acd235df9085622645d62 (diff) | |
parent | f2625271f7c878c00fea38291cd11c34c80550fa (diff) | |
download | Qt-878a99e89dd1c542f4bfb3e88f42f4a57ccf0b50.zip Qt-878a99e89dd1c542f4bfb3e88f42f4a57ccf0b50.tar.gz Qt-878a99e89dd1c542f4bfb3e88f42f4a57ccf0b50.tar.bz2 |
Merge commit 'origin/4.6' into 4.6-multimedia
Conflicts:
tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
Diffstat (limited to 'tests/auto/qnetworkreply/tst_qnetworkreply.cpp')
-rw-r--r-- | tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index 261e613..71ee2d0 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -275,6 +275,9 @@ private Q_SLOTS: void ignoreSslErrorsListWithSlot_data(); void ignoreSslErrorsListWithSlot(); #endif + + // NOTE: This test must be last! + void parentingRepliesToTheApp(); }; QT_BEGIN_NAMESPACE @@ -3831,7 +3834,7 @@ void tst_QNetworkReply::httpConnectionCount() for (int i = 0; i < 10; i++) { QNetworkRequest request (QUrl("http://127.0.0.1:" + QString::number(server.serverPort()) + "/" + QString::number(i))); QNetworkReply* reply = manager.get(request); - reply->setParent(this); + reply->setParent(&server); } int pendingConnectionCount = 0; @@ -4105,5 +4108,13 @@ void tst_QNetworkReply::ignoreSslErrorsListWithSlot() #endif // QT_NO_OPENSSL +// NOTE: This test must be last testcase in tst_qnetworkreply! +void tst_QNetworkReply::parentingRepliesToTheApp() +{ + QNetworkRequest request (QUrl("http://" + QtNetworkSettings::serverName())); + manager.get(request)->setParent(this); // parent to this object + manager.get(request)->setParent(qApp); // parent to the app +} + QTEST_MAIN(tst_QNetworkReply) #include "tst_qnetworkreply.moc" |