forked from qt-creator/qt-creator
EditorManager: Avoid warnings about already registered actions
When opening new editor windows, we want the _window_ to have the EditorManager context as well as the individual window context, but the window _actions_ (close, etc) may only be registered for the individual window context. Add the corresponding option to ICore::registerWindow et al. Change-Id: I67d0a6b386603e0047a77dfb357c207e7ffe99e6 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -1011,14 +1011,15 @@ void ICore::removeAdditionalContext(const Context &context)
|
||||
Registers a \a window with the specified \a context. Registered windows are
|
||||
shown in the \uicontrol Window menu and get registered for the various
|
||||
window related actions, like the minimize, zoom, fullscreen and close
|
||||
actions.
|
||||
actions. The context for the actions is \a context by default, but can be
|
||||
overridden with \a actionContext.
|
||||
|
||||
Whenever the application focus is in \a window, its \a context is made
|
||||
active.
|
||||
*/
|
||||
void ICore::registerWindow(QWidget *window, const Context &context)
|
||||
void ICore::registerWindow(QWidget *window, const Context &context, const Context &actionContext)
|
||||
{
|
||||
new WindowSupport(window, context); // deletes itself when widget is destroyed
|
||||
new WindowSupport(window, context, actionContext); // deletes itself when widget is destroyed
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user