Commit cce8a909 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

create KateCommandBar on demand

parent d60a4b65
......@@ -268,8 +268,6 @@ void KateMainWindow::setupMainWindow()
centralWidget()->layout()->addWidget(m_mainStackedWidget);
(static_cast<QBoxLayout *>(centralWidget()->layout()))->setStretchFactor(m_mainStackedWidget, 100);
m_commandBar = new KateCommandBar(this);
m_viewManager = new KateViewManager(m_mainStackedWidget, this);
m_mainStackedWidget->addWidget(m_viewManager);
......@@ -1234,8 +1232,10 @@ void KateMainWindow::slotCommandBarOpen()
}
}
m_commandBar->updateBar(actionCollections, actionsCount);
centralWidget()->setFocusProxy(m_commandBar);
KateCommandBar commandBar(this);
commandBar.updateBar(actionCollections, actionsCount);
centralWidget()->setFocusProxy(&commandBar);
commandBar.exec();
}
QWidget *KateMainWindow::createToolView(KTextEditor::Plugin *plugin,
......
......@@ -41,7 +41,6 @@ class KRecentFilesAction;
class KateViewManager;
class KateMwModOnHdDialog;
class KateCommandBar;
// Helper layout class to always provide minimum size
class KateContainerStackedLayout : public QStackedLayout
......@@ -540,11 +539,6 @@ private:
*/
QStackedWidget *m_mainStackedWidget = nullptr;
/**
* quick command bar to quickly trigger any action
*/
KateCommandBar *m_commandBar = nullptr;
/**
* keeps track of views
*/
......
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