summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorminiak <milan.burda@gmail.com>2009-12-22 13:57:59 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2009-12-22 14:42:30 (GMT)
commite60dbc9ca47a0e9371d619b7c5d24a4b3ec4fcd9 (patch)
tree4f1df650ecbb1f5a66c49ab9e4458d75ebeef095 /src/corelib/io
parentef5291b0fd521b7f22169ebc2297f720120296d6 (diff)
downloadQt-e60dbc9ca47a0e9371d619b7c5d24a4b3ec4fcd9.zip
Qt-e60dbc9ca47a0e9371d619b7c5d24a4b3ec4fcd9.tar.gz
Qt-e60dbc9ca47a0e9371d619b7c5d24a4b3ec4fcd9.tar.bz2
fix small leftovers from the Win9x removal in the code
LoadLibraryW -> LoadLibrary RegOpenKeyExW -> RegOpenKeyEx qdesktopservices_win.cpp: buffer size fixed in launchWebBrowser() Windows NT 4.0 version condition removed Merge-request: 1627 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index 10a7c54..36cf67b 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -177,7 +177,7 @@ void QFSFileEnginePrivate::resolveLibs()
triedResolve = true;
#if !defined(Q_OS_WINCE)
- HINSTANCE advapiHnd = LoadLibraryW(L"advapi32");
+ HINSTANCE advapiHnd = LoadLibrary(L"advapi32");
if (advapiHnd) {
ptrGetNamedSecurityInfoW = (PtrGetNamedSecurityInfoW)GetProcAddress(advapiHnd, "GetNamedSecurityInfoW");
ptrLookupAccountSidW = (PtrLookupAccountSidW)GetProcAddress(advapiHnd, "LookupAccountSidW");
@@ -209,7 +209,7 @@ void QFSFileEnginePrivate::resolveLibs()
ptrFreeSid(pWorld);
}
}
- HINSTANCE userenvHnd = LoadLibraryW(L"userenv");
+ HINSTANCE userenvHnd = LoadLibrary(L"userenv");
if (userenvHnd)
ptrGetUserProfileDirectoryW = (PtrGetUserProfileDirectoryW)GetProcAddress(userenvHnd, "GetUserProfileDirectoryW");
#endif
@@ -217,7 +217,6 @@ void QFSFileEnginePrivate::resolveLibs()
}
#endif // QT_NO_LIBRARY
-// UNC functions NT
typedef DWORD (WINAPI *PtrNetShareEnum)(LPWSTR, DWORD, LPBYTE*, DWORD, LPDWORD, LPDWORD, LPDWORD);
static PtrNetShareEnum ptrNetShareEnum = 0;
typedef DWORD (WINAPI *PtrNetApiBufferFree)(LPVOID);
@@ -241,7 +240,7 @@ bool QFSFileEnginePrivate::resolveUNCLibs()
#endif
triedResolve = true;
#if !defined(Q_OS_WINCE)
- HINSTANCE hLib = LoadLibraryW(L"Netapi32");
+ HINSTANCE hLib = LoadLibrary(L"netapi32");
if (hLib) {
ptrNetShareEnum = (PtrNetShareEnum)GetProcAddress(hLib, "NetShareEnum");
if (ptrNetShareEnum)
@@ -1038,11 +1037,11 @@ QString QFSFileEngine::homePath()
if (ok) {
DWORD dwBufferSize = 0;
// First call, to determine size of the strings (with '\0').
- ok = ::ptrGetUserProfileDirectoryW(token, NULL, &dwBufferSize);
+ ok = ptrGetUserProfileDirectoryW(token, NULL, &dwBufferSize);
if (!ok && dwBufferSize != 0) { // We got the required buffer size
wchar_t *userDirectory = new wchar_t[dwBufferSize];
// Second call, now we can fill the allocated buffer.
- ok = ::ptrGetUserProfileDirectoryW(token, userDirectory, &dwBufferSize);
+ ok = ptrGetUserProfileDirectoryW(token, userDirectory, &dwBufferSize);
if (ok)
ret = QString::fromWCharArray(userDirectory);
@@ -1414,7 +1413,7 @@ QAbstractFileEngine::FileFlags QFSFileEnginePrivate::getPermissions() const
QAbstractFileEngine::FileFlags ret = 0;
#if !defined(QT_NO_LIBRARY)
- if((qt_ntfs_permission_lookup > 0) && ((QSysInfo::WindowsVersion&QSysInfo::WV_NT_based) > QSysInfo::WV_NT)) {
+ if((qt_ntfs_permission_lookup > 0) && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)) {
PSID pOwner = 0;
PSID pGroup = 0;
PACL pDacl;
@@ -1721,7 +1720,7 @@ QString QFSFileEngine::owner(FileOwner own) const
{
#if !defined(QT_NO_LIBRARY)
Q_D(const QFSFileEngine);
- if((qt_ntfs_permission_lookup > 0) && ((QSysInfo::WindowsVersion&QSysInfo::WV_NT_based) > QSysInfo::WV_NT)) {
+ if((qt_ntfs_permission_lookup > 0) && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)) {
PSID pOwner = 0;
PSECURITY_DESCRIPTOR pSD;
QString name;