aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpptools/cpptoolstestcase.cpp
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2020-06-16 13:11:10 +0200
committerChristian Stenger <christian.stenger@qt.io>2020-06-17 04:13:30 +0000
commit6e798401a0558ad039fff62b80e97660053b60b8 (patch)
treef894882d7b82428a3d452c7daf80f7f9958a0a18 /src/plugins/cpptools/cpptoolstestcase.cpp
parentc6db1c29d6274996b5c2f76291e7ff47f47d3405 (diff)
Fix plugin unit tests when using projects
The ClangTools and the AutoTest plugins use an internal mechanism to load and configure a project when performing their integrated unit tests. Both assumed to have exactly one kit present for these tests. Make it possible to have more kits present when starting with existing settings or if more kits get automatically generated when starting with clean settings. Change-Id: If2bc66320c4854f1d34a19d17107e8f0b7d64d39 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cpptoolstestcase.cpp')
-rw-r--r--src/plugins/cpptools/cpptoolstestcase.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/cpptools/cpptoolstestcase.cpp b/src/plugins/cpptools/cpptoolstestcase.cpp
index 23dc69e681b..817c78993c1 100644
--- a/src/plugins/cpptools/cpptoolstestcase.cpp
+++ b/src/plugins/cpptools/cpptoolstestcase.cpp
@@ -277,7 +277,8 @@ ProjectOpenerAndCloser::~ProjectOpenerAndCloser()
QCoreApplication::processEvents();
}
-ProjectInfo ProjectOpenerAndCloser::open(const QString &projectFile, bool configureAsExampleProject)
+ProjectInfo ProjectOpenerAndCloser::open(const QString &projectFile, bool configureAsExampleProject,
+ Kit *kit)
{
ProjectExplorerPlugin::OpenProjectResult result = ProjectExplorerPlugin::openProject(projectFile);
if (!result) {
@@ -287,7 +288,7 @@ ProjectInfo ProjectOpenerAndCloser::open(const QString &projectFile, bool config
Project *project = result.project();
if (configureAsExampleProject)
- project->configureAsExampleProject();
+ project->configureAsExampleProject(kit);
if (TestCase::waitUntilProjectIsFullyOpened(project)) {
m_openProjects.append(project);