mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-09-02 21:19:25 +00:00
NOISSUE fix a bug with mutexes on Windows, more warnings
This commit is contained in:
parent
07f7ec8eef
commit
bb599abf59
@ -31,6 +31,7 @@ JavaUtils::JavaUtils()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
static QString processLD_LIBRARY_PATH(const QString & LD_LIBRARY_PATH)
|
static QString processLD_LIBRARY_PATH(const QString & LD_LIBRARY_PATH)
|
||||||
{
|
{
|
||||||
QDir mmcBin(QCoreApplication::applicationDirPath());
|
QDir mmcBin(QCoreApplication::applicationDirPath());
|
||||||
@ -48,6 +49,7 @@ static QString processLD_LIBRARY_PATH(const QString & LD_LIBRARY_PATH)
|
|||||||
}
|
}
|
||||||
return final.join(':');
|
return final.join(':');
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QProcessEnvironment CleanEnviroment()
|
QProcessEnvironment CleanEnviroment()
|
||||||
{
|
{
|
||||||
|
@ -66,7 +66,7 @@ Qt::HANDLE LockedFile::getMutexHandle(int idx, bool doCreate)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (LPCWSTR)mname.utf16());
|
mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (LPCWSTR)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");
|
||||||
|
Loading…
Reference in New Issue
Block a user