Commit 916c617e authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Replace KateColorSchemeChooser with using KColorSchemeManager directly

The main thing KateColorSchemeChooser adds is saving/loading from the config file, but KColorSchemeManager can do that directly since 5.89
parent d68b46d6
Pipeline #151441 passed with stage
in 2 minutes and 24 seconds
......@@ -33,6 +33,7 @@
#include <KActionCollection>
#include <KActionMenu>
#include <KApplicationTrader>
#include <KColorSchemeManager>
#include <KConfigGroup>
#include <KEditToolBar>
#include <KFileItem>
......@@ -53,6 +54,7 @@
#include <KToolBar>
#include <KWindowConfig>
#include <KXMLGUIFactory>
#include <kconfigwidgets_version.h>
#include <QApplication>
#include <QDir>
......@@ -230,7 +232,14 @@ void KateMainWindow::setupImportantActions()
});
// Load themes
#if KCONFIGWIDGETS_VERSION < QT_VERSION_CHECK(5, 89, 0)
actionCollection()->addAction(QStringLiteral("colorscheme_menu"), new KateColorSchemeChooser(actionCollection()));
#else
const QString colorScheme = KConfigGroup(KSharedConfig::openConfig(), "UiSettings").readEntry("ColorScheme", QString());
KColorSchemeManager *manager = new KColorSchemeManager(this);
actionCollection()->addAction(QStringLiteral("colorscheme_menu"), manager->createSchemeSelectionMenu(colorScheme, this));
#endif
QAction *a = actionCollection()->addAction(KStandardAction::Back, QStringLiteral("view_prev_tab"));
a->setText(i18n("&Previous Tab"));
......
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