Commit a7399383 authored by Jan Paul Batrina's avatar Jan Paul Batrina Committed by Christoph Cullmann
Browse files

KWrite: use KStandardAction::preferences

This makes the text consistent with other applications,
with the accompanying translations and standard shortcut.

The "editor_options" does not exist anymore, so we don't
need to delete that action anymore.

BUG: 441505
parent 1e4b8768
Pipeline #77185 passed with stage
in 6 minutes and 11 seconds
......@@ -476,7 +476,6 @@ KTextEditor::View *KateViewManager::createView(KTextEditor::Document *doc, KateV
// disable settings dialog action
delete view->actionCollection()->action(QStringLiteral("set_confdlg"));
delete view->actionCollection()->action(QStringLiteral("editor_options"));
// clang-format off
connect(view, SIGNAL(dropEventPass(QDropEvent*)), mainWindow(), SLOT(slotDropEvent(QDropEvent*)));
......@@ -151,6 +151,15 @@ void KWrite::setupActions()
actionCollection()->addAction(KStandardAction::Quit, this, SLOT(close()))->setWhatsThis(i18n("Close the current document view"));
// replace settings dialog action from KTextEditor with a standard action
delete m_view->actionCollection()->action(QStringLiteral("set_confdlg"));
// slotConfigDialog is a private slot in KTextEditor::ViewPrivate, so we have to use KTextEditor::Editor::configDialog
auto configDialogFunc = [this]() {
QAction *settingsConfigure = KStandardAction::preferences(KTextEditor::Editor::instance(), configDialogFunc, actionCollection());
settingsConfigure->setWhatsThis(i18n("Configure various aspects of this application and the editing component."));
// setup Settings menu
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