forked from qt-creator/qt-creator
Core: Add a static IContext::attach() function
... to simplify the user code. Some, but not all, potential beneficiaries are adapted. Change-Id: Ia7d514a0114a4f99f8ee745523435f5b990bd095 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <coreplugin/coreplugintr.h>
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
||||
@@ -30,14 +29,11 @@
|
||||
namespace QmlDesigner {
|
||||
|
||||
BindingEditorWidget::BindingEditorWidget()
|
||||
: m_context(new Core::IContext(this))
|
||||
{
|
||||
Core::Context context(BINDINGEDITOR_CONTEXT_ID,
|
||||
ProjectExplorer::Constants::QMLJS_LANGUAGE_ID);
|
||||
|
||||
m_context->setWidget(this);
|
||||
m_context->setContext(context);
|
||||
Core::ICore::addContextObject(m_context);
|
||||
Core::IContext::attach(this, context);
|
||||
|
||||
Utils::TransientScrollAreaSupport::support(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user