CompilationDB: Fix deprecation warning

C4996: 'QString::fromUtf16': Use char16_t* overload.

Change-Id: I4970eff8576c9425bc17fa61f7ab81277837cadb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Andrii Semkiv <andrii.semkiv@qt.io>
This commit is contained in:
Alessandro Portale
2025-01-06 10:44:54 +01:00
parent 558f25f5f0
commit 5eef6b83da

View File

@@ -94,7 +94,7 @@ static QString compilerPath(QString pathFlag)
wchar_t *buffer = new wchar_t[pathLength]; wchar_t *buffer = new wchar_t[pathLength];
GetLongPathNameW(reinterpret_cast<LPCWSTR>(pathFlag.utf16()), buffer, pathLength); GetLongPathNameW(reinterpret_cast<LPCWSTR>(pathFlag.utf16()), buffer, pathLength);
pathFlag = QString::fromUtf16( pathFlag = QString::fromUtf16(
reinterpret_cast<ushort *>(buffer), static_cast<int>(pathLength - 1)); reinterpret_cast<char16_t *>(buffer), static_cast<int>(pathLength - 1));
delete[] buffer; delete[] buffer;
} }
#endif #endif