From 6e798401a0558ad039fff62b80e97660053b60b8 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 16 Jun 2020 13:11:10 +0200 Subject: 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 --- src/plugins/cpptools/cpptoolstestcase.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/cpptools/cpptoolstestcase.cpp') diff --git a/src/plugins/cpptools/cpptoolstestcase.cpp b/src/plugins/cpptools/cpptoolstestcase.cpp index 23dc69e681..817c78993c 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); -- cgit v1.2.1