summaryrefslogtreecommitdiffstats
path: root/tests/auto/qftp
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-04-11 10:48:44 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2011-04-11 10:48:44 (GMT)
commit1062da14facb7dd10f0928a4c242549d3626f9ba (patch)
tree4462fcaa82b45c47eddcdcb1d89e1cc03de45a85 /tests/auto/qftp
parent847df81a5680fe4d71196d0afe5e68e41ae49700 (diff)
parentdd60cf7ba8afdf5c84f5793c1e1d08ab18303a74 (diff)
downloadQt-1062da14facb7dd10f0928a4c242549d3626f9ba.zip
Qt-1062da14facb7dd10f0928a4c242549d3626f9ba.tar.gz
Qt-1062da14facb7dd10f0928a4c242549d3626f9ba.tar.bz2
Merge branch 'master' of scm.dev.troll.no:qt/qt-earth-team into symbian-socket-engine
Conflicts: src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtGuiu.def src/s60installs/bwins/QtNetworku.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtGuiu.def src/s60installs/eabi/QtNetworku.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
Diffstat (limited to 'tests/auto/qftp')
-rw-r--r--tests/auto/qftp/tst_qftp.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/auto/qftp/tst_qftp.cpp b/tests/auto/qftp/tst_qftp.cpp
index 7e3cd75..78157d8 100644
--- a/tests/auto/qftp/tst_qftp.cpp
+++ b/tests/auto/qftp/tst_qftp.cpp
@@ -301,6 +301,10 @@ void tst_QFtp::init()
void tst_QFtp::cleanup()
{
+ if (ftp) {
+ delete ftp;
+ ftp = 0;
+ }
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy);
@@ -1597,6 +1601,8 @@ void tst_QFtp::binaryAscii()
addCommand(QFtp::Close, ftp->close());
QTestEventLoop::instance().enterLoop( 30 );
+ delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -1617,6 +1623,8 @@ void tst_QFtp::binaryAscii()
addCommand(QFtp::Close, ftp->close());
QTestEventLoop::instance().enterLoop( 30 );
+ delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -2070,8 +2078,11 @@ void tst_QFtp::doneSignal()
ftp.close();
done_success = 0;
- while ( ftp.hasPendingCommands() )
- QCoreApplication::instance()->processEvents();
+ connect(&ftp, SIGNAL(done(bool)), &(QTestEventLoop::instance()), SLOT(exitLoop()));
+ QTestEventLoop::instance().enterLoop(61);
+ if (QTestEventLoop::instance().timeout())
+ QFAIL("Network operation timed out");
+
QTest::qWait(200);
QCOMPARE(spy.count(), 1);