From c8ca0e70709c1a631607d45c555df1035e2a542e Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Sun, 27 Mar 2022 17:37:10 +0800 Subject: [PATCH] Fix build with clang-cl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qtbase\src\corelib\global\qglobal.cpp(3510,21): error: call to member function 'endsWith' is ambiguous Change-Id: I2b20077584a33ca5f40efdf397b5913afd6e7fae Reviewed-by: MÃ¥rten Nordheim --- src/corelib/global/qglobal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 1bbabed781..e184954cb2 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -3507,7 +3507,7 @@ QString qEnvironmentVariable(const char *varName, const QString &defaultValue) _wgetenv_s(&requiredSize, reinterpret_cast(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