summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-26 21:53:17 +0100
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-26 21:53:17 +0100
commit4b45f29f45936deeeb5e1d1d063b8c4f492b427d (patch)
treeaf23c06a5f5744a42b8e65cd524081c73c537956 /tests
parent771f3ddf8c7b4fad2aa45a3d14b895cd9720a474 (diff)
parentf9291f14dff6d8fd2df40c3ae497e32ca035efcb (diff)
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Fix compile error on Symbian 9.1, caused in network/access. QNAM HTTP: Symbian compile fix tst_qnetworkreply: Fix side effect, add another test QNAM HTTP: Fix crazy crash when exiting application
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index 261e613f56..71ee2d02b8 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"