forked from qt-creator/qt-creator
Utils: Avoid compile issue with upcoming Qt
QStringList::join() can be ambigous when it gets passed a '\0'. Avoid this ambiguity by explicitly casting its parameter. Change-Id: I65b33d7d59da90d78bfb86d146093338b31e7fd0 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -329,7 +329,7 @@ bool ConsoleProcess::startTerminalEmulator(QSettings *settings, const QString &w
|
|||||||
// cmdLine is assumed to be detached -
|
// cmdLine is assumed to be detached -
|
||||||
// https://blogs.msdn.microsoft.com/oldnewthing/20090601-00/?p=18083
|
// https://blogs.msdn.microsoft.com/oldnewthing/20090601-00/?p=18083
|
||||||
|
|
||||||
QString totalEnvironment = env.toStringList().join('\0') + '\0';
|
QString totalEnvironment = env.toStringList().join(QChar('\0')) + '\0';
|
||||||
LPVOID envPtr = (env != Environment::systemEnvironment())
|
LPVOID envPtr = (env != Environment::systemEnvironment())
|
||||||
? (WCHAR *)(totalEnvironment.utf16()) : nullptr;
|
? (WCHAR *)(totalEnvironment.utf16()) : nullptr;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user