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:
@@ -34,10 +34,7 @@ WindowSupport::WindowSupport(QWidget *window, const Context &context, const Cont
|
||||
{
|
||||
m_window->installEventFilter(this);
|
||||
|
||||
m_contextObject = new IContext(this);
|
||||
m_contextObject->setWidget(window);
|
||||
m_contextObject->setContext(context);
|
||||
ICore::addContextObject(m_contextObject);
|
||||
IContext::attach(window, context);
|
||||
const Context ac = actionContext.isEmpty() ? context : actionContext;
|
||||
|
||||
if (useMacShortcuts) {
|
||||
|
||||
Reference in New Issue
Block a user