summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2011-10-07 12:45:19 (GMT)
committerJan-Arve Saether <jan-arve.saether@nokia.com>2011-10-07 12:45:19 (GMT)
commit80a8c4c8615da574b155b7624eab1c8323de3ee3 (patch)
tree90f4f2861f70bb64ccb370e5ff12645dde2521e6 /src/plugins
parent48a73353029104a4d2c5fda2c9fb007d1924c9ec (diff)
downloadQt-80a8c4c8615da574b155b7624eab1c8323de3ee3.zip
Qt-80a8c4c8615da574b155b7624eab1c8323de3ee3.tar.gz
Qt-80a8c4c8615da574b155b7624eab1c8323de3ee3.tar.bz2
nativewifi bearer plugin: prefer DLL Safe Search mode
by using QSystemLibrary instead of QLibrary Merge-request: 2655 Reviewed-by: Jan-Arve Saether <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/bearer/nativewifi/main.cpp31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/plugins/bearer/nativewifi/main.cpp b/src/plugins/bearer/nativewifi/main.cpp
index ce7d906..cbdfd99 100644
--- a/src/plugins/bearer/nativewifi/main.cpp
+++ b/src/plugins/bearer/nativewifi/main.cpp
@@ -44,7 +44,7 @@
#include <QtCore/qmutex.h>
#include <QtCore/private/qmutexpool_p.h>
-#include <QtCore/qlibrary.h>
+#include <QtCore/private/qsystemlibrary_p.h>
#include <QtNetwork/private/qbearerplugin_p.h>
@@ -63,30 +63,33 @@ static void resolveLibrary()
QMutexLocker locker(QMutexPool::globalInstanceGet(&local_WlanOpenHandle));
#endif
- if (!triedResolve) {
+ if (triedResolve)
+ return;
+
+ QSystemLibrary wlanapi(QLatin1String("wlanapi"));
+ if (wlanapi.load()) {
local_WlanOpenHandle = (WlanOpenHandleProto)
- QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanOpenHandle");
+ wlanapi.resolve("WlanOpenHandle");
local_WlanRegisterNotification = (WlanRegisterNotificationProto)
- QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanRegisterNotification");
+ wlanapi.resolve("WlanRegisterNotification");
local_WlanEnumInterfaces = (WlanEnumInterfacesProto)
- QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanEnumInterfaces");
+ wlanapi.resolve("WlanEnumInterfaces");
local_WlanGetAvailableNetworkList = (WlanGetAvailableNetworkListProto)
- QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanGetAvailableNetworkList");
+ wlanapi.resolve("WlanGetAvailableNetworkList");
local_WlanQueryInterface = (WlanQueryInterfaceProto)
- QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanQueryInterface");
+ wlanapi.resolve("WlanQueryInterface");
local_WlanConnect = (WlanConnectProto)
- QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanConnect");
+ wlanapi.resolve("WlanConnect");
local_WlanDisconnect = (WlanDisconnectProto)
- QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanDisconnect");
+ wlanapi.resolve("WlanDisconnect");
local_WlanScan = (WlanScanProto)
- QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanScan");
+ wlanapi.resolve("WlanScan");
local_WlanFreeMemory = (WlanFreeMemoryProto)
- QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanFreeMemory");
+ wlanapi.resolve("WlanFreeMemory");
local_WlanCloseHandle = (WlanCloseHandleProto)
- QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanCloseHandle");
-
- triedResolve = true;
+ wlanapi.resolve("WlanCloseHandle");
}
+ triedResolve = true;
}
}