forked from qt-creator/qt-creator
Cmake: Don't take QStringRefs of a temporary QString
This crashes. Change-Id: I3f81466f504fdff8d47372425ea8f84048f89b76 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -411,7 +411,8 @@ void CMakeTool::fetchVersionFromVersionOutput() const
|
||||
return;
|
||||
|
||||
QRegularExpression versionLine("^cmake version ((\\d+).(\\d+).(\\d+).*)$");
|
||||
for (const QStringRef &line : response.stdOut().splitRef(QLatin1Char('\n'))) {
|
||||
const QString responseText = response.stdOut();
|
||||
for (const QStringRef &line : responseText.splitRef(QLatin1Char('\n'))) {
|
||||
QRegularExpressionMatch match = versionLine.match(line);
|
||||
if (!match.hasMatch())
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user