summaryrefslogtreecommitdiff
path: root/src/plugins/autotest/boost
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2021-08-30 10:58:08 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2021-09-01 14:53:58 +0000
commit284817fae6514701902ccdb834c2faa46462f2e8 (patch)
tree44a8c7d9813dc110b61c4639036366c7696bd7e9 /src/plugins/autotest/boost
parent3e1fa0f170d523971d2c3c12da15a6e291f56511 (diff)
downloadqt-creator-284817fae6514701902ccdb834c2faa46462f2e8.tar.gz
Merge CppTools into CppEditor
There was no proper separation of responsibilities between these plugins. In particular, CppTools had lots of editor-related functionality, so it's not clear why it was separated out in the first place. In fact, for a lot of code, it seemed quite arbitrary where it was put (just one example: switchHeaderSource() was in CppTools, wheras switchDeclarationDefinition() was in CppEditor). Merging the plugins will enable us to get rid of various convoluted pseudo-abstractions that were only introduced to keep up the artificial separation. Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/autotest/boost')
-rw-r--r--src/plugins/autotest/boost/boosttestparser.cpp8
-rw-r--r--src/plugins/autotest/boost/boosttesttreeitem.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/autotest/boost/boosttestparser.cpp b/src/plugins/autotest/boost/boosttestparser.cpp
index a98787a195..45c5ecbe94 100644
--- a/src/plugins/autotest/boost/boosttestparser.cpp
+++ b/src/plugins/autotest/boost/boosttestparser.cpp
@@ -28,7 +28,7 @@
#include "boosttestframework.h"
#include "boosttesttreeitem.h"
-#include <cpptools/cppmodelmanager.h>
+#include <cppeditor/cppmodelmanager.h>
#include <QMap>
#include <QRegularExpression>
@@ -125,12 +125,12 @@ bool BoostTestParser::processDocument(QFutureInterface<TestParseResultPtr> &futu
if (doc.isNull() || !includesBoostTest(doc, m_cppSnapshot) || !hasBoostTestMacros(doc))
return false;
- const CppTools::CppModelManager *modelManager = CppTools::CppModelManager::instance();
- const QList<CppTools::ProjectPart::ConstPtr> projectParts
+ const CppEditor::CppModelManager *modelManager = CppEditor::CppModelManager::instance();
+ const QList<CppEditor::ProjectPart::ConstPtr> projectParts
= modelManager->projectPart(fileName);
if (projectParts.isEmpty()) // happens if shutting down while parsing
return false;
- const CppTools::ProjectPart::ConstPtr projectPart = projectParts.first();
+ const CppEditor::ProjectPart::ConstPtr projectPart = projectParts.first();
const auto projectFile = Utils::FilePath::fromString(projectPart->projectFile);
const QByteArray &fileContent = getFileContent(fileName);
diff --git a/src/plugins/autotest/boost/boosttesttreeitem.cpp b/src/plugins/autotest/boost/boosttesttreeitem.cpp
index 8aeb35a7ee..78878f8b3f 100644
--- a/src/plugins/autotest/boost/boosttesttreeitem.cpp
+++ b/src/plugins/autotest/boost/boosttesttreeitem.cpp
@@ -30,7 +30,7 @@
#include "boosttestparser.h"
#include "../testframeworkmanager.h"
-#include <cpptools/cppmodelmanager.h>
+#include <cppeditor/cppmodelmanager.h>
#include <projectexplorer/session.h>
#include <utils/qtcassert.h>
@@ -195,7 +195,7 @@ QList<ITestConfiguration *> BoostTestTreeItem::getAllTestConfigurations() const
++funcChildren;
});
if (funcChildren) {
- const auto cppMM = CppTools::CppModelManager::instance();
+ const auto cppMM = CppEditor::CppModelManager::instance();
QTC_ASSERT(cppMM, return);
testsPerProjectfile[item->proFile()].testCases += funcChildren;
testsPerProjectfile[item->proFile()].internalTargets.unite(cppMM->internalTargets(item->filePath()));
@@ -236,7 +236,7 @@ QList<ITestConfiguration *> BoostTestTreeItem::getTestConfigurations(
if (!item->enabled()) // ignore child tests known to be disabled when using run selected
return;
if (predicate(item)) {
- const auto cppMM = CppTools::CppModelManager::instance();
+ const auto cppMM = CppEditor::CppModelManager::instance();
QTC_ASSERT(cppMM, return);
QString tcName = item->name();
if (item->state().testFlag(BoostTestTreeItem::Templated))
@@ -282,7 +282,7 @@ ITestConfiguration *BoostTestTreeItem::testConfiguration() const
{
ProjectExplorer::Project *project = ProjectExplorer::SessionManager::startupProject();
QTC_ASSERT(project, return nullptr);
- const auto cppMM = CppTools::CppModelManager::instance();
+ const auto cppMM = CppEditor::CppModelManager::instance();
QTC_ASSERT(cppMM, return nullptr);
const Type itemType = type();