diff options
author | hjk <[email protected]> | 2019-03-13 09:02:23 +0100 |
---|---|---|
committer | hjk <[email protected]> | 2019-03-13 10:52:01 +0000 |
commit | 424267979dfea6abe8fc5dfec8f95a0e1c1d3c93 (patch) | |
tree | 031334f22c3acae46686fd9e7827060ee8251392 /src/plugins/autotest/testconfiguration.cpp | |
parent | a68b967609b3461b9050bef720d3fb3f82764f94 (diff) |
AutoTest: Simplify some RunConfiguration use
Change-Id: I8ed2ddb7f0ee683a96787c71a6627755d83c3e5f
Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/autotest/testconfiguration.cpp')
-rw-r--r-- | src/plugins/autotest/testconfiguration.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/autotest/testconfiguration.cpp b/src/plugins/autotest/testconfiguration.cpp index 60a1a5e78ce..c20fd2b7615 100644 --- a/src/plugins/autotest/testconfiguration.cpp +++ b/src/plugins/autotest/testconfiguration.cpp @@ -53,9 +53,8 @@ TestConfiguration::~TestConfiguration() m_testCases.clear(); } -static bool isLocal(RunConfiguration *runConfiguration) +static bool isLocal(Target *target) { - Target *target = runConfiguration ? runConfiguration->target() : nullptr; Kit *kit = target ? target->kit() : nullptr; return DeviceTypeKitAspect::deviceTypeId(kit) == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE; } @@ -183,7 +182,7 @@ void TestConfiguration::completeTestInformation(TestRunMode runMode) qCDebug(LOG) << "Iterating run configurations"; for (RunConfiguration *runConfig : target->runConfigurations()) { qCDebug(LOG) << "RunConfiguration" << runConfig->id(); - if (!isLocal(runConfig)) { // TODO add device support + if (!isLocal(target)) { // TODO add device support qCDebug(LOG) << " Skipped as not being local"; continue; } @@ -204,7 +203,7 @@ void TestConfiguration::completeTestInformation(TestRunMode runMode) m_runnable.executable = currentExecutable; m_displayName = runConfig->displayName(); if (runMode == TestRunMode::Debug || runMode == TestRunMode::DebugWithoutDeploy) - m_runConfig = new TestRunConfiguration(runConfig->target(), this); + m_runConfig = new TestRunConfiguration(target, this); break; } } @@ -219,7 +218,7 @@ void TestConfiguration::completeTestInformation(TestRunMode runMode) qCDebug(LOG) << " Fallback"; // we failed to find a valid runconfiguration - but we've got the executable already if (auto rc = target->activeRunConfiguration()) { - if (isLocal(rc)) { // FIXME for now only Desktop support + if (isLocal(target)) { // FIXME for now only Desktop support const Runnable runnable = rc->runnable(); m_runnable.environment = runnable.environment; m_deducedConfiguration = true; |