Commit 2139dc89 authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Port away from deprecated KShortcutsDialog::configure() method

parent f354f2f9
Pipeline #66851 passed with stage
in 8 minutes and 59 seconds
...@@ -108,15 +108,16 @@ void MainWindow::configure() ...@@ -108,15 +108,16 @@ void MainWindow::configure()
void MainWindow::configureKeyBindings() void MainWindow::configureKeyBindings()
{ {
#if KXMLGUI_VERSION < QT_VERSION_CHECK(5, 84, 0) KShortcutsDialog *dlg = new KShortcutsDialog(KShortcutsEditor::AllActions, KShortcutsEditor::LetterShortcutsAllowed, this);
if (KShortcutsDialog::configure(actionCollection(), KShortcutsEditor::LetterShortcutsAllowed, this)) { dlg->setAttribute(Qt::WA_DeleteOnClose);
connect(dlg, &KShortcutsDialog::saved, this, [this]() {
mMainWidget->updateQuickSearchText(); mMainWidget->updateQuickSearchText();
} });
KShortcutsDialog::showDialog(actionCollection(), KShortcutsEditor::LetterShortcutsAllowed, /*isModal*/ true, this); dlg->configure(true /* save settings on accept*/);
// We can't detect if we accepted or not => update quick search all the time. Perhaps in the future we will have a signal.
} }
void MainWindow::configureToolbars() void MainWindow::configureToolbars()
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