[utilities/konsole] src: Drop code variants for no longer supported KF & Qt versions
Friedrich W. H. Kossebau <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit dcc3762077499a3ae03846bbfda9f570f5f2680c by Friedrich W. H. Kossebau.
Committed on 18/08/2026 at 08:57.
Pushed by kossebau into branch 'master'.
Drop code variants for no longer supported KF & Qt versions
M +0 -4 src/MainWindow.cpp
M +0 -4 src/filterHotSpots/FileFilter.cpp
M +1 -17 src/main.cpp
https://invent.kde.org/utilities/konsole/-/commit/dcc3762077499a3ae03846bbfda9f570f5f2680c
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 1e569d57d..de65580fe 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -476,11 +476,7 @@ void MainWindow::setupActions()
});
// Set up themes
-#if KCOLORSCHEME_VERSION < QT_VERSION_CHECK(6, 6, 0)
- auto *manager = new KColorSchemeManager(actionCollection());
-#else
auto *manager = KColorSchemeManager::instance();
-#endif
manager->setAutosaveChanges(true);
KActionMenu *selectionMenu = KColorSchemeMenu::createMenu(manager, this);
auto winColorSchemeMenu = new QAction(this);
diff --git a/src/filterHotSpots/FileFilter.cpp b/src/filterHotSpots/FileFilter.cpp
index 5539ee6eb..2e1411492 100644
--- a/src/filterHotSpots/FileFilter.cpp
+++ b/src/filterHotSpots/FileFilter.cpp
@@ -93,11 +93,7 @@ QSharedPointer<HotSpot> FileFilter::newHotSpot(int startLine, int startColumn, i
// '.' and '..' could be valid hotspots, but '..................' most likely isn't
static const QRegularExpression allDotRe{QRegularExpression::anchoredPattern(QStringLiteral("\\.{3}"))};
-#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
if (allDotRe.matchView(filename).hasMatch()) {
-#else
- if (allDotRe.match(filename).hasMatch()) {
-#endif
return nullptr;
}
diff --git a/src/main.cpp b/src/main.cpp
index a1eed794c..f01ab894c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -29,6 +29,7 @@
#include <KCrash>
#include <KIconTheme>
#include <KLocalizedString>
+#include <KStyleManager>
#include <KWindowSystem>
#if HAVE_DBUS
@@ -37,11 +38,6 @@
#include <QDBusMessage>
#endif
-#define HAVE_STYLE_MANAGER __has_include(<KStyleManager>)
-#if HAVE_STYLE_MANAGER
-#include <KStyleManager>
-#endif
-
using Konsole::Application;
#ifdef PROFILE_STARTUP
@@ -145,9 +141,7 @@ int main(int argc, char *argv[])
/**
* trigger initialisation of proper icon theme
*/
-#if KICONTHEMES_VERSION >= QT_VERSION_CHECK(6, 3, 0)
KIconTheme::initTheme();
-#endif
#if HAVE_DBUS
// Check if any of the arguments makes it impossible to reuse an existing process.
@@ -161,20 +155,10 @@ int main(int argc, char *argv[])
auto app = new QApplication(argc, argv);
-#if HAVE_STYLE_MANAGER
/**
* trigger initialisation of proper application style
*/
KStyleManager::initStyle();
-#else
- /**
- * For Windows and macOS: use Breeze if available
- * Of all tested styles that works the best for us
- */
-#if defined(Q_OS_MACOS) || defined(Q_OS_WIN)
- QApplication::setStyle(QStringLiteral("breeze"));
-#endif
-#endif
// fix the alt key, ensure we keep the current selected style as base
app->setStyle(new MenuStyle(app->style()->name()));