QmlDesigner: Remove ineffective code

IContext::context() returns a copy by value. Adding to that does not
change IContext's internal m_context, i.e. these lines are effectively
no-ops.

Assuming that it currently "works", the setup probably happens
elsewhere, and this code is superfluous.

Change-Id: Idf33c769eed98bfa34a6def7649c8280f1551716
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2024-07-03 17:27:53 +02:00
parent e99eceab5c
commit 756e4dbb24

View File

@@ -391,14 +391,6 @@ void QmlDesignerPlugin::integrateIntoQtCreator(QWidget *modeWidget)
Core::Context qmlDesignerMaterialBrowserContext(Constants::C_QMLMATERIALBROWSER);
Core::Context qmlDesignerAssetsLibraryContext(Constants::C_QMLASSETSLIBRARY);
context->context().add(qmlDesignerMainContext);
context->context().add(qmlDesignerFormEditorContext);
context->context().add(qmlDesignerEditor3dContext);
context->context().add(qmlDesignerNavigatorContext);
context->context().add(qmlDesignerMaterialBrowserContext);
context->context().add(qmlDesignerAssetsLibraryContext);
context->context().add(ProjectExplorer::Constants::QMLJS_LANGUAGE_ID);
d->shortCutManager.registerActions(qmlDesignerMainContext, qmlDesignerFormEditorContext,
qmlDesignerEditor3dContext, qmlDesignerNavigatorContext);