diff options
author | Christian Stenger <christian.stenger@digia.com> | 2014-10-21 13:10:37 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@theqtcompany.com> | 2014-12-04 13:52:15 +0100 |
commit | eba497d92103072dd7dd88ee70d714e369e8063f (patch) | |
tree | 585b6a3d044dd2edb9bd79cb8503a43bbf5ebdad /plugins/autotest/testtreemodel.cpp | |
parent | 44db2be195b38316e238eddad80b816ab96b6058 (diff) | |
download | qt-creator-eba497d92103072dd7dd88ee70d714e369e8063f.tar.gz |
Add filtering to test results
Diffstat (limited to 'plugins/autotest/testtreemodel.cpp')
-rw-r--r-- | plugins/autotest/testtreemodel.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/plugins/autotest/testtreemodel.cpp b/plugins/autotest/testtreemodel.cpp index 7cf8d2888d..fe9a091b55 100644 --- a/plugins/autotest/testtreemodel.cpp +++ b/plugins/autotest/testtreemodel.cpp @@ -20,9 +20,7 @@ #include "testtreeitem.h" #include "testtreemodel.h" -#include <texteditor/texteditor.h> - -#include <QIcon> +#include <cpptools/cppmodelmanager.h> #include <projectexplorer/buildtargetinfo.h> #include <projectexplorer/environmentaspect.h> @@ -32,7 +30,11 @@ #include <projectexplorer/session.h> #include <projectexplorer/target.h> -#include <cpptools/cppmodelmanager.h> +#include <texteditor/texteditor.h> + +#include <utils/fileutils.h> + +#include <QIcon> namespace Autotest { namespace Internal { @@ -276,16 +278,11 @@ static void addProjectInformation(TestConfiguration *config, const QString &file if (ProjectExplorer::LocalApplicationRunConfiguration *localRunConfiguration = qobject_cast<ProjectExplorer::LocalApplicationRunConfiguration *>(rc)) { if (localRunConfiguration->executable() == targetFile) { - workDir = localRunConfiguration->workingDirectory(); - QList<ProjectExplorer::IRunConfigurationAspect *> aspects - = localRunConfiguration->extraAspects(); - foreach (ProjectExplorer::IRunConfigurationAspect *aspect, aspects) { - if (ProjectExplorer::EnvironmentAspect *asp - = qobject_cast<ProjectExplorer::EnvironmentAspect *>(aspect)) { - env = asp->environment(); - break; - } - } + workDir = Utils::FileUtils::normalizePathName( + localRunConfiguration->workingDirectory()); + ProjectExplorer::EnvironmentAspect *envAsp + = localRunConfiguration->extraAspect<ProjectExplorer::EnvironmentAspect>(); + env = envAsp->environment(); break; } } |