Commit 10c4ca40 authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Port away from KXMLGui deprecated methods

parent 148bd1e2
......@@ -11,6 +11,7 @@
#include "kiten.h"
#include <kxmlgui_version.h>
#include <KActionCollection>
#include <KConfig>
#include <KConfigGui>
......@@ -22,6 +23,7 @@
#include <KStandardGuiItem>
#include <KStatusNotifierItem>
#include <KToggleAction>
#include <KXMLGUIFactory>
#include <QAction>
#include <QApplication>
......@@ -154,9 +156,13 @@ void Kiten::setupActions()
// (void) KStandardAction::print(this, SLOT(print()), actionCollection());
(void) KStandardAction::preferences( this, SLOT(slotConfigure()), actionCollection() );
//old style cast seems needed here, (const QObject*)
#if KXMLGUI_VERSION >= QT_VERSION_CHECK(5, 84, 0)
KStandardAction::keyBindings(guiFactory(), &KXMLGUIFactory::showConfigureShortcutsDialog, actionCollection());
#else
KStandardAction::keyBindings( (const QObject*)guiFactory()
, SLOT(configureShortcuts())
, actionCollection() );
#endif
/* Setup the Go-to-learn-mode actions */
/* TODO: put back when Dictionary Editor is reorganised */
......@@ -602,10 +608,13 @@ void Kiten::newToolBarConfig()
/** Opens the dialog for configuring the global accelerator keys. */
void Kiten::configureGlobalKeys()
{
//KDE4 TODO: done?
#if KXMLGUI_VERSION >= QT_VERSION_CHECK(5, 84, 0)
KShortcutsDialog::showDialog(actionCollection(), KShortcutsEditor::LetterShortcutsAllowed, this);
#else
KShortcutsDialog::configure( actionCollection()
, KShortcutsEditor::LetterShortcutsAllowed
, this );
#endif
}
/**
......
......@@ -12,12 +12,14 @@
#include "ui_radselectprefdialog.h"
#include <kxmlgui_version.h>
#include <KActionCollection>
#include <KConfig>
#include <KConfigDialog>
#include <KLocalizedString>
#include <KStandardAction>
#include <KStandardShortcut>
#include <KXMLGUIFactory>
#include <QDBusConnection>
#include <QDBusInterface>
......@@ -38,7 +40,13 @@ RadSelect::RadSelect()
KStandardAction::quit( this, SLOT(close()), actionCollection() );
KStandardAction::preferences( this, SLOT(optionsPreferences()), actionCollection() );
#if KXMLGUI_VERSION >= QT_VERSION_CHECK(5, 84, 0)
KStandardAction::keyBindings(guiFactory(), &KXMLGUIFactory::showConfigureShortcutsDialog, actionCollection());
#else
KStandardAction::keyBindings( (const QObject*)guiFactory(), SLOT(configureShortcuts()), actionCollection() );
#endif
statusBar()->show();
// Apply the create the main window and ask the mainwindow to
......
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