diff options
author | Shane Kearns <ext-shane.2.kearns@nokia.com> | 2012-05-04 08:13:40 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-08 23:13:57 (GMT) |
commit | 12f5d32f89eb313d0b8b3bc426c2a9367d8c2664 (patch) | |
tree | 0c2b91c1de7efffd6702a644d17c46fef131e1da /src/plugins | |
parent | aef97ec5e684f75e4f4e36da1ac321270a1ae2f3 (diff) | |
download | Qt-12f5d32f89eb313d0b8b3bc426c2a9367d8c2664.zip Qt-12f5d32f89eb313d0b8b3bc426c2a9367d8c2664.tar.gz Qt-12f5d32f89eb313d0b8b3bc426c2a9367d8c2664.tar.bz2 |
Windows 7 - fix nativewifi bearer plugin
The plugin code only handled the 2 events from windows XP, while
there are more events defined on vista/7. As the scan complete event
was being ignored, updates did not complete.
Task-number: QTBUG-24503
Change-Id: Ib1fd6883b0fd6962f61dab7830e577b9292163ef
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
(cherry picked from commit b45f0418e34a73da1729376c540b312b14b8ffda)
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/bearer/nativewifi/platformdefs.h | 3 | ||||
-rw-r--r-- | src/plugins/bearer/nativewifi/qnativewifiengine.cpp | 25 |
2 files changed, 21 insertions, 7 deletions
diff --git a/src/plugins/bearer/nativewifi/platformdefs.h b/src/plugins/bearer/nativewifi/platformdefs.h index 62ea55c..b454031 100644 --- a/src/plugins/bearer/nativewifi/platformdefs.h +++ b/src/plugins/bearer/nativewifi/platformdefs.h @@ -45,8 +45,11 @@ #include <wtypes.h> #undef interface +//proper header is wlanapi.h, but that is not included in windows XP + #define WLAN_MAX_NAME_LENGTH 256 #define WLAN_MAX_PHY_TYPE_NUMBER 8 +#define WLAN_NOTIFICATION_SOURCE_ACM 0x00000008 #define WLAN_NOTIFICATION_SOURCE_ALL 0x0000ffff #define WLAN_AVAILABLE_NETWORK_CONNECTED 1 #define WLAN_AVAILABLE_NETWORK_HAS_PROFILE 2 diff --git a/src/plugins/bearer/nativewifi/qnativewifiengine.cpp b/src/plugins/bearer/nativewifi/qnativewifiengine.cpp index 6bde5d4..06767ad 100644 --- a/src/plugins/bearer/nativewifi/qnativewifiengine.cpp +++ b/src/plugins/bearer/nativewifi/qnativewifiengine.cpp @@ -69,13 +69,24 @@ void qNotificationCallback(WLAN_NOTIFICATION_DATA *data, QNativeWifiEngine *d) { Q_UNUSED(d); - switch (data->NotificationCode) { - case wlan_notification_acm_connection_complete: - case wlan_notification_acm_disconnected: - QMetaObject::invokeMethod(d, "scanComplete", Qt::QueuedConnection); - break; - default: - ; + if (data->NotificationSource == WLAN_NOTIFICATION_SOURCE_ACM) { + switch (data->NotificationCode) { + case wlan_notification_acm_connection_complete: + case wlan_notification_acm_disconnected: + case wlan_notification_acm_scan_complete: + case wlan_notification_acm_scan_fail: + QMetaObject::invokeMethod(d, "scanComplete", Qt::QueuedConnection); + break; + default: +#ifdef BEARER_MANAGEMENT_DEBUG + qDebug() << "wlan acm notification" << (int)data->NotificationCode; +#endif + break; + } + } else { +#ifdef BEARER_MANAGEMENT_DEBUG + qDebug() << "wlan notification source" << (int)data->NotificationSource << "code" << (int)data->NotificationCode; +#endif } } |