CMakeProjectManager: Fix warning

"loop variable ‘var’ of type ‘const QByteArray&’ binds to a temporary
constructed from type ‘const char* const’ [-Wrange-loop-construct]"

Change-Id: I663dcb0c990ee125be9b90640e2925014f7166d1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Christian Kandeler
2024-07-31 12:27:20 +02:00
parent 61c19d78ff
commit 1b2493259c

View File

@@ -946,7 +946,7 @@ static void markCMakeModulesFromPrefixPathAsGenerated(FileApiQtcData &result)
{
const QSet<FilePath> paths = [&result]() {
QSet<FilePath> paths;
for (const QByteArray &var : {"CMAKE_PREFIX_PATH", "CMAKE_FIND_ROOT_PATH"}) {
for (const QByteArray var : {"CMAKE_PREFIX_PATH", "CMAKE_FIND_ROOT_PATH"}) {
const QStringList pathList = result.cache.stringValueOf(var).split(";");
for (const QString &path : pathList)
paths.insert(FilePath::fromString(path));