qtmobility/tests/auto/qnetworksession/lackey/main.cpp
branchRCL_3
changeset 5 4ea83c148e84
parent 2 87be51aa5b5b
child 6 4203353e74ea
--- a/qtmobility/tests/auto/qnetworksession/lackey/main.cpp	Tue May 25 13:34:51 2010 +0300
+++ b/qtmobility/tests/auto/qnetworksession/lackey/main.cpp	Wed Jun 09 10:36:00 2010 +0300
@@ -46,6 +46,8 @@
 #include "../../../../src/bearer/qnetworkconfiguration.h"
 #include "../../../../src/bearer/qnetworksession.h"
 
+#include <QEventLoop>
+#include <QTimer>
 #include <QDebug>
 
 QTM_USE_NAMESPACE
@@ -59,7 +61,14 @@
 {
     QCoreApplication app(argc, argv);
 
+    // Update configurations so that everything is up to date for this process too.
+    // Event loop is used to wait for awhile.
     QNetworkConfigurationManager manager;
+    manager.updateConfigurations();
+    QEventLoop iIgnoreEventLoop;
+    QTimer::singleShot(3000, &iIgnoreEventLoop, SLOT(quit()));
+    iIgnoreEventLoop.exec();
+
     QList<QNetworkConfiguration> discovered =
         manager.allConfigurations(QNetworkConfiguration::Discovered);
 
@@ -75,7 +84,6 @@
 
     // Cannot read/write to processes on WinCE or Symbian.
     // Easiest alternative is to use sockets for IPC.
-
     QLocalSocket oopSocket;
 
     oopSocket.connectToServer("tst_qnetworksession");