#ifdef HAVE_KF5
# include <KConfigWidgets/KStandardAction>
# include <KXmlGui/KHelpMenu>
+# include <KXmlGui/KShortcutsDialog>
#endif
#ifdef Q_WS_X11
#include "settingspages/notificationssettingspage.h"
#include "settingspages/topicwidgetsettingspage.h"
-#ifndef HAVE_KDE4
+#ifndef HAVE_KDE
# include "settingspages/shortcutssettingspage.h"
#endif
void MainWin::showShortcutsDlg()
{
-#ifdef HAVE_KDE4
+#ifdef HAVE_KDE
KShortcutsDialog dlg(KShortcutsEditor::AllActions, KShortcutsEditor::LetterShortcutsDisallowed, this);
foreach(KActionCollection *coll, QtUi::actionCollections())
dlg.addCollection(coll, coll->property("Category").toString());
- dlg.exec();
+ dlg.configure(true);
#else
SettingsPageDlg dlg(new ShortcutsSettingsPage(QtUi::actionCollections(), this), this);
dlg.exec();
* This is a subset of the API of KDE's KActionCollection. *
***************************************************************************/
-#ifndef ACTIONCOLLECTION_H_
-#define ACTIONCOLLECTION_H_
+#pragma once
-#ifndef HAVE_KDE4
+#ifndef HAVE_KDE
#include <QDebug>
#include <QList>
int ActionCollection::count() const { return actions().count(); }
bool ActionCollection::isEmpty() const { return actions().count(); }
-#else /* HAVE_KDE4 */
-
-#include <KActionCollection>
+#else /* HAVE_KDE */
+# ifdef HAVE_KDE4
+# include <KActionCollection>
+# else
+# include <KXmlGui/KActionCollection>
+# endif
class ActionCollection : public KActionCollection
{
explicit ActionCollection(QObject *parent) : KActionCollection(parent) {};
};
-
-#endif
-
-#endif
+#endif /* HAVE_KDE */