Commit f30abade authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Remove internal command bar

We use the frameworks one now.
parent 51773829
Pipeline #156319 passed with stage
in 4 minutes and 49 seconds
......@@ -93,9 +93,6 @@ target_sources(
katewaiter.cpp
tabmimedata.cpp
katecommandbar.cpp
commandmodel.cpp
kateoutputview.cpp
katestashmanager.cpp
......
......@@ -254,16 +254,6 @@ void KateMainWindow::setupImportantActions()
actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_O));
connect(a, &QAction::triggered, this, &KateMainWindow::slotQuickOpen);
a->setWhatsThis(i18n("Open a form to quick open documents."));
// kate command bar, only add this if we don't already have the generic one from KXMLGui
// https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/54
// FIXME: remove after we require Frameworks >= 5.83
if (!actionCollection()->action(QStringLiteral("open_kcommand_bar"))) {
a = actionCollection()->addAction(QStringLiteral("view_commandbar_open"));
a->setText(i18n("&Command Bar"));
actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_I));
connect(a, &QAction::triggered, this, &KateMainWindow::slotCommandBarOpen);
}
}
void KateMainWindow::setupMainWindow()
......@@ -1326,30 +1316,6 @@ void KateMainWindow::slotQuickOpen()
quickOpen.exec();
}
void KateMainWindow::slotCommandBarOpen()
{
QList<KActionCollection *> actionCollections;
auto clients = guiFactory()->clients();
int actionsCount = 0;
for (const KXMLGUIClient *c : clients) {
if (!c) {
continue;
}
if (auto collection = c->actionCollection()) {
actionCollections.append(collection);
actionsCount += collection->count();
}
}
KateCommandBar commandBar(this);
commandBar.setLastUsedCmdBarActions(m_lastUsedCmdBarActions);
commandBar.updateBar(actionCollections, actionsCount);
centralWidget()->setFocusProxy(&commandBar);
commandBar.exec();
m_lastUsedCmdBarActions = commandBar.lastUsedCmdBarActions();
}
QWidget *KateMainWindow::createToolView(KTextEditor::Plugin *plugin,
const QString &identifier,
KTextEditor::MainWindow::ToolViewPosition pos,
......
......@@ -168,8 +168,6 @@ public Q_SLOTS:
*/
void slotQuickOpen();
void slotCommandBarOpen();
/**
* Overwrite size hint for better default window sizes
* @return size hint
......
Supports Markdown
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