From 5413d4b4601a26ed0bd1fbc2b8006a2b568f1b4f Mon Sep 17 00:00:00 2001 From: Axel Spoerl Date: Tue, 23 Jul 2024 08:36:15 +0200 Subject: [PATCH] Minor code cleanup QTestPrivate::parseBlackList() Constify local variables, where possible. Remove redundant include. Bump (c) year to 2024. Change-Id: If13fb87b306926cb94f75186071a1dff2969a945 Reviewed-by: Fabian Kosmale (cherry picked from commit 6de2203fb75e034c1a02478daa13e8ddfcea5d75) Reviewed-by: Qt Cherry-pick Bot --- src/testlib/qtestblacklist.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/testlib/qtestblacklist.cpp b/src/testlib/qtestblacklist.cpp index 95dfb28e69..7d848b3f1c 100644 --- a/src/testlib/qtestblacklist.cpp +++ b/src/testlib/qtestblacklist.cpp @@ -1,8 +1,6 @@ -// Copyright (C) 2022 The Qt Company Ltd. +// Copyright (C) 2024 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qtestblacklist_p.h" -#include "qtestresult_p.h" - #include #include #include @@ -246,7 +244,7 @@ namespace QTestPrivate { void parseBlackList() { - QString filename = QTest::qFindTestData(QStringLiteral("BLACKLIST")); + const QString filename = QTest::qFindTestData(QStringLiteral("BLACKLIST")); if (filename.isEmpty()) return; QFile ignored(filename); @@ -267,7 +265,7 @@ void parseBlackList() function = line.mid(1, line.size() - 2); continue; } - bool condition = checkCondition(line); + const bool condition = checkCondition(line); if (condition) { if (!function.size()) { ignoreAll = true;