diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-06-23 00:18:59 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-06-23 00:18:59 (GMT) |
commit | fff467981fe515974e722e1d092a916f6a8f5dcc (patch) | |
tree | 33543eb688df3ecbfe02a2d3f0b6fc54b8ba15ec /tests/auto/qftp/tst_qftp.cpp | |
parent | 11f20a34cbad9797545ab4eb638ff311af6fc6fc (diff) | |
parent | 031958c130904c16a4bafa5617aaa197469efa9e (diff) | |
download | Qt-fff467981fe515974e722e1d092a916f6a8f5dcc.zip Qt-fff467981fe515974e722e1d092a916f6a8f5dcc.tar.gz Qt-fff467981fe515974e722e1d092a916f6a8f5dcc.tar.bz2 |
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-water-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-water-team: (269 commits)
Incorrect property name in QAccessibleAbstractSpinBox::setCurrentValue
DEF file updates for Symbian
QTBUG-19883 Adding top level TRAP for QThreads on Symbian
Revert "QFileInfoGatherer: call QFileSystemWatcher addPaths from proper thread"
Fix alignment value not handled in ODF
Silence a compiler warning about unhandled enum in switch
Silence the "array out of bounds" warning in GCC 4.6.
Silence the callgrind warnings in our source code when using gcc 4.6
Create a function that merges the SSE common code
Improve toLatin1 x86 SIMD by using a new SSE4.1 instruction
Revert "Fix compilation of lrelease on Windows"
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
Fix building the OpenVG graphicssystem on Linux with static libs
fix build on windows 7
Fix compilation of lrelease on Windows
Allow selecting fonts with irregular style names
When asking for relations, don't crash on children that don't return an interface.
...
Diffstat (limited to 'tests/auto/qftp/tst_qftp.cpp')
-rw-r--r-- | tests/auto/qftp/tst_qftp.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/tests/auto/qftp/tst_qftp.cpp b/tests/auto/qftp/tst_qftp.cpp index 1fa0787..7e431cf 100644 --- a/tests/auto/qftp/tst_qftp.cpp +++ b/tests/auto/qftp/tst_qftp.cpp @@ -155,6 +155,7 @@ private: QFtp *ftp; #ifndef QT_NO_BEARERMANAGEMENT + QNetworkConfigurationManager *netConfMan; QSharedPointer<QNetworkSession> networkSessionExplicit; QSharedPointer<QNetworkSession> networkSessionImplicit; #endif @@ -225,10 +226,20 @@ void tst_QFtp::initTestCase_data() void tst_QFtp::initTestCase() { #ifndef QT_NO_BEARERMANAGEMENT - QNetworkConfigurationManager manager; - networkSessionImplicit = QSharedPointer<QNetworkSession>(new QNetworkSession(manager.defaultConfiguration())); - networkSessionImplicit->open(); - QVERIFY(networkSessionImplicit->waitForOpened(60000)); //there may be user prompt on 1st connect + netConfMan = new QNetworkConfigurationManager(this); + netConfMan->updateConfigurations(); + connect(netConfMan, SIGNAL(updateCompleted()), &QTestEventLoop::instance(), SLOT(exitLoop())); + QTestEventLoop::instance().enterLoop(10); + QNetworkConfiguration networkConfiguration = netConfMan->defaultConfiguration(); + if (networkConfiguration.isValid()) { + networkSessionImplicit = QSharedPointer<QNetworkSession>(new QNetworkSession(networkConfiguration)); + if (!networkSessionImplicit->isOpen()) { + networkSessionImplicit->open(); + QVERIFY(networkSessionImplicit->waitForOpened(30000)); + } + } else { + QVERIFY(!(netConfMan->capabilities() & QNetworkConfigurationManager::NetworkSessionRequired)); + } #endif } @@ -254,6 +265,8 @@ void tst_QFtp::init() } #ifndef QT_NO_BEARERMANAGEMENT if (setSession) { + if (!networkSessionImplicit) + QSKIP("test requires a valid default network configuration", SkipSingle); networkSessionExplicit = networkSessionImplicit; if (!networkSessionExplicit->isOpen()) { networkSessionExplicit->open(); |