LanguageClient: Use new construction pattern for project panel

Change-Id: If3fa41d33a5d9b39d2596d619251bff3cfdf4b5d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2023-11-15 15:07:42 +01:00
parent e7b140fbfb
commit 2b39aa22fc
3 changed files with 52 additions and 39 deletions

View File

@@ -11,8 +11,6 @@
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <projectexplorer/projectpanelfactory.h>
#include <QAction>
#include <QMenu>
@@ -40,12 +38,7 @@ void LanguageClientPlugin::initialize()
{
using namespace Core;
auto panelFactory = new ProjectExplorer::ProjectPanelFactory;
panelFactory->setPriority(35);
panelFactory->setDisplayName(Tr::tr("Language Server"));
panelFactory->setCreateWidgetFunction(
[](ProjectExplorer::Project *project) { return new ProjectSettingsWidget(project); });
ProjectExplorer::ProjectPanelFactory::registerFactory(panelFactory);
setupLanguageClientProjectPanel();
LanguageClientManager::init();
LanguageClientSettings::registerClientType({Constants::LANGUAGECLIENT_STDIO_SETTINGS_ID,