summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2011-10-07 12:45:26 (GMT)
committerJan-Arve Saether <jan-arve.saether@nokia.com>2011-10-07 12:45:26 (GMT)
commit1bfef526ef3d1deb7cf0f11dc1880f33937a85ac (patch)
tree99f12e16c210bf99ea901feed7da14d5efc32420 /src/gui/dialogs
parent80a8c4c8615da574b155b7624eab1c8323de3ee3 (diff)
downloadQt-1bfef526ef3d1deb7cf0f11dc1880f33937a85ac.zip
Qt-1bfef526ef3d1deb7cf0f11dc1880f33937a85ac.tar.gz
Qt-1bfef526ef3d1deb7cf0f11dc1880f33937a85ac.tar.bz2
use QSystemLibrary::resolve() instead of GetProcAddress() win API calls
this makes the code more consistent with similar parts and a bit more readable Merge-request: 2655 Reviewed-by: Jan-Arve Saether <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/qfiledialog_win.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/dialogs/qfiledialog_win.cpp b/src/gui/dialogs/qfiledialog_win.cpp
index de8e33d..30f5f18 100644
--- a/src/gui/dialogs/qfiledialog_win.cpp
+++ b/src/gui/dialogs/qfiledialog_win.cpp
@@ -99,16 +99,16 @@ static void qt_win_resolve_libs()
triedResolve = true;
#if !defined(Q_WS_WINCE)
- QSystemLibrary lib(L"shell32");
+ QSystemLibrary lib(QLatin1String("shell32"));
ptrSHBrowseForFolder = (PtrSHBrowseForFolder)lib.resolve("SHBrowseForFolderW");
ptrSHGetPathFromIDList = (PtrSHGetPathFromIDList)lib.resolve("SHGetPathFromIDListW");
ptrSHGetMalloc = (PtrSHGetMalloc)lib.resolve("SHGetMalloc");
#else
// CE stores them in a different lib and does not use unicode version
- HINSTANCE handle = LoadLibrary(L"Ceshell");
- ptrSHBrowseForFolder = (PtrSHBrowseForFolder)GetProcAddress(handle, L"SHBrowseForFolder");
- ptrSHGetPathFromIDList = (PtrSHGetPathFromIDList)GetProcAddress(handle, L"SHGetPathFromIDList");
- ptrSHGetMalloc = (PtrSHGetMalloc)GetProcAddress(handle, L"SHGetMalloc");
+ QSystemLibrary lib(QLatin1String("Ceshell"));
+ ptrSHBrowseForFolder = (PtrSHBrowseForFolder)lib.resolve("SHBrowseForFolder");
+ ptrSHGetPathFromIDList = (PtrSHGetPathFromIDList)lib.resolve("SHGetPathFromIDList");
+ ptrSHGetMalloc = (PtrSHGetMalloc)lib.resolve("SHGetMalloc");
if (ptrSHBrowseForFolder && ptrSHGetPathFromIDList && ptrSHGetMalloc)
qt_priv_ptr_valid = true;
#endif