┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml3
-rw-r--r--.kde-ci.yml55
-rw-r--r--CMakeLists.txt51
-rw-r--r--DolphinVcsConfig.cmake.in2
-rw-r--r--doc/CMakeLists.txt2
-rw-r--r--src/CMakeLists.txt58
-rw-r--r--src/dolphincontextmenu.cpp3
-rw-r--r--src/dolphinmainwindow.cpp4
-rw-r--r--src/dolphinnavigatorswidgetaction.cpp4
-rw-r--r--src/dolphinnewfilemenu.cpp7
-rw-r--r--src/dolphinpart.cpp20
-rw-r--r--src/dolphinpart_ext.cpp6
-rw-r--r--src/dolphinpart_ext.h10
-rw-r--r--src/dolphintabbar.cpp6
-rw-r--r--src/kitemviews/kfileitemmodelrolesupdater.cpp2
-rw-r--r--src/panels/places/placespanel.cpp2
-rw-r--r--src/settings/contextmenu/contextmenusettingspage.cpp22
-rw-r--r--src/settings/contextmenu/servicemenuinstaller/CMakeLists.txt4
-rw-r--r--src/settings/general/configurepreviewplugindialog.cpp71
-rw-r--r--src/settings/general/configurepreviewplugindialog.h36
-rw-r--r--src/settings/general/previewssettingspage.cpp25
-rw-r--r--src/settings/general/previewssettingspage.h3
-rw-r--r--src/settings/kcm/kcmdolphingeneral.cpp9
-rw-r--r--src/settings/kcm/kcmdolphingeneral.h2
-rw-r--r--src/settings/kcm/kcmdolphinnavigation.cpp9
-rw-r--r--src/settings/kcm/kcmdolphinnavigation.h2
-rw-r--r--src/settings/kcm/kcmdolphinviewmodes.cpp10
-rw-r--r--src/settings/kcm/kcmdolphinviewmodes.h2
-rw-r--r--src/settings/serviceitemdelegate.cpp2
-rw-r--r--src/settings/serviceitemdelegate.h2
-rw-r--r--src/settings/trash/trashsettingspage.cpp16
-rw-r--r--src/settings/trash/trashsettingspage.h4
-rw-r--r--src/tests/CMakeLists.txt4
-rw-r--r--src/views/dolphinviewactionhandler.cpp2
34 files changed, 160 insertions, 300 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d94767a64..6c54587fa 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,4 @@
include:
- - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml
- - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml
- - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/windows.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux-qt6.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd-qt6.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/windows-qt6.yml
diff --git a/.kde-ci.yml b/.kde-ci.yml
index a3ecb8099..94853b5f5 100644
--- a/.kde-ci.yml
+++ b/.kde-ci.yml
@@ -2,36 +2,37 @@
# SPDX-License-Identifier: CC0-1.0
Dependencies:
-- 'on': ['@all']
+- 'on': ['Linux/Qt6', 'FreeBSD/Qt6', 'Windows/Qt6', 'macOS/Qt6']
'require':
- 'frameworks/extra-cmake-modules': '@stable'
- 'frameworks/kcoreaddons': '@stable'
- 'frameworks/kcmutils': '@stable'
- 'frameworks/knewstuff': '@stable'
- 'frameworks/ki18n': '@stable'
- 'frameworks/kdbusaddons': '@stable'
- 'frameworks/kbookmarks': '@stable'
- 'frameworks/kconfig': '@stable'
- 'frameworks/kio': '@stable'
- 'frameworks/kparts': '@stable'
- 'frameworks/solid': '@stable'
- 'frameworks/kiconthemes': '@stable'
- 'frameworks/kcompletion': '@stable'
- 'frameworks/ktextwidgets': '@stable'
- 'frameworks/knotifications': '@stable'
- 'frameworks/kcrash': '@stable'
- 'frameworks/kwindowsystem': '@stable'
- 'frameworks/kactivities': '@stable'
- 'frameworks/kdoctools': '@stable'
- 'frameworks/kwindowsystem': '@stable'
- 'frameworks/kfilemetadata': '@stable'
- 'frameworks/kcodecs': '@stable'
- 'libraries/kuserfeedback': '@stable'
- 'libraries/phonon': '@stable'
+ 'frameworks/extra-cmake-modules': '@latest-kf6'
+ 'frameworks/kcoreaddons': '@latest-kf6'
+ 'frameworks/kcmutils': '@latest-kf6'
+ 'frameworks/knewstuff': '@latest-kf6'
+ 'frameworks/ki18n': '@latest-kf6'
+ 'frameworks/kdbusaddons': '@latest-kf6'
+ 'frameworks/kbookmarks': '@latest-kf6'
+ 'frameworks/kconfig': '@latest-kf6'
+ 'frameworks/kio': '@latest-kf6'
+ 'frameworks/kparts': '@latest-kf6'
+ 'frameworks/solid': '@latest-kf6'
+ 'frameworks/kiconthemes': '@latest-kf6'
+ 'frameworks/kcompletion': '@latest-kf6'
+ 'frameworks/ktextwidgets': '@latest-kf6'
+ 'frameworks/knotifications': '@latest-kf6'
+ 'frameworks/kcrash': '@latest-kf6'
+ 'frameworks/kwindowsystem': '@latest-kf6'
+ 'frameworks/kactivities': '@latest-kf6'
+ 'frameworks/kdoctools': '@latest-kf6'
+ 'frameworks/kwindowsystem': '@latest-kf6'
+ 'frameworks/kfilemetadata': '@latest-kf6'
+ 'frameworks/kcodecs': '@latest-kf6'
+ 'libraries/kuserfeedback': '@latest-kf6'
+ 'libraries/phonon': '@latest-kf6'
+ 'libraries/kmoretools': '@latest-kf6'
-- 'on': ['Linux', 'FreeBSD']
+- 'on': ['Linux/Qt6', 'FreeBSD/Qt6']
'require':
- 'frameworks/baloo': '@stable'
+ 'frameworks/baloo': '@latest-kf6'
'libraries/baloo-widgets': '@same'
'third-party/packagekit-qt': '@latest'
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3fa91d8a2..f43832ad6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,11 +7,11 @@ set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
project(Dolphin VERSION ${RELEASE_SERVICE_VERSION})
-set(QT_MIN_VERSION "5.15.2")
-set(KF5_MIN_VERSION "5.101.0")
+set(QT_MIN_VERSION "6.4.0")
+set(KF6_MIN_VERSION "5.240.0")
# ECM setup
-find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED)
+find_package(ECM ${KF6_MIN_VERSION} CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
include(KDEInstallDirs)
@@ -32,14 +32,14 @@ ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX DOLPHIN
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/src/dolphin_version.h"
)
-ecm_setup_version("5.0.0" VARIABLE_PREFIX DOLPHINVCS
+ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX DOLPHINVCS
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/dolphinvcs_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/DolphinVcsConfigVersion.cmake"
- SOVERSION 5
+ SOVERSION ${QT_MAJOR_VERSION}
)
-ecm_setup_version("5.0.0" VARIABLE_PREFIX DOLPHINPRIVATE
- SOVERSION 5
+ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX DOLPHINPRIVATE
+ SOVERSION ${QT_MAJOR_VERSION}
)
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
@@ -58,7 +58,7 @@ if (UNIX AND NOT APPLE)
endif()
endif()
-find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
+find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
KCMUtils
NewStuff
CoreAddons
@@ -77,23 +77,24 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
WindowSystem
WidgetsAddons
Codecs
+ MoreTools
)
-find_package(KUserFeedback 1.2.0)
-set_package_properties(KUserFeedback
+find_package(KUserFeedbackQt6 1.2.1)
+set_package_properties(KUserFeedbackQt6
PROPERTIES TYPE OPTIONAL
PURPOSE "Used for submission of telemetry data"
)
-if(KUserFeedback_FOUND)
+if(KUserFeedbackQt6_FOUND)
set(HAVE_KUSERFEEDBACK TRUE)
endif()
-find_package(KF5 ${KF5_MIN_VERSION} OPTIONAL_COMPONENTS
+find_package(KF6 ${KF6_MIN_VERSION} OPTIONAL_COMPONENTS
Activities
DocTools
)
-set_package_properties(KF5Activities PROPERTIES DESCRIPTION "KActivities libraries"
+set_package_properties(KF6Activities PROPERTIES DESCRIPTION "KActivities libraries"
URL "https://www.kde.org"
TYPE OPTIONAL
PURPOSE "For tracking which folders are frequently accessed on a Plasma desktop"
@@ -111,31 +112,31 @@ if(PackageKitQt${QT_MAJOR_VERSION}_FOUND)
set(HAVE_PACKAGEKIT TRUE)
endif()
-find_package(KF5Baloo ${KF5_MIN_VERSION})
-set_package_properties(KF5Baloo PROPERTIES DESCRIPTION "Baloo Core libraries"
+find_package(KF6Baloo ${KF6_MIN_VERSION})
+set_package_properties(KF6Baloo PROPERTIES DESCRIPTION "Baloo Core libraries"
URL "https://www.kde.org"
TYPE OPTIONAL
PURPOSE "For adding desktop-wide search and tagging support to dolphin"
)
-find_package(KF5BalooWidgets 19.07.70)
-set_package_properties(KF5BalooWidgets PROPERTIES DESCRIPTION "Baloos Widgets"
+find_package(KF6BalooWidgets 23.07.70)
+set_package_properties(KF6BalooWidgets PROPERTIES DESCRIPTION "Baloos Widgets"
URL "https://www.kde.org"
TYPE OPTIONAL
)
-find_package(KF5FileMetaData ${KF5_MIN_VERSION})
-set_package_properties(KF5FileMetaData PROPERTIES
+find_package(KF6FileMetaData ${KF6_MIN_VERSION})
+set_package_properties(KF6FileMetaData PROPERTIES
URL "https://projects.kde.org/kfilemetadata"
TYPE OPTIONAL
PURPOSE "For accessing file metadata labels"
)
-if (KF5Activities_FOUND)
+if (KF6Activities_FOUND)
set(HAVE_KACTIVITIES TRUE)
endif()
-if (KF5Baloo_FOUND AND KF5BalooWidgets_FOUND AND KF5FileMetaData_FOUND)
+if (KF6Baloo_FOUND AND KF6BalooWidgets_FOUND AND KF6FileMetaData_FOUND)
message(STATUS "Baloo packages are found")
set(HAVE_BALOO TRUE)
else()
@@ -149,12 +150,6 @@ else()
set(HAVE_TERMINAL TRUE)
endif()
-ecm_set_disabled_deprecation_versions(
- QT 5.15
- KF 5.90
- KSERVICE 5.89 # We use KServiceTypeTrader in a compat code path
-)
-
add_subdirectory(src)
add_subdirectory(doc)
@@ -211,7 +206,7 @@ ecm_qt_install_logging_categories(
)
ki18n_install(po)
-if(KF5DocTools_FOUND)
+if(KF6DocTools_FOUND)
kdoctools_install(po)
endif()
diff --git a/DolphinVcsConfig.cmake.in b/DolphinVcsConfig.cmake.in
index b6e3d42f6..c73d093ed 100644
--- a/DolphinVcsConfig.cmake.in
+++ b/DolphinVcsConfig.cmake.in
@@ -3,6 +3,6 @@
include(CMakeFindDependencyMacro)
find_dependency(Qt@QT_MAJOR_VERSION@Widgets)
-find_dependency(KF5KIO)
+find_dependency(KF6KIO)
include("${CMAKE_CURRENT_LIST_DIR}/DolphinVcsTargets.cmake")
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 934f7a9ff..7527bbfa9 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,4 +1,4 @@
-if (KF5DocTools_FOUND)
+if (KF6DocTools_FOUND)
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR dolphin)
endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 97bc770d7..fedf96688 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -195,28 +195,30 @@ target_link_libraries(
dolphinvcs
Qt${QT_MAJOR_VERSION}::Concurrent
Qt${QT_MAJOR_VERSION}::Gui
- KF5::I18n
- KF5::IconThemes
- KF5::KIOCore
- KF5::KIOWidgets
- KF5::KIOFileWidgets
- KF5::Completion
- KF5::TextWidgets
- KF5::ConfigCore
- KF5::NewStuff
- KF5::NewStuffWidgets # KNSWidgets::Button
- KF5::Parts
- KF5::WindowSystem
- KF5::WidgetsAddons
- KF5::Codecs
+ KF6::I18n
+ KF6::IconThemes
+ KF6::KIOCore
+ KF6::KIOWidgets
+ KF6::KIOFileWidgets
+ KF6::Completion
+ KF6::TextWidgets
+ KF6::ConfigCore
+ KF6::NewStuffWidgets # KNSWidgets::Button
+ KF6::Parts
+ KF6::WindowSystem
+ KF6::WidgetsAddons
+ KF6::Codecs
+ KF6::KCMUtils
+
+ KF6::MoreTools
)
if(HAVE_BALOO)
target_link_libraries(
dolphinprivate PUBLIC
- KF5::FileMetaData
- KF5::Baloo
- KF5::BalooWidgets
+ KF6::FileMetaData
+ KF6::Baloo
+ KF6::BalooWidgets
)
endif()
@@ -288,7 +290,6 @@ target_sources(dolphinstatic PRIVATE
selectionmode/bottombarcontentscontainer.cpp
selectionmode/topbar.cpp
settings/general/behaviorsettingspage.cpp
- settings/general/configurepreviewplugindialog.cpp
settings/general/confirmationssettingspage.cpp
settings/general/generalsettingspage.cpp
settings/general/previewssettingspage.cpp
@@ -347,7 +348,6 @@ target_sources(dolphinstatic PRIVATE
selectionmode/bottombarcontentscontainer.h
selectionmode/topbar.h
settings/general/behaviorsettingspage.h
- settings/general/configurepreviewplugindialog.h
settings/general/confirmationssettingspage.h
settings/general/generalsettingspage.h
settings/general/previewssettingspage.h
@@ -427,25 +427,25 @@ target_sources(dolphinstatic PRIVATE
target_include_directories(dolphinstatic SYSTEM PRIVATE ${PHONON_INCLUDES})
target_link_libraries(dolphinstatic
dolphinprivate
- KF5::CoreAddons
- KF5::KCMUtils
- KF5::DBusAddons
- KF5::Notifications
+ KF6::CoreAddons
+ KF6::KCMUtils
+ KF6::DBusAddons
+ KF6::Notifications
Phonon::phonon4qt${QT_MAJOR_VERSION}
)
if (HAVE_KACTIVITIES)
target_link_libraries(
dolphinstatic
- KF5::Activities
+ KF6::Activities
)
endif()
if (HAVE_KUSERFEEDBACK)
target_link_libraries(
dolphinstatic
- KUserFeedbackCore
- KUserFeedbackWidgets
+ KUserFeedbackCoreQt6
+ KUserFeedbackWidgetsQt6
)
endif()
@@ -469,12 +469,12 @@ target_link_libraries(dolphin
PRIVATE
dolphinprivate
dolphinstatic
- KF5::Crash
+ KF6::Crash
)
if (HAVE_X11)
if (QT_MAJOR_VERSION STREQUAL "5")
- target_link_libraries(dolphin PRIVATE Qt5::X11Extras)
+ target_link_libraries(dolphin PRIVATE Qt{QT_MAJOR_VERSION}::X11Extras)
else()
target_link_libraries(dolphin PRIVATE Qt::GuiPrivate)
endif()
@@ -524,7 +524,6 @@ if(NOT WIN32)
settings/kcm/kcmdolphingeneral.cpp
settings/general/behaviorsettingspage.cpp
settings/general/previewssettingspage.cpp
- settings/general/configurepreviewplugindialog.cpp
settings/general/confirmationssettingspage.cpp
settings/settingspagebase.cpp
settings/serviceitemdelegate.cpp
@@ -532,7 +531,6 @@ if(NOT WIN32)
settings/kcm/kcmdolphingeneral.h
settings/general/behaviorsettingspage.h
settings/general/previewssettingspage.h
- settings/general/configurepreviewplugindialog.h
settings/general/confirmationssettingspage.h
settings/settingspagebase.h
settings/serviceitemdelegate.h
diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp
index a5b033c71..8c52aac39 100644
--- a/src/dolphincontextmenu.cpp
+++ b/src/dolphincontextmenu.cpp
@@ -170,6 +170,9 @@ void DolphinContextMenu::addDirectoryItemContextMenu()
// set up 'Create New' menu
DolphinNewFileMenu *newFileMenu = new DolphinNewFileMenu(m_mainWindow->actionCollection(), m_mainWindow);
+#if KIO_VERSION >= QT_VERSION_CHECK(5, 100, 0)
+ newFileMenu->setNewFolderShortcutAction(m_mainWindow->actionCollection()->action("create_dir"));
+#endif
newFileMenu->checkUpToDate();
#if KIO_VERSION >= QT_VERSION_CHECK(5, 97, 0)
newFileMenu->setWorkingDirectory(m_fileInfo.url());
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 0094bc2e7..415f2e8b3 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -165,6 +165,10 @@ DolphinMainWindow::DolphinMainWindow()
connect(m_actionHandler, &DolphinViewActionHandler::createDirectoryTriggered, this, &DolphinMainWindow::createDirectory);
connect(m_actionHandler, &DolphinViewActionHandler::selectionModeChangeTriggered, this, &DolphinMainWindow::slotSetSelectionMode);
+#if KIO_VERSION >= QT_VERSION_CHECK(5, 100, 0)
+ m_newFileMenu->setNewFolderShortcutAction(actionCollection()->action("create_dir"));
+#endif
+
m_remoteEncoding = new DolphinRemoteEncoding(this, m_actionHandler);
connect(this, &DolphinMainWindow::urlChanged, m_remoteEncoding, &DolphinRemoteEncoding::slotAboutToOpenUrl);
diff --git a/src/dolphinnavigatorswidgetaction.cpp b/src/dolphinnavigatorswidgetaction.cpp
index 47a2a2303..cb2e4bc00 100644
--- a/src/dolphinnavigatorswidgetaction.cpp
+++ b/src/dolphinnavigatorswidgetaction.cpp
@@ -42,7 +42,7 @@ DolphinNavigatorsWidgetAction::DolphinNavigatorsWidgetAction(QWidget *parent)
void DolphinNavigatorsWidgetAction::adjustSpacing()
{
- m_previousWindowWidth = parentWidget()->window()->width();
+ m_previousWindowWidth = qobject_cast<QWidget *>(parent())->window()->width();
auto viewGeometries = m_viewGeometriesHelper.viewGeometries();
const int widthOfSplitterPrimary = viewGeometries.globalXOfPrimary + viewGeometries.widthOfPrimary - viewGeometries.globalXOfNavigatorsWidget;
const QList<int> splitterSizes = {widthOfSplitterPrimary, m_splitter->width() - widthOfSplitterPrimary};
@@ -298,7 +298,7 @@ DolphinNavigatorsWidgetAction::ViewGeometriesHelper::ViewGeometriesHelper(QWidge
bool DolphinNavigatorsWidgetAction::ViewGeometriesHelper::eventFilter(QObject *watched, QEvent *event)
{
if (event->type() == QEvent::Resize) {
- if (m_navigatorsWidgetAction->parentWidget()->window()->width() != m_navigatorsWidgetAction->m_previousWindowWidth) {
+ if (qobject_cast<QWidget*>(m_navigatorsWidgetAction->parent())->window()->width() != m_navigatorsWidgetAction->m_previousWindowWidth) {
// The window is being resized which means not all widgets have gotten their new sizes yet.
// Let's wait a bit so the sizes of the navigatorsWidget and the viewContainers have all
// had a chance to be updated.
diff --git a/src/dolphinnewfilemenu.cpp b/src/dolphinnewfilemenu.cpp
index 8de4347b8..43fbdf5c9 100644
--- a/src/dolphinnewfilemenu.cpp
+++ b/src/dolphinnewfilemenu.cpp
@@ -10,10 +10,17 @@
#include <KActionCollection>
#include <KIO/Job>
+#include <kio_version.h>
DolphinNewFileMenu::DolphinNewFileMenu(KActionCollection *collection, QObject *parent)
+#if KIO_VERSION >= QT_VERSION_CHECK(5, 100, 0)
+ : KNewFileMenu(parent)
+{
+ Q_UNUSED(collection)
+#else
: KNewFileMenu(collection, QStringLiteral("new_menu"), parent)
{
+#endif
DolphinNewFileMenuObserver::instance().attach(this);
}
diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp
index 64c829c2d..0af0fd6b3 100644
--- a/src/dolphinpart.cpp
+++ b/src/dolphinpart.cpp
@@ -46,15 +46,16 @@
#include <QStandardPaths>
#include <QTextDocument>
+#include <KPluginFactory>
+
K_PLUGIN_CLASS_WITH_JSON(DolphinPart, "dolphinpart.json")
DolphinPart::DolphinPart(QWidget *parentWidget, QObject *parent, const KPluginMetaData &metaData, const QVariantList &args)
- : KParts::ReadOnlyPart(parent)
+ : KParts::ReadOnlyPart(parent, metaData)
, m_openTerminalAction(nullptr)
, m_removeAction(nullptr)
{
Q_UNUSED(args)
- setMetaData(metaData);
m_extension = new DolphinPartBrowserExtension(this);
@@ -85,7 +86,7 @@ DolphinPart::DolphinPart(QWidget *parentWidget, QObject *parent, const KPluginMe
});
connect(m_view, &DolphinView::tabRequested, this, &DolphinPart::createNewWindow);
connect(m_view, &DolphinView::requestContextMenu, this, &DolphinPart::slotOpenContextMenu);
- connect(m_view, &DolphinView::selectionChanged, m_extension, &KParts::BrowserExtension::selectionInfo);
+ connect(m_view, &DolphinView::selectionChanged, m_extension, &KParts::NavigationExtension::selectionInfo);
connect(m_view, &DolphinView::selectionChanged, this, &DolphinPart::slotSelectionChanged);
connect(m_view, &DolphinView::requestItemInfo, this, &DolphinPart::slotRequestItemInfo);
connect(m_view, &DolphinView::modeChanged, this, &DolphinPart::viewModeChanged); // relay signal
@@ -143,6 +144,9 @@ void DolphinPart::createActions()
m_newFileMenu = new DolphinNewFileMenu(actionCollection(), this);
m_newFileMenu->setParentWidget(widget());
+#if KIO_VERSION >= QT_VERSION_CHECK(5, 100, 0)
+ m_newFileMenu->setNewFolderShortcutAction(actionCollection()->action("create_dir"));
+#endif
connect(m_newFileMenu->menu(), &QMenu::aboutToShow, this, &DolphinPart::updateNewMenu);
QAction *editMimeTypeAction = actionCollection()->addAction(QStringLiteral("editMimeType"));
@@ -362,8 +366,8 @@ void DolphinPart::createNewWindow(const QUrl &url)
void DolphinPart::slotOpenContextMenu(const QPoint &pos, const KFileItem &_item, const KFileItemList &selectedItems, const QUrl &)
{
- KParts::BrowserExtension::PopupFlags popupFlags =
- KParts::BrowserExtension::DefaultPopupItems | KParts::BrowserExtension::ShowProperties | KParts::BrowserExtension::ShowUrlOperations;
+ KParts::NavigationExtension::PopupFlags popupFlags =
+ KParts::NavigationExtension::DefaultPopupItems | KParts::NavigationExtension::ShowProperties | KParts::NavigationExtension::ShowUrlOperations;
KFileItem item(_item);
@@ -384,7 +388,7 @@ void DolphinPart::slotOpenContextMenu(const QPoint &pos, const KFileItem &_item,
KFileItemListProperties capabilities(items);
- KParts::BrowserExtension::ActionGroupMap actionGroups;
+ KParts::NavigationExtension::ActionGroupMap actionGroups;
QList<QAction *> editActions;
editActions += m_view->versionControlActions(m_view->selectedItems());
@@ -409,7 +413,7 @@ void DolphinPart::slotOpenContextMenu(const QPoint &pos, const KFileItem &_item,
m_removeAction->update();
}
} else {
- popupFlags |= KParts::BrowserExtension::NoDeletion;
+ popupFlags |= KParts::NavigationExtension::NoDeletion;
}
if (supportsMoving) {
@@ -420,7 +424,7 @@ void DolphinPart::slotOpenContextMenu(const QPoint &pos, const KFileItem &_item,
// since otherwise the created file would not be visible.
// But in treeview mode we should allow it.
if (m_view->itemsExpandable())
- popupFlags |= KParts::BrowserExtension::ShowCreateDirectory;
+ popupFlags |= KParts::NavigationExtension::ShowCreateDirectory;
}
actionGroups.insert(QStringLiteral("editactions"), editActions);
diff --git a/src/dolphinpart_ext.cpp b/src/dolphinpart_ext.cpp
index 9028b0358..1aa16eeaa 100644
--- a/src/dolphinpart_ext.cpp
+++ b/src/dolphinpart_ext.cpp
@@ -10,20 +10,20 @@
#include "views/dolphinview.h"
DolphinPartBrowserExtension::DolphinPartBrowserExtension(DolphinPart *part)
- : KParts::BrowserExtension(part)
+ : KParts::NavigationExtension(part)
, m_part(part)
{
}
void DolphinPartBrowserExtension::restoreState(QDataStream &stream)
{
- KParts::BrowserExtension::restoreState(stream);
+ KParts::NavigationExtension::restoreState(stream);
m_part->view()->restoreState(stream);
}
void DolphinPartBrowserExtension::saveState(QDataStream &stream)
{
- KParts::BrowserExtension::saveState(stream);
+ KParts::NavigationExtension::saveState(stream);
m_part->view()->saveState(stream);
}
diff --git a/src/dolphinpart_ext.h b/src/dolphinpart_ext.h
index 615f14252..7f8792fbb 100644
--- a/src/dolphinpart_ext.h
+++ b/src/dolphinpart_ext.h
@@ -7,16 +7,16 @@
#ifndef DOLPHINPART_EXT_H
#define DOLPHINPART_EXT_H
-#include <kparts/browserextension.h>
-#include <kparts/fileinfoextension.h>
-#include <kparts/listingfilterextension.h>
-#include <kparts/listingnotificationextension.h>
+#include <KParts/FileInfoExtension>
+#include <KParts/ListingFilterExtension>
+#include <KParts/ListingNotificationExtension>
+#include <KParts/NavigationExtension>
#include <QUrl>
class DolphinPart;
-class DolphinPartBrowserExtension : public KParts::BrowserExtension
+class DolphinPartBrowserExtension : public KParts::NavigationExtension
{
Q_OBJECT
public:
diff --git a/src/dolphintabbar.cpp b/src/dolphintabbar.cpp
index 82695ac21..aa74e17ae 100644
--- a/src/dolphintabbar.cpp
+++ b/src/dolphintabbar.cpp
@@ -32,7 +32,7 @@ DolphinTabBar::DolphinTabBar(QWidget *parent)
void DolphinTabBar::dragEnterEvent(QDragEnterEvent *event)
{
const QMimeData *mimeData = event->mimeData();
- const int index = tabAt(event->pos());
+ const int index = tabAt(event->position().toPoint());
if (mimeData->hasUrls()) {
event->acceptProposedAction();
@@ -52,7 +52,7 @@ void DolphinTabBar::dragLeaveEvent(QDragLeaveEvent *event)
void DolphinTabBar::dragMoveEvent(QDragMoveEvent *event)
{
const QMimeData *mimeData = event->mimeData();
- const int index = tabAt(event->pos());
+ const int index = tabAt(event->position().toPoint());
if (mimeData->hasUrls()) {
updateAutoActivationTimer(index);
@@ -67,7 +67,7 @@ void DolphinTabBar::dropEvent(QDropEvent *event)
updateAutoActivationTimer(-1);
const QMimeData *mimeData = event->mimeData();
- const int index = tabAt(event->pos());
+ const int index = tabAt(event->position().toPoint());
if (mimeData->hasUrls()) {
Q_EMIT tabDropEvent(index, event);
diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp
index e0e61cd49..8d5656daf 100644
--- a/src/kitemviews/kfileitemmodelrolesupdater.cpp
+++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp
@@ -118,7 +118,7 @@ KFileItemModelRolesUpdater::KFileItemModelRolesUpdater(KFileItemModel *model, QO
m_directoryContentsCounter = new KDirectoryContentsCounter(m_model, this);
connect(m_directoryContentsCounter, &KDirectoryContentsCounter::result, this, &KFileItemModelRolesUpdater::slotDirectoryContentsCountReceived);
- const QString pluginNamespace = QStringLiteral("kf" QT_STRINGIFY(QT_VERSION_MAJOR)) + QStringLiteral("/overlayicon");
+ const QString pluginNamespace = QStringLiteral("kf" QT_STRINGIFY(QT_MAJOR_VERSION)) + QStringLiteral("/overlayicon");
const auto plugins = KPluginMetaData::findPlugins(pluginNamespace, {}, KPluginMetaData::AllowEmptyMetaData);
for (const KPluginMetaData &data : plugins) {
auto instance = QPluginLoader(data.fileName()).instance();
diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp
index bea2f0614..2d508ba65 100644
--- a/src/panels/places/placespanel.cpp
+++ b/src/panels/places/placespanel.cpp
@@ -141,7 +141,7 @@ static bool isInternalDrag(const QMimeData *mimeData)
void PlacesPanel::dragMoveEvent(QDragMoveEvent *event)
{
- const QModelIndex index = indexAt(event->pos());
+ const QModelIndex index = indexAt(event->position().toPoint());
if (index.isValid()) {
auto *placesModel = static_cast<KFilePlacesModel *>(model());
diff --git a/src/settings/contextmenu/contextmenusettingspage.cpp b/src/settings/contextmenu/contextmenusettingspage.cpp
index c363914d0..78d8ccf8a 100644
--- a/src/settings/contextmenu/contextmenusettingspage.cpp
+++ b/src/settings/contextmenu/contextmenusettingspage.cpp
@@ -20,7 +20,6 @@
#include <KMessageBox>
#include <KPluginMetaData>
#include <KService>
-#include <KServiceTypeTrader>
#include <kio_version.h>
#include <kiocore_export.h>
#include <kservice_export.h>
@@ -290,13 +289,6 @@ void ContextMenuSettingsPage::loadServices()
const auto locations = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("kio/servicemenus"), QStandardPaths::LocateDirectory);
QStringList files = KFileUtils::findAllUniqueFiles(locations);
-#if KIOWIDGETS_BUILD_DEPRECATED_SINCE(5, 90)
- const KService::List services = KServiceTypeTrader::self()->query(QStringLiteral("KonqPopupMenu/Plugin"));
- for (const KService::Ptr &service : services) {
- files << QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kservices5/" % service->entryPath());
- }
-#endif
-
for (const auto &file : qAsConst(files)) {
const QList<KServiceAction> serviceActions = KDesktopFileActions::userDefinedServices(KService(file), true);
@@ -315,20 +307,8 @@ void ContextMenuSettingsPage::loadServices()
}
}
- // Load service plugins, this is deprecated in KIO 5.82
-#if KIOCORE_BUILD_DEPRECATED_SINCE(5, 82)
- const KService::List pluginServices = KServiceTypeTrader::self()->query(QStringLiteral("KFileItemAction/Plugin"));
- for (const KService::Ptr &service : pluginServices) {
- const QString desktopEntryName = service->desktopEntryName();
- if (!isInServicesList(desktopEntryName)) {
- const bool checked = showGroup.readEntry(desktopEntryName, true);
- addRow(service->icon(), service->name(), desktopEntryName, checked);
- }
- }
-#endif
-
// Load JSON-based plugins that implement the KFileItemActionPlugin interface
- const auto jsonPlugins = KPluginMetaData::findPlugins(QStringLiteral("kf" QT_STRINGIFY(QT_VERSION_MAJOR)) + QStringLiteral("/kfileitemaction"));
+ const auto jsonPlugins = KPluginMetaData::findPlugins(QStringLiteral("kf" QT_STRINGIFY(QT_MAJOR_VERSION)) + QStringLiteral("/kfileitemaction"));
for (const auto &jsonMetadata : jsonPlugins) {
const QString desktopEntryName = jsonMetadata.pluginId();
diff --git a/src/settings/contextmenu/servicemenuinstaller/CMakeLists.txt b/src/settings/contextmenu/servicemenuinstaller/CMakeLists.txt
index 74576ad20..603e5c2e5 100644
--- a/src/settings/contextmenu/servicemenuinstaller/CMakeLists.txt
+++ b/src/settings/contextmenu/servicemenuinstaller/CMakeLists.txt
@@ -5,8 +5,8 @@ add_executable(servicemenuinstaller servicemenuinstaller.cpp)
target_link_libraries(servicemenuinstaller PRIVATE
Qt${QT_MAJOR_VERSION}::Core
Qt${QT_MAJOR_VERSION}::Gui
- KF5::I18n
- KF5::CoreAddons
+ KF6::I18n
+ KF6::CoreAddons
)
if(HAVE_PACKAGEKIT)
diff --git a/src/settings/general/configurepreviewplugindialog.cpp b/src/settings/general/configurepreviewplugindialog.cpp
deleted file mode 100644
index a391812df..000000000
--- a/src/settings/general/configurepreviewplugindialog.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2011 Peter Penz <[email protected]>
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- */
-
-#include "configurepreviewplugindialog.h"
-
-#if KIOWIDGETS_BUILD_DEPRECATED_SINCE(5, 87)
-
-#include <KIO/DeleteJob>
-#include <KIO/JobUiDelegate>
-#include <KIO/ThumbCreator>
-#include <KJobWidgets>
-#include <KLocalizedString>
-#include <QPluginLoader>
-
-#include <QDialogButtonBox>
-#include <QPushButton>
-#include <QStandardPaths>
-#include <QUrl>
-#include <QVBoxLayout>
-
-ConfigurePreviewPluginDialog::ConfigurePreviewPluginDialog(const QString &pluginName, const QString &desktopEntryName, QWidget *parent)
- : QDialog(parent)
-{
- QSharedPointer<ThumbCreator> previewPlugin;
- const QString pluginPath = QPluginLoader(desktopEntryName).fileName();
- if (!pluginPath.isEmpty()) {
- newCreator create = (newCreator)QLibrary::resolve(pluginPath, "new_creator");
- if (create) {
- previewPlugin.reset(dynamic_cast<ThumbCreator *>(create()));
- }
- }
-
- setWindowTitle(i18nc("@title:window", "Configure Preview for %1", pluginName));
- setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
- setMinimumWidth(400);
-
- auto layout = new QVBoxLayout(this);
-
- if (previewPlugin) {
- auto configurationWidget = previewPlugin->createConfigurationWidget();
- configurationWidget->setParent(this);
- layout->addWidget(configurationWidget);
-
- layout->addStretch();
-
- connect(this, &ConfigurePreviewPluginDialog::accepted, this, [=] {
- // TODO: It would be great having a mechanism to tell PreviewJob that only previews
- // for a specific MIME-type should be regenerated. As this is not available yet we
- // delete the whole thumbnails directory.
- previewPlugin->writeConfiguration(configurationWidget);
-
- // https://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-latest.html#DIRECTORY
- const QString thumbnailsPath = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + QLatin1String("/thumbnails/");
- KIO::del(QUrl::fromLocalFile(thumbnailsPath), KIO::HideProgressInfo);
- });
- }
-
- auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
- connect(buttonBox, &QDialogButtonBox::accepted, this, &ConfigurePreviewPluginDialog::accept);
- connect(buttonBox, &QDialogButtonBox::rejected, this, &ConfigurePreviewPluginDialog::reject);
- layout->addWidget(buttonBox);
-
- auto okButton = buttonBox->button(QDialogButtonBox::Ok);
- okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
- okButton->setDefault(true);
-}
-
-#endif // KIO_VERSION
diff --git a/src/settings/general/configurepreviewplugindialog.h b/src/settings/general/configurepreviewplugindialog.h
deleted file mode 100644
index 66504cce2..000000000
--- a/src/settings/general/configurepreviewplugindialog.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2011 Peter Penz <[email protected]>
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- */
-
-#ifndef CONFIGUREPREVIEWPLUGINDIALOG_H
-#define CONFIGUREPREVIEWPLUGINDIALOG_H
-
-#include <kiowidgets_export.h>
-
-#if KIOWIDGETS_BUILD_DEPRECATED_SINCE(5, 87)
-
-#include <QDialog>
-
-/**
- * @brief Dialog for configuring preview-plugins.
- */
-class ConfigurePreviewPluginDialog : public QDialog
-{
- Q_OBJECT
-
-public:
- /**
- * @param pluginName User visible name of the plugin
- * @param desktopEntryName The name of the plugin that is noted in the desktopentry.
- * Is used to instantiate the plugin to get the configuration
- * widget.
- * @param parent Parent widget.
- */
- ConfigurePreviewPluginDialog(const QString &pluginName, const QString &desktopEntryName, QWidget *parent);
- ~ConfigurePreviewPluginDialog() override = default;
-};
-#endif // KIOWIDGETS_BUILD_DEPRECATED_SINCE
-
-#endif
diff --git a/src/settings/general/previewssettingspage.cpp b/src/settings/general/previewssettingspage.cpp
index 358798f58..fa715237a 100644
--- a/src/settings/general/previewssettingspage.cpp
+++ b/src/settings/general/previewssettingspage.cpp
@@ -6,7 +6,6 @@
#include "previewssettingspage.h"
-#include "configurepreviewplugindialog.h"
#include "dolphin_generalsettings.h"
#include "settings/serviceitemdelegate.h"
#include "settings/servicemodel.h"
@@ -45,12 +44,6 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget *parent)
m_listView = new QListView(this);
QScroller::grabGesture(m_listView->viewport(), QScroller::TouchGesture);
-#if KIOWIDGETS_BUILD_DEPRECATED_SINCE(5, 87)
- ServiceItemDelegate *delegate = new ServiceItemDelegate(m_listView, m_listView);
- connect(delegate, &ServiceItemDelegate::requestServiceConfiguration, this, &PreviewsSettingsPage::configureService);
- m_listView->setItemDelegate(delegate);
-#endif
-
ServiceModel *serviceModel = new ServiceModel(this);
QSortFilterProxyModel *proxyModel = new QSortFilterProxyModel(this);
proxyModel->setSourceModel(serviceModel);
@@ -150,19 +143,6 @@ void PreviewsSettingsPage::showEvent(QShowEvent *event)
SettingsPageBase::showEvent(event);
}
-#if KIOWIDGETS_BUILD_DEPRECATED_SINCE(5, 87)
-void PreviewsSettingsPage::configureService(const QModelIndex &index)
-{
- const QAbstractItemModel *model = index.model();
- const QString pluginName = model->data(index).toString();
- const QString desktopEntryName = model->data(index, ServiceModel::DesktopEntryNameRole).toString();
-
- ConfigurePreviewPluginDialog *dialog = new ConfigurePreviewPluginDialog(pluginName, desktopEntryName, this);
- dialog->setAttribute(Qt::WA_DeleteOnClose);
- dialog->show();
-}
-#endif
-
void PreviewsSettingsPage::loadPreviewPlugins()
{
QAbstractItemModel *model = m_listView->model();
@@ -176,11 +156,6 @@ void PreviewsSettingsPage::loadPreviewPlugins()
model->setData(index, show, Qt::CheckStateRole);
model->setData(index, plugin.name(), Qt::DisplayRole);
model->setData(index, plugin.pluginId(), ServiceModel::DesktopEntryNameRole);
-
-#if KIOWIDGETS_BUILD_DEPRECATED_SINCE(5, 87)
- const bool configurable = plugin.value(QStringLiteral("Configurable"), false);
- model->setData(index, configurable, ServiceModel::ConfigurableRole);
-#endif
}
model->sort(Qt::DisplayRole);
diff --git a/src/settings/general/previewssettingspage.h b/src/settings/general/previewssettingspage.h
index 2c3e4dfef..d6d22ae21 100644
--- a/src/settings/general/previewssettingspage.h
+++ b/src/settings/general/previewssettingspage.h
@@ -40,9 +40,6 @@ protected:
void showEvent(QShowEvent *event) override;
private Q_SLOTS:
-#if KIOWIDGETS_BUILD_DEPRECATED_SINCE(5, 87)
- void configureService(const QModelIndex &index);
-#endif
private:
void loadPreviewPlugins();
diff --git a/src/settings/kcm/kcmdolphingeneral.cpp b/src/settings/kcm/kcmdolphingeneral.cpp
index 25e3b6876..417979d23 100644
--- a/src/settings/kcm/kcmdolphingeneral.cpp
+++ b/src/settings/kcm/kcmdolphingeneral.cpp
@@ -19,16 +19,17 @@
K_PLUGIN_CLASS_WITH_JSON(DolphinGeneralConfigModule, "kcmdolphingeneral.json")
-DolphinGeneralConfigModule::DolphinGeneralConfigModule(QWidget *parent, const QVariantList &args)
- : KCModule(parent, args)
+DolphinGeneralConfigModule::DolphinGeneralConfigModule(QObject *parent, const KPluginMetaData &data)
+ : KCModule(qobject_cast<QWidget *>(parent), data)
, m_pages()
{
setButtons(KCModule::Default | KCModule::Help | KCModule::Apply);
- QVBoxLayout *topLayout = new QVBoxLayout(this);
+ const auto parentWidget = qobject_cast<QWidget *>(parent);
+ QVBoxLayout *topLayout = new QVBoxLayout(parentWidget);
topLayout->setContentsMargins(0, 0, 0, 0);
- QTabWidget *tabWidget = new QTabWidget(this);
+ QTabWidget *tabWidget = new QTabWidget(parentWidget);
// initialize 'Behavior' tab
BehaviorSettingsPage *behaviorPage = new BehaviorSettingsPage(QUrl::fromLocalFile(QDir::homePath()), tabWidget);
diff --git a/src/settings/kcm/kcmdolphingeneral.h b/src/settings/kcm/kcmdolphingeneral.h
index 889317738..828332539 100644
--- a/src/settings/kcm/kcmdolphingeneral.h
+++ b/src/settings/kcm/kcmdolphingeneral.h
@@ -21,7 +21,7 @@ class DolphinGeneralConfigModule : public KCModule
Q_OBJECT
public:
- DolphinGeneralConfigModule(QWidget *parent, const QVariantList &args);
+ DolphinGeneralConfigModule(QObject *parent, const KPluginMetaData &data);
~DolphinGeneralConfigModule() override;
void save() override;
diff --git a/src/settings/kcm/kcmdolphinnavigation.cpp b/src/settings/kcm/kcmdolphinnavigation.cpp
index 63591f4fd..b18f00c5b 100644
--- a/src/settings/kcm/kcmdolphinnavigation.cpp
+++ b/src/settings/kcm/kcmdolphinnavigation.cpp
@@ -15,16 +15,17 @@
K_PLUGIN_CLASS_WITH_JSON(DolphinNavigationConfigModule, "kcmdolphinnavigation.json")
-DolphinNavigationConfigModule::DolphinNavigationConfigModule(QWidget *parent, const QVariantList &args)
- : KCModule(parent, args)
+DolphinNavigationConfigModule::DolphinNavigationConfigModule(QObject *parent)
+ : KCModule(qobject_cast<QWidget *>(parent))
, m_navigation(nullptr)
{
setButtons(KCModule::Default | KCModule::Help | KCModule::Apply);
- QVBoxLayout *topLayout = new QVBoxLayout(this);
+ const auto parentWidget = qobject_cast<QWidget *>(parent);
+ QVBoxLayout *topLayout = new QVBoxLayout(parentWidget);
topLayout->setContentsMargins(0, 0, 0, 0);
- m_navigation = new NavigationSettingsPage(this);
+ m_navigation = new NavigationSettingsPage(parentWidget);
connect(m_navigation, &NavigationSettingsPage::changed, this, &DolphinNavigationConfigModule::markAsChanged);
topLayout->addWidget(m_navigation, 0, {});
}
diff --git a/src/settings/kcm/kcmdolphinnavigation.h b/src/settings/kcm/kcmdolphinnavigation.h
index 97d7bff85..a25405155 100644
--- a/src/settings/kcm/kcmdolphinnavigation.h
+++ b/src/settings/kcm/kcmdolphinnavigation.h
@@ -19,7 +19,7 @@ class DolphinNavigationConfigModule : public KCModule
Q_OBJECT
public:
- DolphinNavigationConfigModule(QWidget *parent, const QVariantList &args);
+ DolphinNavigationConfigModule(QObject *parent);
~DolphinNavigationConfigModule() override;
void save() override;
diff --git a/src/settings/kcm/kcmdolphinviewmodes.cpp b/src/settings/kcm/kcmdolphinviewmodes.cpp
index 50ee13618..0f0068108 100644
--- a/src/settings/kcm/kcmdolphinviewmodes.cpp
+++ b/src/settings/kcm/kcmdolphinviewmodes.cpp
@@ -10,6 +10,7 @@
#include <KLocalizedString>
#include <KPluginFactory>
+#include <KCModule>
#include <QDBusConnection>
#include <QDBusMessage>
@@ -19,16 +20,17 @@
K_PLUGIN_CLASS_WITH_JSON(DolphinViewModesConfigModule, "kcmdolphinviewmodes.json")
-DolphinViewModesConfigModule::DolphinViewModesConfigModule(QWidget *parent, const QVariantList &args)
- : KCModule(parent, args)
+DolphinViewModesConfigModule::DolphinViewModesConfigModule(QObject *parent, const KPluginMetaData &data)
+ : KCModule(qobject_cast<QWidget *>(parent), data)
, m_tabs()
{
setButtons(KCModule::Default | KCModule::Help | KCModule::Apply);
- QVBoxLayout *topLayout = new QVBoxLayout(this);
+ const auto parentWidget = qobject_cast<QWidget *>(parent);
+ QVBoxLayout *topLayout = new QVBoxLayout(parentWidget);
topLayout->setContentsMargins(0, 0, 0, 0);
- QTabWidget *tabWidget = new QTabWidget(this);
+ QTabWidget *tabWidget = new QTabWidget(parentWidget);
// Initialize 'Icons' tab
ViewSettingsTab *iconsTab = new ViewSettingsTab(ViewSettingsTab::IconsMode, tabWidget);
diff --git a/src/settings/kcm/kcmdolphinviewmodes.h b/src/settings/kcm/kcmdolphinviewmodes.h
index 33c0b77a5..59cbca314 100644
--- a/src/settings/kcm/kcmdolphinviewmodes.h
+++ b/src/settings/kcm/kcmdolphinviewmodes.h
@@ -19,7 +19,7 @@ class DolphinViewModesConfigModule : public KCModule
Q_OBJECT
public:
- DolphinViewModesConfigModule(QWidget *parent, const QVariantList &args);
+ DolphinViewModesConfigModule(QObject *parent, const KPluginMetaData &data);
~DolphinViewModesConfigModule() override;
void save() override;
diff --git a/src/settings/serviceitemdelegate.cpp b/src/settings/serviceitemdelegate.cpp
index d8f446a37..d95ca7918 100644
--- a/src/settings/serviceitemdelegate.cpp
+++ b/src/settings/serviceitemdelegate.cpp
@@ -60,7 +60,7 @@ QList<QWidget *> ServiceItemDelegate::createItemWidgets(const QModelIndex &) con
return {checkBox, configureButton};
}
-void ServiceItemDelegate::updateItemWidgets(const QList<QWidget *> widgets, const QStyleOptionViewItem &option, const QPersistentModelIndex &index) const
+void ServiceItemDelegate::updateItemWidgets(const QList<QWidget *> &widgets, const QStyleOptionViewItem &option, const QPersistentModelIndex &index) const
{
QCheckBox *checkBox = static_cast<QCheckBox *>(widgets[0]);
QPushButton *configureButton = static_cast<QPushButton *>(widgets[1]);
diff --git a/src/settings/serviceitemdelegate.h b/src/settings/serviceitemdelegate.h
index 74f7dfd6a..d7b243878 100644
--- a/src/settings/serviceitemdelegate.h
+++ b/src/settings/serviceitemdelegate.h
@@ -29,7 +29,7 @@ public:
QList<QWidget *> createItemWidgets(const QModelIndex &) const override;
- void updateItemWidgets(const QList<QWidget *> widgets, const QStyleOptionViewItem &option, const QPersistentModelIndex &index) const override;
+ void updateItemWidgets(const QList<QWidget *> &widgets, const QStyleOptionViewItem &option, const QPersistentModelIndex &index) const override;
Q_SIGNALS:
void requestServiceConfiguration(const QModelIndex &index);
diff --git a/src/settings/trash/trashsettingspage.cpp b/src/settings/trash/trashsettingspage.cpp
index 511d6b353..d21b4833e 100644
--- a/src/settings/trash/trashsettingspage.cpp
+++ b/src/settings/trash/trashsettingspage.cpp
@@ -6,7 +6,8 @@
#include "trashsettingspage.h"
-#include <KCModuleProxy>
+#include <KCModuleLoader>
+#include <KCModule>
#include <KPluginMetaData>
#include <QFormLayout>
@@ -16,12 +17,13 @@ TrashSettingsPage::TrashSettingsPage(QWidget *parent)
{
QFormLayout *topLayout = new QFormLayout(this);
- m_proxy = new KCModuleProxy(KPluginMetaData(QStringLiteral("kcm_trash")));
- topLayout->addRow(m_proxy);
+ m_kcm = KCModuleLoader::loadModule(KPluginMetaData(QStringLiteral("kcm_trash")));
+
+ topLayout->addRow(m_kcm->widget());
loadSettings();
- connect(m_proxy, &KCModuleProxy::changed, this, &TrashSettingsPage::changed);
+ connect(m_kcm, &KCModule::needsSaveChanged, this, &TrashSettingsPage::changed);
}
TrashSettingsPage::~TrashSettingsPage()
@@ -30,15 +32,15 @@ TrashSettingsPage::~TrashSettingsPage()
void TrashSettingsPage::applySettings()
{
- m_proxy->save();
+ m_kcm->save();
}
void TrashSettingsPage::restoreDefaults()
{
- m_proxy->defaults();
+ m_kcm->defaults();
}
void TrashSettingsPage::loadSettings()
{
- m_proxy->load();
+ m_kcm->load();
}
diff --git a/src/settings/trash/trashsettingspage.h b/src/settings/trash/trashsettingspage.h
index b0e48a018..a5253774c 100644
--- a/src/settings/trash/trashsettingspage.h
+++ b/src/settings/trash/trashsettingspage.h
@@ -8,7 +8,7 @@
#include "settings/settingspagebase.h"
-class KCModuleProxy;
+class KCModule;
/**
* @brief Tab page for the 'Trash' settings of the Dolphin settings dialog, it uses the KCM.
@@ -29,7 +29,7 @@ public:
private:
void loadSettings();
- KCModuleProxy *m_proxy;
+ KCModule *m_kcm;
};
#endif
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index d4a7457cb..2495a3a59 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -38,14 +38,14 @@ target_link_libraries(kfileitemmodelbenchmark dolphinprivate Qt${QT_MAJOR_VERSIO
ecm_add_test(kitemlistkeyboardsearchmanagertest.cpp LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
# DolphinSearchBox
-if (KF5Baloo_FOUND)
+if (KF6Baloo_FOUND)
ecm_add_test(dolphinsearchboxtest.cpp
TEST_NAME dolphinsearchboxtest
LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
endif()
# DolphinQuery
-if (KF5Baloo_FOUND)
+if (KF6Baloo_FOUND)
ecm_add_test(dolphinquerytest.cpp
TEST_NAME dolphinquerytest
LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp
index 32bec03df..d30464626 100644
--- a/src/views/dolphinviewactionhandler.cpp
+++ b/src/views/dolphinviewactionhandler.cpp
@@ -215,7 +215,7 @@ void DolphinViewActionHandler::createActions(SelectionMode::ActionTextHelper *ac
viewModeActions->addAction(compactAction);
viewModeActions->addAction(detailsAction);
viewModeActions->setToolBarMode(KSelectAction::MenuMode);
- connect(viewModeActions, &KSelectAction::triggered, this, &DolphinViewActionHandler::slotViewModeActionTriggered);
+ connect(viewModeActions, &KSelectAction::actionTriggered, this, &DolphinViewActionHandler::slotViewModeActionTriggered);
QAction *zoomInAction = KStandardAction::zoomIn(this, &DolphinViewActionHandler::zoomIn, m_actionCollection);
zoomInAction->setWhatsThis(i18nc("@info:whatsthis zoom in", "This increases the icon size."));