Beautifier: Remove dependency on CppEditor and DiffEditor

Beautifier plugin depends on CppEditor and DiffEditor at the project level,
but it does not require them to be built and used.

There is also unused includes to "cppeditor/cppeditorconstants.h".
So this commit remove the unused includes (which makes Beautifier not use
any of CppEditor code) and the dependencies on CppEditor and DiffEditor.

This allow the user to disable CppEditor plugin and use LSP instead with
the basic TextEditor.

Change-Id: If83f30e754746f1635934e5f952bf9254e83c42f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alexis Murzeau
2020-06-04 13:07:52 +02:00
parent 4613199548
commit df703b8a5a
7 changed files with 1 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
add_qtc_plugin(Beautifier add_qtc_plugin(Beautifier
DEPENDS Qt5::Xml DEPENDS Qt5::Xml
PLUGIN_DEPENDS Core CppEditor DiffEditor ProjectExplorer TextEditor PLUGIN_DEPENDS Core ProjectExplorer TextEditor
SOURCES SOURCES
abstractsettings.cpp abstractsettings.h abstractsettings.cpp abstractsettings.h
artisticstyle/artisticstyle.cpp artisticstyle/artisticstyle.h artisticstyle/artisticstyle.cpp artisticstyle/artisticstyle.h

View File

@@ -40,7 +40,6 @@
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h> #include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/idocument.h> #include <coreplugin/idocument.h>
#include <cppeditor/cppeditorconstants.h>
#include <projectexplorer/project.h> #include <projectexplorer/project.h>
#include <projectexplorer/projectnodes.h> #include <projectexplorer/projectnodes.h>
#include <projectexplorer/projecttree.h> #include <projectexplorer/projecttree.h>

View File

@@ -7,8 +7,6 @@ QtcPlugin {
Depends { name: "Qt.xml" } Depends { name: "Qt.xml" }
Depends { name: "Utils" } Depends { name: "Utils" }
Depends { name: "Core" } Depends { name: "Core" }
Depends { name: "CppEditor" }
Depends { name: "DiffEditor" }
Depends { name: "TextEditor" } Depends { name: "TextEditor" }
Depends { name: "ProjectExplorer" } Depends { name: "ProjectExplorer" }

View File

@@ -1,7 +1,5 @@
QTC_PLUGIN_NAME = Beautifier QTC_PLUGIN_NAME = Beautifier
QTC_LIB_DEPENDS += utils QTC_LIB_DEPENDS += utils
QTC_PLUGIN_DEPENDS += coreplugin \ QTC_PLUGIN_DEPENDS += coreplugin \
cppeditor \
diffeditor \
projectexplorer \ projectexplorer \
texteditor texteditor

View File

@@ -41,7 +41,6 @@
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h> #include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/messagemanager.h> #include <coreplugin/messagemanager.h>
#include <cppeditor/cppeditorconstants.h>
#include <projectexplorer/project.h> #include <projectexplorer/project.h>
#include <projectexplorer/projectnodes.h> #include <projectexplorer/projectnodes.h>
#include <projectexplorer/projecttree.h> #include <projectexplorer/projecttree.h>

View File

@@ -40,7 +40,6 @@
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h> #include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/idocument.h> #include <coreplugin/idocument.h>
#include <cppeditor/cppeditorconstants.h>
#include <texteditor/formattexteditor.h> #include <texteditor/formattexteditor.h>
#include <texteditor/texteditor.h> #include <texteditor/texteditor.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>

View File

@@ -40,7 +40,6 @@
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h> #include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/idocument.h> #include <coreplugin/idocument.h>
#include <cppeditor/cppeditorconstants.h>
#include <projectexplorer/project.h> #include <projectexplorer/project.h>
#include <projectexplorer/projectnodes.h> #include <projectexplorer/projectnodes.h>
#include <projectexplorer/projecttree.h> #include <projectexplorer/projecttree.h>