diff --git a/src/plugins/autotest/gtest/gtestconfiguration.cpp b/src/plugins/autotest/gtest/gtestconfiguration.cpp index cbdd0c8e8a2..ff60f32171c 100644 --- a/src/plugins/autotest/gtest/gtestconfiguration.cpp +++ b/src/plugins/autotest/gtest/gtestconfiguration.cpp @@ -59,18 +59,18 @@ QStringList filterInterfering(const QStringList &provided, QStringList *omitted) "--gtest_print_time=" }; - QSet allowed = Utils::filtered(Utils::toSet(provided), [] (const QString &arg) { + QStringList allowed = Utils::filtered(provided, [] (const QString &arg) { return Utils::allOf(knownInterferingOptions, [&arg] (const QString &interfering) { return !arg.startsWith(interfering); }); }); - if (omitted) { + if (omitted && allowed.size() < provided.size()) { QSet providedSet = Utils::toSet(provided); - providedSet.subtract(allowed); + providedSet.subtract(Utils::toSet(allowed)); omitted->append(Utils::toList(providedSet)); } - return Utils::toList(allowed); + return allowed; } QStringList GTestConfiguration::argumentsForTestRunner(QStringList *omitted) const