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()
void MainWindow::configureKeyBindings()
{
#if KXMLGUI_VERSION < QT_VERSION_CHECK(5, 84, 0)
if (KShortcutsDialog::configure(actionCollection(), KShortcutsEditor::LetterShortcutsAllowed, this)) {
mMainWidget->updateQuickSearchText();
}
#else
KShortcutsDialog::showDialog(actionCollection(), KShortcutsEditor::LetterShortcutsAllowed, /*isModal*/ true, this);
// We can't detect if we accepted or not => update quick search all the time. Perhaps in the future we will have a signal.
KShortcutsDialog *dlg = new KShortcutsDialog(KShortcutsEditor::AllActions, KShortcutsEditor::LetterShortcutsAllowed, this);
dlg->setAttribute(Qt::WA_DeleteOnClose);
dlg->setModal(false);
dlg->addCollection(actionCollection());
connect(dlg, &KShortcutsDialog::saved, this, [this]() {
mMainWidget->updateQuickSearchText();
#endif
});
dlg->configure(true /* save settings on accept*/);
}
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