ProjectExplorer: Fix compiler warning

warning: local variable 'task' will be copied despite being returned by
name [-Wreturn-std-move]

NRVO doesn't happen because "CompileTask" isn't the same type as the
return value "Task".

Change-Id: Ic9c6388d4667cd68dbbba98b6b98721c4d4fb557
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Eike Ziller
2022-05-11 10:10:07 +02:00
parent 78b08f57a2
commit 7881a49e7d

View File

@@ -80,7 +80,7 @@ static Task handleNmakeJomMessage(const QString &line)
CompileTask task(Task::Error, line.mid(matchLength).trimmed());
task.details << line;
return task;
return std::move(task);
}
static Task::TaskType taskType(const QString &category)