NOISSUE fix a bug with mutexes on Windows, more warnings

This commit is contained in:
Petr Mrázek 2018-06-28 23:42:44 +02:00
parent 07f7ec8eef
commit bb599abf59
2 changed files with 3 additions and 1 deletions

View File

@ -31,6 +31,7 @@ JavaUtils::JavaUtils()
{
}
#ifdef Q_OS_LINUX
static QString processLD_LIBRARY_PATH(const QString & LD_LIBRARY_PATH)
{
QDir mmcBin(QCoreApplication::applicationDirPath());
@ -48,6 +49,7 @@ static QString processLD_LIBRARY_PATH(const QString & LD_LIBRARY_PATH)
}
return final.join(':');
}
#endif
QProcessEnvironment CleanEnviroment()
{

View File

@ -66,7 +66,7 @@ Qt::HANDLE LockedFile::getMutexHandle(int idx, bool doCreate)
}
}
else {
OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (LPCWSTR)mname.utf16());
mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (LPCWSTR)mname.utf16());
if (!mutex) {
if (GetLastError() != ERROR_FILE_NOT_FOUND)
qErrnoWarning("QtLockedFile::lock(): OpenMutex failed");