[Qt-qml] QNetworkConfiguration - Wifi network not re-discovered after XMLHttpRequest

Sudheer K. scifi1947 at gmail.com
Thu Jun 30 09:06:46 CEST 2011


I am trying to verify whether any saved wifi networks are in range before
sending a data request from QML. For this I am using
allConfigurations(QNetworkConfiguration::Discovered). This works fine if
used independently. However, calling this function after using a network
with XMLHttpRequest and then disconnecting changes the status of network to
just "Defined" even though the wifi network is still in range. Here is a
sample code to reproduce the problem.

Before running the code make sure that a wifi network is defined (saved) and
is in range.

connectionutility.h [1]
main.cpp [2]
main.qml [3]

Scenario 1: Without using XMLHttpRequest

Step 1: Comment the line queryData(); in main.qml
Step 2: Disconnect from wifi network (if connected)
Step 3: Run the application on device, wait for 20 sec
Expected result: The wifi used previously is displayed in console. (This
works)

Scenario 2: Using XMLHttpRequest

Step 1: Uncomment the line queryData(); in main.qml
Step 2: Disconnect from wifi network (if connected)
Step 3: Run the application on device, connect to a wifi network (if
prompted)
Step 4: After the message "Now disconnect from wifi for testing" is
displayed in console, disconnect from Wifi. Wait for 20 sec
Expected result: The wifi used previously is displayed in console. (This
doesn't work).

Can anyone help me fix this issue on N900?

[1] - http://pastebin.com/fjRr4cyv
[2] - http://pastebin.com/NJxuP7rB
[3] - http://pastebin.com/3QQh1ce9

~Sudheer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110630/990e4be4/attachment.html 


More information about the Qt-qml mailing list