diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-06-15 00:47:53 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-06-15 00:47:53 (GMT) |
commit | 40aafa7e692bcb8f62ab564cfb5571685671f70b (patch) | |
tree | 52601fc0df9d0c6823050f31569c8f8173a23615 | |
parent | 192ed507cdb16125d2cdcaff63b1591c0d6b4596 (diff) | |
parent | 08d1b0ab26dea5749461a988e6168f9dea6081f3 (diff) | |
download | Qt-40aafa7e692bcb8f62ab564cfb5571685671f70b.zip Qt-40aafa7e692bcb8f62ab564cfb5571685671f70b.tar.gz Qt-40aafa7e692bcb8f62ab564cfb5571685671f70b.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging:
Revert "QFileInfoGatherer: call QFileSystemWatcher addPaths from proper thread"
QFileInfoGatherer: call QFileSystemWatcher addPaths from proper thread
Also test http proxy in the QTcpServer benchmark
Symbian QFileSystemWatcher: fix potential crash
Enable QTcpServer benchmark on symbian
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_symbian.cpp | 4 | ||||
-rw-r--r-- | tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro | 2 | ||||
-rw-r--r-- | tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp | 41 |
3 files changed, 41 insertions, 6 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_symbian.cpp b/src/corelib/io/qfilesystemwatcher_symbian.cpp index 6e5e911..63cc4f1 100644 --- a/src/corelib/io/qfilesystemwatcher_symbian.cpp +++ b/src/corelib/io/qfilesystemwatcher_symbian.cpp @@ -62,9 +62,9 @@ QNotifyChangeEvent::QNotifyChangeEvent(RFs &fs, const TDesC &file, failureCount(0) { if (isDir) { - fsSession.NotifyChange(ENotifyEntry, iStatus, file); + fsSession.NotifyChange(ENotifyEntry, iStatus, watchedPath); } else { - fsSession.NotifyChange(ENotifyAll, iStatus, file); + fsSession.NotifyChange(ENotifyAll, iStatus, watchedPath); } CActiveScheduler::Add(this); SetActive(); diff --git a/tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro b/tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro index e5b9346..4bdfcb7 100644 --- a/tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro +++ b/tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro @@ -11,3 +11,5 @@ CONFIG += release # Input SOURCES += tst_qtcpserver.cpp + +symbian:TARGET.CAPABILITY += NetworkServices
\ No newline at end of file diff --git a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp index f81853b..f06c4eb 100644 --- a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp +++ b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp @@ -54,6 +54,10 @@ #include <qplatformdefs.h> #include <qhostinfo.h> +#include <QNetworkConfiguration> +#include <QNetworkConfigurationManager> +#include <QNetworkSession> + #include <QNetworkProxy> Q_DECLARE_METATYPE(QNetworkProxy) Q_DECLARE_METATYPE(QList<QNetworkProxy>) @@ -75,16 +79,42 @@ public: public slots: void initTestCase_data(); void init(); + void initTestCase(); void cleanup(); private slots: void ipv4LoopbackPerformanceTest(); void ipv6LoopbackPerformanceTest(); void ipv4PerformanceTest(); +private: +#ifndef QT_NO_BEARERMANAGEMENT + QNetworkConfigurationManager *netConfMan; + QNetworkConfiguration networkConfiguration; + QSharedPointer<QNetworkSession> networkSession; +#endif }; tst_QTcpServer::tst_QTcpServer() { - Q_SET_DEFAULT_IAP +} + +void tst_QTcpServer::initTestCase() +{ +#ifndef QT_NO_BEARERMANAGEMENT + netConfMan = new QNetworkConfigurationManager(this); + netConfMan->updateConfigurations(); + connect(netConfMan, SIGNAL(updateCompleted()), &QTestEventLoop::instance(), SLOT(exitLoop())); + QTestEventLoop::instance().enterLoop(10); + networkConfiguration = netConfMan->defaultConfiguration(); + if (networkConfiguration.isValid()) { + networkSession = QSharedPointer<QNetworkSession>(new QNetworkSession(networkConfiguration)); + if (!networkSession->isOpen()) { + networkSession->open(); + QVERIFY(networkSession->waitForOpened(30000)); + } + } else { + QVERIFY(!(netConfMan->capabilities() & QNetworkConfigurationManager::NetworkSessionRequired)); + } +#endif } tst_QTcpServer::~tst_QTcpServer() @@ -98,6 +128,7 @@ void tst_QTcpServer::initTestCase_data() QTest::newRow("WithoutProxy") << false << 0; QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy); + QTest::newRow("WithHttpProxy") << true << int(QNetworkProxy::HttpProxy); } void tst_QTcpServer::init() @@ -179,9 +210,6 @@ void tst_QTcpServer::ipv6LoopbackPerformanceTest() QSKIP("WinCE WM: Not yet supported", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Symbian: IPv6 is not yet supported", SkipAll); -#endif QTcpServer server; if (!server.listen(QHostAddress::LocalHostIPv6, 0)) { QVERIFY(server.serverError() == QAbstractSocket::UnsupportedSocketOperationError); @@ -236,6 +264,11 @@ void tst_QTcpServer::ipv4PerformanceTest() QTcpServer server; QVERIFY(server.listen(probeSocket.localAddress(), 0)); + QFETCH_GLOBAL(int, proxyType); + //For http proxy, only the active connection can be proxied and not the server socket + if (proxyType == QNetworkProxy::HttpProxy) + QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::HttpProxy, QtNetworkSettings::serverName(), 3128)); + QTcpSocket clientA; clientA.connectToHost(server.serverAddress(), server.serverPort()); QVERIFY(clientA.waitForConnected(5000)); |