diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2021-08-30 10:58:08 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2021-09-01 14:53:58 +0000 |
commit | 284817fae6514701902ccdb834c2faa46462f2e8 (patch) | |
tree | 44a8c7d9813dc110b61c4639036366c7696bd7e9 /src/plugins/cpaster | |
parent | 3e1fa0f170d523971d2c3c12da15a6e291f56511 (diff) | |
download | qt-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/cpaster')
-rw-r--r-- | src/plugins/cpaster/frontend/frontend.qbs | 2 | ||||
-rw-r--r-- | src/plugins/cpaster/protocol.cpp | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/cpaster/frontend/frontend.qbs b/src/plugins/cpaster/frontend/frontend.qbs index 94153e93e3..03bdf9db34 100644 --- a/src/plugins/cpaster/frontend/frontend.qbs +++ b/src/plugins/cpaster/frontend/frontend.qbs @@ -8,7 +8,7 @@ QtcTool { submodules: ["gui", "network"] } Depends { name: "Core" } - Depends { name: "CppTools" } + Depends { name: "CppEditor" } Group { name: "Frontend Sources" diff --git a/src/plugins/cpaster/protocol.cpp b/src/plugins/cpaster/protocol.cpp index b2ffc75b46..e9eb198429 100644 --- a/src/plugins/cpaster/protocol.cpp +++ b/src/plugins/cpaster/protocol.cpp @@ -27,7 +27,7 @@ #include <utils/networkaccessmanager.h> -#include <cpptools/cpptoolsconstants.h> +#include <cppeditor/cppeditorconstants.h> #include <designer/designerconstants.h> #include <glsleditor/glsleditorconstants.h> #include <qmljstools/qmljstoolsconstants.h> @@ -79,18 +79,18 @@ void Protocol::list() Protocol::ContentType Protocol::contentType(const QString &mt) { - if (mt == QLatin1String(CppTools::Constants::C_SOURCE_MIMETYPE) - || mt == QLatin1String(CppTools::Constants::C_HEADER_MIMETYPE) + if (mt == QLatin1String(CppEditor::Constants::C_SOURCE_MIMETYPE) + || mt == QLatin1String(CppEditor::Constants::C_HEADER_MIMETYPE) || mt == QLatin1String(GlslEditor::Constants::GLSL_MIMETYPE) || mt == QLatin1String(GlslEditor::Constants::GLSL_MIMETYPE_VERT) || mt == QLatin1String(GlslEditor::Constants::GLSL_MIMETYPE_FRAG) || mt == QLatin1String(GlslEditor::Constants::GLSL_MIMETYPE_VERT_ES) || mt == QLatin1String(GlslEditor::Constants::GLSL_MIMETYPE_FRAG_ES)) return C; - if (mt == QLatin1String(CppTools::Constants::CPP_SOURCE_MIMETYPE) - || mt == QLatin1String(CppTools::Constants::CPP_HEADER_MIMETYPE) - || mt == QLatin1String(CppTools::Constants::OBJECTIVE_C_SOURCE_MIMETYPE) - || mt == QLatin1String(CppTools::Constants::OBJECTIVE_CPP_SOURCE_MIMETYPE)) + if (mt == QLatin1String(CppEditor::Constants::CPP_SOURCE_MIMETYPE) + || mt == QLatin1String(CppEditor::Constants::CPP_HEADER_MIMETYPE) + || mt == QLatin1String(CppEditor::Constants::OBJECTIVE_C_SOURCE_MIMETYPE) + || mt == QLatin1String(CppEditor::Constants::OBJECTIVE_CPP_SOURCE_MIMETYPE)) return Cpp; if (mt == QLatin1String(QmlJSTools::Constants::QML_MIMETYPE) || mt == QLatin1String(QmlJSTools::Constants::QMLUI_MIMETYPE) |