diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-09-07 11:30:11 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-09-07 11:30:11 (GMT) |
commit | 2b6dd2c7b44e37e79b1ae929a761c17929a2e569 (patch) | |
tree | 30f3c55312be601d29c0acbc318db75d7d06b188 /src/network/kernel | |
parent | 98a4db7321cb286cd0a7a07adeb265798a650515 (diff) | |
parent | 2735bc6759f881c786a1097580a8682e3d28f365 (diff) | |
download | Qt-2b6dd2c7b44e37e79b1ae929a761c17929a2e569.zip Qt-2b6dd2c7b44e37e79b1ae929a761c17929a2e569.tar.gz Qt-2b6dd2c7b44e37e79b1ae929a761c17929a2e569.tar.bz2 |
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts:
qmake/Makefile.win32
src/corelib/io/qfsfileengine_win.cpp
src/corelib/kernel/qeventdispatcher_win.cpp
src/gui/dialogs/qfiledialog_win.cpp
src/gui/inputmethod/qcoefepinputcontext_s60.cpp
src/gui/text/qfontdatabase_win.cpp
src/gui/util/qsystemtrayicon_win.cpp
src/script/utils/qscriptdate.cpp
tests/auto/qinputcontext/tst_qinputcontext.cpp
tests/auto/qscriptengine/tst_qscriptengine.cpp
Diffstat (limited to 'src/network/kernel')
-rw-r--r-- | src/network/kernel/qhostinfo_win.cpp | 14 | ||||
-rw-r--r-- | src/network/kernel/qnetworkinterface_win.cpp | 3 | ||||
-rw-r--r-- | src/network/kernel/qnetworkproxy_win.cpp | 15 |
3 files changed, 17 insertions, 15 deletions
diff --git a/src/network/kernel/qhostinfo_win.cpp b/src/network/kernel/qhostinfo_win.cpp index b30204b..8241c84 100644 --- a/src/network/kernel/qhostinfo_win.cpp +++ b/src/network/kernel/qhostinfo_win.cpp @@ -49,7 +49,7 @@ #include "qhostinfo_p.h" #include "private/qnativesocketengine_p.h" #include <ws2tcpip.h> -#include <qlibrary.h> +#include <private/qsystemlibrary_p.h> #include <qmutex.h> #include <qurl.h> #include <private/qmutexpool_p.h> @@ -90,13 +90,13 @@ static void resolveLibrary() // Attempt to resolve getaddrinfo(); without it we'll have to fall // back to gethostbyname(), which has no IPv6 support. #if !defined(Q_OS_WINCE) - local_getaddrinfo = (getaddrinfoProto) QLibrary::resolve(QLatin1String("ws2_32.dll"), "getaddrinfo"); - local_freeaddrinfo = (freeaddrinfoProto) QLibrary::resolve(QLatin1String("ws2_32.dll"), "freeaddrinfo"); - local_getnameinfo = (getnameinfoProto) QLibrary::resolve(QLatin1String("ws2_32.dll"), "getnameinfo"); + local_getaddrinfo = (getaddrinfoProto) QSystemLibrary::resolve(QLatin1String("ws2_32"), "getaddrinfo"); + local_freeaddrinfo = (freeaddrinfoProto) QSystemLibrary::resolve(QLatin1String("ws2_32"), "freeaddrinfo"); + local_getnameinfo = (getnameinfoProto) QSystemLibrary::resolve(QLatin1String("ws2_32"), "getnameinfo"); #else - local_getaddrinfo = (getaddrinfoProto) QLibrary::resolve(QLatin1String("ws2.dll"), "getaddrinfo"); - local_freeaddrinfo = (freeaddrinfoProto) QLibrary::resolve(QLatin1String("ws2.dll"), "freeaddrinfo"); - local_getnameinfo = (getnameinfoProto) QLibrary::resolve(QLatin1String("ws2.dll"), "getnameinfo"); + local_getaddrinfo = (getaddrinfoProto) QSystemLibrary::resolve(QLatin1String("ws2"), "getaddrinfo"); + local_freeaddrinfo = (freeaddrinfoProto) QSystemLibrary::resolve(QLatin1String("ws2"), "freeaddrinfo"); + local_getnameinfo = (getnameinfoProto) QSystemLibrary::resolve(QLatin1String("ws2"), "getnameinfo"); #endif } diff --git a/src/network/kernel/qnetworkinterface_win.cpp b/src/network/kernel/qnetworkinterface_win.cpp index 056650d..a1d1df6 100644 --- a/src/network/kernel/qnetworkinterface_win.cpp +++ b/src/network/kernel/qnetworkinterface_win.cpp @@ -48,6 +48,7 @@ #include <qhostinfo.h> #include <qhash.h> #include <qurl.h> +#include <private/qsystemlibrary_p.h> QT_BEGIN_NAMESPACE @@ -66,7 +67,7 @@ static void resolveLibs() if (!done) { done = true; - HINSTANCE iphlpapiHnd = LoadLibrary(L"iphlpapi"); + HINSTANCE iphlpapiHnd = QSystemLibrary::load(L"iphlpapi"); if (iphlpapiHnd == NULL) return; diff --git a/src/network/kernel/qnetworkproxy_win.cpp b/src/network/kernel/qnetworkproxy_win.cpp index 537107e..a72ef38 100644 --- a/src/network/kernel/qnetworkproxy_win.cpp +++ b/src/network/kernel/qnetworkproxy_win.cpp @@ -51,6 +51,7 @@ #include <string.h> #include <qt_windows.h> #include <wininet.h> +#include <private/qsystemlibrary_p.h> /* * Information on the WinHTTP DLL: @@ -277,15 +278,15 @@ void QWindowsSystemProxy::init() return; #else // load the winhttp.dll library - HINSTANCE winhttpHnd = LoadLibrary(L"winhttp"); - if (!winhttpHnd) + QSystemLibrary lib(L"winhttp"); + if (!lib.load()) return; // failed to load - ptrWinHttpOpen = (PtrWinHttpOpen)GetProcAddress(winhttpHnd, "WinHttpOpen"); - ptrWinHttpCloseHandle = (PtrWinHttpCloseHandle)GetProcAddress(winhttpHnd, "WinHttpCloseHandle"); - ptrWinHttpGetProxyForUrl = (PtrWinHttpGetProxyForUrl)GetProcAddress(winhttpHnd, "WinHttpGetProxyForUrl"); - ptrWinHttpGetDefaultProxyConfiguration = (PtrWinHttpGetDefaultProxyConfiguration)GetProcAddress(winhttpHnd, "WinHttpGetDefaultProxyConfiguration"); - ptrWinHttpGetIEProxyConfigForCurrentUser = (PtrWinHttpGetIEProxyConfigForCurrentUser)GetProcAddress(winhttpHnd, "WinHttpGetIEProxyConfigForCurrentUser"); + ptrWinHttpOpen = (PtrWinHttpOpen)lib.resolve("WinHttpOpen"); + ptrWinHttpCloseHandle = (PtrWinHttpCloseHandle)lib.resolve("WinHttpCloseHandle"); + ptrWinHttpGetProxyForUrl = (PtrWinHttpGetProxyForUrl)lib.resolve("WinHttpGetProxyForUrl"); + ptrWinHttpGetDefaultProxyConfiguration = (PtrWinHttpGetDefaultProxyConfiguration)lib.resolve("WinHttpGetDefaultProxyConfiguration"); + ptrWinHttpGetIEProxyConfigForCurrentUser = (PtrWinHttpGetIEProxyConfigForCurrentUser)lib.resolve("WinHttpGetIEProxyConfigForCurrentUser"); // Try to obtain the Internet Explorer configuration. WINHTTP_CURRENT_USER_IE_PROXY_CONFIG ieProxyConfig; |