Fix build with clang-cl

qtbase\src\corelib\global\qglobal.cpp(3510,21): error: call to member function 'endsWith' is ambiguous

Change-Id: I2b20077584a33ca5f40efdf397b5913afd6e7fae
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
bb10
Yuhang Zhao 2022-03-27 17:37:10 +08:00
parent ad9f748db5
commit c8ca0e7070
1 changed files with 1 additions and 1 deletions

View File

@ -3507,7 +3507,7 @@ QString qEnvironmentVariable(const char *varName, const QString &defaultValue)
_wgetenv_s(&requiredSize, reinterpret_cast<wchar_t *>(buffer.data()), requiredSize,
wname.data());
// requiredSize includes the terminating null, which we don't want.
Q_ASSERT(buffer.endsWith(u'\0'));
Q_ASSERT(buffer.endsWith(QChar(u'\0')));
buffer.chop(1);
return buffer;
#else