NOISSUE fix build some more - Windows

This commit is contained in:
Petr Mrázek 2016-10-30 02:53:13 +01:00
parent 249e5c13d7
commit 54e0b9bc9b

View File

@ -59,14 +59,14 @@ Qt::HANDLE LockedFile::getMutexHandle(int idx, bool doCreate)
Qt::HANDLE mutex; Qt::HANDLE mutex;
if (doCreate) { if (doCreate) {
mutex = CreateMutexW(NULL, FALSE, (TCHAR*)mname.utf16()); mutex = CreateMutexW(NULL, FALSE, (LPWSTR*)mname.utf16());
if (!mutex) { if (!mutex) {
qErrnoWarning("QtLockedFile::lock(): CreateMutex failed"); qErrnoWarning("QtLockedFile::lock(): CreateMutex failed");
return 0; return 0;
} }
} }
else { else {
OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (TCHAR*)mname.utf16()); OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (LPWSTR*)mname.utf16());
if (!mutex) { if (!mutex) {
if (GetLastError() != ERROR_FILE_NOT_FOUND) if (GetLastError() != ERROR_FILE_NOT_FOUND)
qErrnoWarning("QtLockedFile::lock(): OpenMutex failed"); qErrnoWarning("QtLockedFile::lock(): OpenMutex failed");