From 1c81a3b3e887d9774cc342caafccebd7cdb90f19 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 17 Jun 2020 06:35:31 +0200 Subject: All: Use Utils::SkipEmptyParts Task-number: QTCREATORBUG-24098 Change-Id: Iab45de9a9c17ddc39a0e343b1175d4f6cb94b098 Reviewed-by: Christian Stenger --- src/plugins/autotest/boost/boosttestconfiguration.cpp | 4 +++- src/plugins/autotest/catch/catchconfiguration.cpp | 4 +++- src/plugins/autotest/gtest/gtestconfiguration.cpp | 3 ++- src/plugins/autotest/gtest/gtesttreeitem.cpp | 8 +++++--- src/plugins/autotest/qtest/qttestconfiguration.cpp | 4 +++- src/plugins/autotest/quick/quicktestconfiguration.cpp | 4 +++- 6 files changed, 19 insertions(+), 8 deletions(-) (limited to 'src/plugins/autotest') diff --git a/src/plugins/autotest/boost/boosttestconfiguration.cpp b/src/plugins/autotest/boost/boosttestconfiguration.cpp index e38243a89f6..dfb0cb78a7d 100644 --- a/src/plugins/autotest/boost/boosttestconfiguration.cpp +++ b/src/plugins/autotest/boost/boosttestconfiguration.cpp @@ -32,6 +32,8 @@ #include "../itestframework.h" #include "../testsettings.h" +#include + namespace Autotest { namespace Internal { @@ -126,7 +128,7 @@ QStringList BoostTestConfiguration::argumentsForTestRunner(QStringList *omitted) if (AutotestPlugin::settings()->processArgs) { arguments << filterInterfering(runnable().commandLineArguments.split( - ' ', QString::SkipEmptyParts), omitted); + ' ', Utils::SkipEmptyParts), omitted); } return arguments; } diff --git a/src/plugins/autotest/catch/catchconfiguration.cpp b/src/plugins/autotest/catch/catchconfiguration.cpp index f314ef49bbb..e9e957a1430 100644 --- a/src/plugins/autotest/catch/catchconfiguration.cpp +++ b/src/plugins/autotest/catch/catchconfiguration.cpp @@ -30,6 +30,8 @@ #include "../itestframework.h" #include "../testsettings.h" +#include + namespace Autotest { namespace Internal { @@ -99,7 +101,7 @@ QStringList CatchConfiguration::argumentsForTestRunner(QStringList *omitted) con if (AutotestPlugin::settings()->processArgs) { arguments << filterInterfering(runnable().commandLineArguments.split( - ' ', QString::SkipEmptyParts), omitted); + ' ', Utils::SkipEmptyParts), omitted); } auto settings = dynamic_cast(framework()->frameworkSettings()); diff --git a/src/plugins/autotest/gtest/gtestconfiguration.cpp b/src/plugins/autotest/gtest/gtestconfiguration.cpp index 615ddcd3da0..13cbebc2467 100644 --- a/src/plugins/autotest/gtest/gtestconfiguration.cpp +++ b/src/plugins/autotest/gtest/gtestconfiguration.cpp @@ -32,6 +32,7 @@ #include "../testsettings.h" #include +#include namespace Autotest { namespace Internal { @@ -76,7 +77,7 @@ QStringList GTestConfiguration::argumentsForTestRunner(QStringList *omitted) con QStringList arguments; if (AutotestPlugin::settings()->processArgs) { arguments << filterInterfering(runnable().commandLineArguments.split( - ' ', QString::SkipEmptyParts), omitted); + ' ', Utils::SkipEmptyParts), omitted); } const QStringList &testSets = testCases(); diff --git a/src/plugins/autotest/gtest/gtesttreeitem.cpp b/src/plugins/autotest/gtest/gtesttreeitem.cpp index f2821ca1bff..8b5c9eafc78 100644 --- a/src/plugins/autotest/gtest/gtesttreeitem.cpp +++ b/src/plugins/autotest/gtest/gtesttreeitem.cpp @@ -32,9 +32,11 @@ #include #include + #include #include #include +#include #include #include @@ -91,10 +93,10 @@ static bool matchesFilter(const QString &filter, const QString &fullTestName) QStringList negative; int startOfNegative = filter.indexOf('-'); if (startOfNegative == -1) { - positive.append(filter.split(':', QString::SkipEmptyParts)); + positive.append(filter.split(':', Utils::SkipEmptyParts)); } else { - positive.append(filter.left(startOfNegative).split(':', QString::SkipEmptyParts)); - negative.append(filter.mid(startOfNegative + 1).split(':', QString::SkipEmptyParts)); + positive.append(filter.left(startOfNegative).split(':', Utils::SkipEmptyParts)); + negative.append(filter.mid(startOfNegative + 1).split(':', Utils::SkipEmptyParts)); } QString testName = fullTestName; diff --git a/src/plugins/autotest/qtest/qttestconfiguration.cpp b/src/plugins/autotest/qtest/qttestconfiguration.cpp index a3bc92c67c4..30a707ebaba 100644 --- a/src/plugins/autotest/qtest/qttestconfiguration.cpp +++ b/src/plugins/autotest/qtest/qttestconfiguration.cpp @@ -32,6 +32,8 @@ #include "../itestframework.h" #include "../testsettings.h" +#include + namespace Autotest { namespace Internal { @@ -50,7 +52,7 @@ QStringList QtTestConfiguration::argumentsForTestRunner(QStringList *omitted) co QStringList arguments; if (AutotestPlugin::settings()->processArgs) { arguments.append(QTestUtils::filterInterfering( - runnable().commandLineArguments.split(' ', QString::SkipEmptyParts), + runnable().commandLineArguments.split(' ', Utils::SkipEmptyParts), omitted, false)); } auto qtSettings = dynamic_cast(framework()->frameworkSettings()); diff --git a/src/plugins/autotest/quick/quicktestconfiguration.cpp b/src/plugins/autotest/quick/quicktestconfiguration.cpp index e61c4f12d8e..22abcb5df52 100644 --- a/src/plugins/autotest/quick/quicktestconfiguration.cpp +++ b/src/plugins/autotest/quick/quicktestconfiguration.cpp @@ -32,6 +32,8 @@ #include "../itestframework.h" #include "../testsettings.h" +#include + namespace Autotest { namespace Internal { @@ -57,7 +59,7 @@ QStringList QuickTestConfiguration::argumentsForTestRunner(QStringList *omitted) QStringList arguments; if (AutotestPlugin::settings()->processArgs) { arguments.append(QTestUtils::filterInterfering - (runnable().commandLineArguments.split(' ', QString::SkipEmptyParts), + (runnable().commandLineArguments.split(' ', Utils::SkipEmptyParts), omitted, true)); } -- cgit v1.2.3