summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@theqtcompany.com>2015-01-16 11:56:15 +0100
committerTim Jenssen <tim.jenssen@theqtcompany.com>2015-01-21 09:24:47 +0200
commit2a78ffea8d9514b147167408269f0076c094fb70 (patch)
tree92873d1e160d2c96db38fdb7485ac3d2ff3c19ff
parent33ce9f9e0da3282ebd33655a8aa8b7752c7485b0 (diff)
downloadqt-creator-2a78ffea8d9514b147167408269f0076c094fb70.tar.gz
refactor if clause
Change-Id: I3ce6e711392f35c89dfcbecc3c8fcb8aca293602 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
-rw-r--r--plugins/autotest/testtreemodel.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/plugins/autotest/testtreemodel.cpp b/plugins/autotest/testtreemodel.cpp
index 7060203a41..e966446e9d 100644
--- a/plugins/autotest/testtreemodel.cpp
+++ b/plugins/autotest/testtreemodel.cpp
@@ -342,17 +342,16 @@ static void addProjectInformation(TestConfiguration *config, const QString &file
QList<ProjectExplorer::RunConfiguration *> rcs = target->runConfigurations();
foreach (ProjectExplorer::RunConfiguration *rc, rcs) {
- if (ProjectExplorer::LocalApplicationRunConfiguration *localRunConfiguration
- = qobject_cast<ProjectExplorer::LocalApplicationRunConfiguration *>(rc)) {
- if (localRunConfiguration->executable() == targetFile) {
- hasDesktopTarget = true;
- workDir = Utils::FileUtils::normalizePathName(
- localRunConfiguration->workingDirectory());
- ProjectExplorer::EnvironmentAspect *envAsp
- = localRunConfiguration->extraAspect<ProjectExplorer::EnvironmentAspect>();
- env = envAsp->environment();
- break;
- }
+ ProjectExplorer::LocalApplicationRunConfiguration *localRunConfiguration
+ = qobject_cast<ProjectExplorer::LocalApplicationRunConfiguration *>(rc);
+ if (localRunConfiguration && localRunConfiguration->executable() == targetFile) {
+ hasDesktopTarget = true;
+ workDir = Utils::FileUtils::normalizePathName(
+ localRunConfiguration->workingDirectory());
+ ProjectExplorer::EnvironmentAspect *envAsp
+ = localRunConfiguration->extraAspect<ProjectExplorer::EnvironmentAspect>();
+ env = envAsp->environment();
+ break;
}
}
}