From d49b4aa1bc826bc2343f518af6712981228f1c8e Mon Sep 17 00:00:00 2001 From: Méven Car Date: Sat, 13 Jun 2026 14:28:08 +0000 Subject: remove version guards below the build minimums KIO_VERSION and KFILEMETADATA_VERSION checks up to 6.23 are always true given the Qt 6.4 / KF 6.23 minimum versions. --- src/dolphinmainwindow.cpp | 10 ---------- src/dolphinmainwindow.h | 2 -- src/dolphinnavigatorswidgetaction.cpp | 8 -------- src/kitemviews/private/kbaloorolesprovider.cpp | 2 -- src/views/dolphinview.cpp | 2 -- 5 files changed, 24 deletions(-) diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index d35575624..ed7215b5a 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -159,10 +159,8 @@ DolphinMainWindow::DolphinMainWindow() connect(undoManager, &KIO::FileUndoManager::undoAvailable, this, &DolphinMainWindow::slotUndoAvailable); connect(undoManager, &KIO::FileUndoManager::undoTextChanged, this, &DolphinMainWindow::slotUndoTextChanged); -#if KIO_VERSION >= QT_VERSION_CHECK(6, 17, 0) connect(undoManager, &KIO::FileUndoManager::redoAvailable, this, &DolphinMainWindow::slotRedoAvailable); connect(undoManager, &KIO::FileUndoManager::redoTextChanged, this, &DolphinMainWindow::slotRedoTextChanged); -#endif const bool firstRun = (GeneralSettings::version() < 200); if (firstRun) { @@ -877,7 +875,6 @@ void DolphinMainWindow::undo() KIO::FileUndoManager::self()->undo(); } -#if KIO_VERSION >= QT_VERSION_CHECK(6, 17, 0) void DolphinMainWindow::slotRedoAvailable(bool available) { QAction *redoAction = actionCollection()->action(KStandardAction::name(KStandardAction::Redo)); @@ -899,7 +896,6 @@ void DolphinMainWindow::redo() KIO::FileUndoManager::self()->uiInterface()->setParentWidget(this); KIO::FileUndoManager::self()->redo(); } -#endif void DolphinMainWindow::cut() { @@ -1568,9 +1564,7 @@ void DolphinMainWindow::updateHamburgerMenu() } menu->addAction(ac->action(QStringLiteral("basic_actions"))); menu->addAction(ac->action(KStandardAction::name(KStandardAction::Undo))); -#if KIO_VERSION >= QT_VERSION_CHECK(6, 17, 0) menu->addAction(ac->action(KStandardAction::name(KStandardAction::Redo))); -#endif if (!toolBar()->isVisible() || (!toolbarActions.contains(ac->action(QStringLiteral("toggle_search"))) && !toolbarActions.contains(ac->action(QStringLiteral("open_preferred_search_tool"))))) { @@ -1839,9 +1833,7 @@ void DolphinMainWindow::setupActions() // setup 'Edit' menu KStandardAction::undo(this, &DolphinMainWindow::undo, actionCollection()); -#if KIO_VERSION >= QT_VERSION_CHECK(6, 17, 0) KStandardAction::redo(this, &DolphinMainWindow::redo, actionCollection()); -#endif // i18n: This will be the last paragraph for the whatsthis for all three: // Cut, Copy and Paste @@ -2124,7 +2116,6 @@ void DolphinMainWindow::setupActions() "will ask for your confirmation beforehand.")); undoAction->setEnabled(false); // undo should be disabled by default -#if KIO_VERSION >= QT_VERSION_CHECK(6, 17, 0) auto redoAction = actionCollection()->action(KStandardAction::name(KStandardAction::Redo)); redoAction->setWhatsThis(xi18nc("@info:whatsthis", "This redoes " @@ -2134,7 +2125,6 @@ void DolphinMainWindow::setupActions() "or to the Trash.Any changes that cannot be undone " "will ask for your confirmation beforehand.")); redoAction->setEnabled(false); // redo should be disabled by default -#endif { QScopedPointer forwardAction(KStandardAction::forward(nullptr, nullptr, nullptr)); diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 884b9f7bd..f847ff509 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -322,7 +322,6 @@ private Q_SLOTS: /** Performs the current undo operation. */ void undo(); -#if KIO_VERSION >= QT_VERSION_CHECK(6, 17, 0) /** * Updates the state of the 'Redo' menu action dependent * on the parameter \a available. @@ -334,7 +333,6 @@ private Q_SLOTS: /** Performs the current redo operation. */ void redo(); -#endif /** * Copies all selected items to the clipboard and marks diff --git a/src/dolphinnavigatorswidgetaction.cpp b/src/dolphinnavigatorswidgetaction.cpp index dd7110a08..184530bc5 100644 --- a/src/dolphinnavigatorswidgetaction.cpp +++ b/src/dolphinnavigatorswidgetaction.cpp @@ -103,9 +103,7 @@ void DolphinNavigatorsWidgetAction::createSecondaryUrlNavigator() Q_ASSERT(m_splitter->count() == 1); m_splitter->addWidget(createNavigatorWidget(Secondary)); Q_ASSERT(m_splitter->count() == 2); -#if KIO_VERSION >= QT_VERSION_CHECK(6, 14, 0) secondaryUrlNavigator()->setBackgroundEnabled(primaryUrlNavigator()->isBackgroundEnabled()); -#endif updateText(); } @@ -149,18 +147,15 @@ void DolphinNavigatorsWidgetAction::setSecondaryNavigatorVisible(bool visible) // Fix an unlikely event of wrong trash button visibility. emptyTrashButton(Secondary)->setVisible(false); } -#if KIO_VERSION >= QT_VERSION_CHECK(6, 21, 0) primaryUrlNavigator()->setHighlightFocusIndicator(visible); if (secondaryUrlNavigator()) { secondaryUrlNavigator()->setHighlightFocusIndicator(visible); } -#endif updateText(); } void DolphinNavigatorsWidgetAction::setBackgroundEnabled(bool enabled) { -#if KIO_VERSION >= QT_VERSION_CHECK(6, 14, 0) // Breeze wants a plain rectangle to fill the frame, // but let other QStyles style the navbar how they please const bool isBreezeStyle = m_splitter->style()->name() == QStringLiteral("breeze"); @@ -170,9 +165,6 @@ void DolphinNavigatorsWidgetAction::setBackgroundEnabled(bool enabled) if (secondaryUrlNavigator()) { secondaryUrlNavigator()->setBackgroundEnabled(isBreezeStyle ? enabled : true); } -#else - Q_UNUSED(enabled); -#endif } QWidget *DolphinNavigatorsWidgetAction::createWidget(QWidget *parent) diff --git a/src/kitemviews/private/kbaloorolesprovider.cpp b/src/kitemviews/private/kbaloorolesprovider.cpp index 836eb95a4..9e396ede5 100644 --- a/src/kitemviews/private/kbaloorolesprovider.cpp +++ b/src/kitemviews/private/kbaloorolesprovider.cpp @@ -57,12 +57,10 @@ QString tagsFromValues(const QStringList &values) {Property::FrameRate, QByteArrayLiteral("frameRate")}, {Property::ReleaseYear, QByteArrayLiteral("releaseYear")}, {Property::TrackNumber, QByteArrayLiteral("track")}, -#if KFILEMETADATA_VERSION >= QT_VERSION_CHECK(6, 13, 0) {Property::AudioCodec, QByteArrayLiteral("audioCodec")}, {Property::VideoCodec, QByteArrayLiteral("videoCodec")}, {Property::PixelFormat, QByteArrayLiteral("pixelFormat")}, {Property::ColorSpace, QByteArrayLiteral("colorSpace")}, -#endif }; return map; } diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index cbeec0910..50c14ff77 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1515,13 +1515,11 @@ void DolphinView::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent *even void DolphinView::dropUrls(const QUrl &destUrl, QDropEvent *dropEvent, QWidget *dropWidget) { KIO::DropJobFlags dropjobFlags; -#if KIO_VERSION >= QT_VERSION_CHECK(6, 23, 0) if (qobject_cast(dropEvent->source())) { // this drop comes from Places View so we want to avoid // potentially destructive Move-like plugins actions dropjobFlags |= KIO::DropJobFlag::ExcludePluginsActions; } -#endif KIO::DropJob *job = DragAndDropHelper::dropUrls(destUrl, dropEvent, dropWidget, dropjobFlags); -- cgit v1.3.1