Commit ae2da9a3 authored by Eike Ziller's avatar Eike Ziller
Browse files

EditorManager: Add window actions (fullscreen etc) to editor windows



Change-Id: I478db8c994cc3126d8d518e3d574e9adfa600ad1
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent fe5b3a39
......@@ -686,9 +686,18 @@ void EditorManager::splitNewWindow(Internal::EditorView *view)
else
newEditor = editor; // move to the new view
splitter = new SplitterOrView;
splitter->setAttribute(Qt::WA_DeleteOnClose);
splitter->setAttribute(Qt::WA_QuitOnClose, false); // don't prevent Qt Creator from closing
splitter->resize(QSize(800, 600));
QWidget *win = new QWidget;
QVBoxLayout *layout = new QVBoxLayout;
layout->setMargin(0);
layout->setSpacing(0);
win->setLayout(layout);
layout->addWidget(splitter);
win->setFocusProxy(splitter);
win->setAttribute(Qt::WA_DeleteOnClose);
win->setAttribute(Qt::WA_QuitOnClose, false); // don't prevent Qt Creator from closing
win->resize(QSize(800, 600));
static int windowId = 0;
ICore::registerWindow(win, Context(Id("EditorManager.ExternalWindow.").withSuffix(++windowId)));
IContext *context = new IContext;
context->setContext(Context(Constants::C_EDITORMANAGER));
context->setWidget(splitter);
......@@ -696,8 +705,8 @@ void EditorManager::splitNewWindow(Internal::EditorView *view)
d->m_root.append(splitter);
d->m_rootContext.append(context);
connect(splitter, SIGNAL(destroyed(QObject*)), m_instance, SLOT(rootDestroyed(QObject*)));
splitter->show();
ICore::raiseWindow(splitter);
win->show();
ICore::raiseWindow(win);
if (newEditor)
m_instance->activateEditor(splitter->view(), newEditor, IgnoreNavigationHistory);
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment