]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Merge branch 'master' into kf6
authorMéven Car <meven@kde.org>
Mon, 8 May 2023 15:46:51 +0000 (17:46 +0200)
committerMéven Car <meven@kde.org>
Mon, 8 May 2023 15:46:51 +0000 (17:46 +0200)
34 files changed:
.gitlab-ci.yml
.kde-ci.yml
CMakeLists.txt
DolphinVcsConfig.cmake.in
doc/CMakeLists.txt
src/CMakeLists.txt
src/dolphincontextmenu.cpp
src/dolphinmainwindow.cpp
src/dolphinnavigatorswidgetaction.cpp
src/dolphinnewfilemenu.cpp
src/dolphinpart.cpp
src/dolphinpart_ext.cpp
src/dolphinpart_ext.h
src/dolphintabbar.cpp
src/kitemviews/kfileitemmodelrolesupdater.cpp
src/panels/places/placespanel.cpp
src/settings/contextmenu/contextmenusettingspage.cpp
src/settings/contextmenu/servicemenuinstaller/CMakeLists.txt
src/settings/general/configurepreviewplugindialog.cpp [deleted file]
src/settings/general/configurepreviewplugindialog.h [deleted file]
src/settings/general/previewssettingspage.cpp
src/settings/general/previewssettingspage.h
src/settings/kcm/kcmdolphingeneral.cpp
src/settings/kcm/kcmdolphingeneral.h
src/settings/kcm/kcmdolphinnavigation.cpp
src/settings/kcm/kcmdolphinnavigation.h
src/settings/kcm/kcmdolphinviewmodes.cpp
src/settings/kcm/kcmdolphinviewmodes.h
src/settings/serviceitemdelegate.cpp
src/settings/serviceitemdelegate.h
src/settings/trash/trashsettingspage.cpp
src/settings/trash/trashsettingspage.h
src/tests/CMakeLists.txt
src/views/dolphinviewactionhandler.cpp

index d94767a6462d987b654fdea76b19b47371886378..6c54587fa359fce765e1a556e11bff9a180be1fa 100644 (file)
@@ -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
index a3ecb80993ff06102004078d5851a522a55236f6..94853b5f55ac887a978edb71a86e4ff83f48594a 100644 (file)
@@ -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'
 
index 3fa91d8a2610c5b12abd3ae6e903676eef10a1ae..f43832ad638782ae1b7be1e44dddfe3523eba483 100644 (file)
@@ -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()
 
index b6e3d42f60954025b58d83c214622b98bff1ffbe..c73d093ed4a4e58be97e25015382ebe2bf9ed779 100644 (file)
@@ -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")
index 934f7a9ff4a9e74c38041977e3c6ca52243d099f..7527bbfa9a7ea8d15ab4f0a8e721a033fa8d93ef 100644 (file)
@@ -1,4 +1,4 @@
 
-if (KF5DocTools_FOUND)
+if (KF6DocTools_FOUND)
     kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR dolphin)
 endif()
index 97bc770d7b10f42f4fc2c213a8ab09222724747e..fedf96688f77845c7532c0f122a5db6fe868320d 100644 (file)
@@ -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
index a5b033c715f2486c2a739ff841ac5d50554480a2..8c52aac39a279c4ba421b5d8f5e386bb23b2cc3a 100644 (file)
@@ -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());
index 0094bc2e78b0f6d049f852fe505eb1e20832bcde..415f2e8b3700edad1c737372491a64b4b2d56822 100644 (file)
@@ -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);
 
index 47a2a2303454b78998a62e45b864c859b590eaf8..cb2e4bc002862cb47bc8b748fb9f623681ab6d60 100644 (file)
@@ -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.
index 8de4347b80f8e13d208de4bc942e38bb9567f7f9..43fbdf5c9dbba3ca5b9471ece28fca17f1bdf753 100644 (file)
 
 #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);
 }
 
index 64c829c2d24577172d289089a84b4e2a1ebb58c5..0af0fd6b3462f65e656b26d61d93b48e7dcb09f7 100644 (file)
 #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);
index 9028b0358cb64cbedb8b71bbf2369357beeb10af..1aa16eeaa4e8fbf48509515105d9cd0c125baee9 100644 (file)
 #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);
 }
 
index 615f14252aa59e66522876554a91356f207b08fc..7f8792fbb2135b1a0e6808737fed302354f92a7c 100644 (file)
@@ -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:
index 82695ac21a32f16ce372f95bf63a8bea6b421959..aa74e17ae6dea5949d4ce0d5edf678301e3cbd2d 100644 (file)
@@ -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);
index e0e61cd49e188dee64837845be47fbb947b4067f..8d5656dafb146cd9df5d8799eb2f2d8a896b0f45 100644 (file)
@@ -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();
index bea2f0614f54f4a5d037c1bb0c9e54f05addd9f3..2d508ba65f8198c7d263af1174d573609646cddf 100644 (file)
@@ -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());
 
index c363914d0dd89b20864657681121b514cead771a..78d8ccf8aef30b8a006c54d0093379aa7196e4d7 100644 (file)
@@ -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();
index 74576ad207868b4f6573012665497754205e64a0..603e5c2e51970e9e456786e9c3feb3dddaf2fedf 100644 (file)
@@ -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 (file)
index a391812..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2011 Peter Penz <peter.penz19@gmail.com>
- *
- * 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 (file)
index 66504cc..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2011 Peter Penz <peter.penz19@gmail.com>
- *
- * 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
index 358798f58e188b2043c2b8d3dbebed67066e0a93..fa715237a499a5729d2174a104cdb1eef9533360 100644 (file)
@@ -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);
index 2c3e4dfeffd7ffd8dc9e711f72fc8d0db235c1b0..d6d22ae218d95dd2e63d025fc9878519b426443c 100644 (file)
@@ -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();
index 25e3b6876d8d9582c04d6162f8777762c784c4d2..417979d234d868c8e8f476dbbb1d402957130ae9 100644 (file)
 
 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);
index 889317738796c1ce93922cfeb12c41b2320116d5..828332539e0750dc2b9aec47a022339774112991 100644 (file)
@@ -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;
index 63591f4fd213dd8df0f839f65b2b48f06c40e1c6..b18f00c5b1a41e54831403f9b3ec2d4eceb775e6 100644 (file)
 
 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, {});
 }
index 97d7bff85a15d5d3527c79f22933a18922fde947..a2540515597bf12066b4a2b32bc9427410600e78 100644 (file)
@@ -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;
index 50ee1361891b6df2cedf1856e5aa277a4c74d7ad..0f0068108f065ad984a6937cf86a43b8ced8257f 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <KLocalizedString>
 #include <KPluginFactory>
+#include <KCModule>
 
 #include <QDBusConnection>
 #include <QDBusMessage>
 
 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);
index 33c0b77a520eb1902c08596635022befee047188..59cbca31414129ed3c06f3888cceb4aee1a7d9e3 100644 (file)
@@ -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;
index d8f446a37b91f07ea27c631963b073cffcea3655..d95ca7918d597a934d83a81dc36fcf8e7ef6bfac 100644 (file)
@@ -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]);
index 74f7dfd6a2750462dacd54c7d2a1559ff777219f..d7b243878a6364aa5cdbe660047c9aff32e900b0 100644 (file)
@@ -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);
index 511d6b353536d1f724a4dea7e5cc74820695fc3e..d21b4833e86918986b5d947dbcb1d704924af0f2 100644 (file)
@@ -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();
 }
index b0e48a018defb506974af7cba4cb124c811493dc..a5253774cf43ff6dfa2a83bc0c9924bae10ac594 100644 (file)
@@ -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
index d4a7457cb55d5c4fcb8492197b189a01f9b40715..2495a3a595bc7404827f82cdfb63fb30e50b1cc7 100644 (file)
@@ -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)
index 32bec03df7de314c9af9274a55ead699e369a489..d30464626e6a084cd84fc6898546ac5a3afb2981 100644 (file)
@@ -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."));