diff --git a/src/plugins/autotest/autotestunittests.cpp b/src/plugins/autotest/autotestunittests.cpp index 34b368cc1df..e799eb7b43c 100644 --- a/src/plugins/autotest/autotestunittests.cpp +++ b/src/plugins/autotest/autotestunittests.cpp @@ -80,7 +80,7 @@ void AutoTestUnitTests::initTestCase() m_tmpDir = new CppTools::Tests::TemporaryCopiedDir(":/unit_test"); - if (!qgetenv("BOOST_INCLUDE_DIR").isEmpty()) { + if (!qEnvironmentVariableIsEmpty("BOOST_INCLUDE_DIR")) { m_checkBoost = true; } else { if (Utils::HostOsInfo::isLinuxHost() @@ -200,7 +200,7 @@ void AutoTestUnitTests::testCodeParserSwitchStartup_data() void AutoTestUnitTests::testCodeParserGTest() { - if (qgetenv("GOOGLETEST_DIR").isEmpty()) + if (qEnvironmentVariableIsEmpty("GOOGLETEST_DIR")) QSKIP("This test needs googletest - set GOOGLETEST_DIR (point to googletest repository)"); QFETCH(QString, projectFilePath); diff --git a/src/plugins/autotest/catch/catchconfiguration.cpp b/src/plugins/autotest/catch/catchconfiguration.cpp index c9213f876a6..4fb235e0351 100644 --- a/src/plugins/autotest/catch/catchconfiguration.cpp +++ b/src/plugins/autotest/catch/catchconfiguration.cpp @@ -74,7 +74,8 @@ static QStringList filterInterfering(const QStringList &provided, QStringList *o for (const auto &arg : provided) { bool interferes = false; if (filterNext) { - omitted->append(arg); + if (omitted) + omitted->append(arg); filterNext = false; continue; } diff --git a/src/plugins/autotest/testtreemodel.cpp b/src/plugins/autotest/testtreemodel.cpp index dcae1193c4f..e3d8abf01dd 100644 --- a/src/plugins/autotest/testtreemodel.cpp +++ b/src/plugins/autotest/testtreemodel.cpp @@ -254,6 +254,7 @@ void TestTreeModel::onBuildSystemTestsUpdated() if (!bs || !bs->project()) return; + QTC_ASSERT(m_checkStateCache, return); m_checkStateCache->evolve(ITestBase::Tool); ITestTool *testTool = TestFrameworkManager::testToolForBuildSystemId(bs->project()->id());