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(KF6_MIN_VERSION "5.102.0")
+set(QT_MIN_VERSION "6.4.0")
+set(KF6_MIN_VERSION "5.240.0")
# ECM setup
find_package(ECM ${KF6_MIN_VERSION} CONFIG REQUIRED)
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
WindowSystem
WidgetsAddons
Codecs
+ MoreTools
)
-find_package(KF6MoreTools)
-find_package(KUserFeedback 1.2.0)
+find_package(KUserFeedbackQt6 1.2.0)
set_package_properties(KUserFeedback
PROPERTIES TYPE OPTIONAL
PURPOSE "Used for submission of telemetry data"
)
-if(KUserFeedback_FOUND)
+if(KUserFeedbackQt6_FOUND)
+ message ("HAVE_KUSERFEEDBACK")
set(HAVE_KUSERFEEDBACK TRUE)
endif()
PURPOSE "For adding desktop-wide search and tagging support to dolphin"
)
-find_package(KF6BalooWidgets 19.07.70)
+find_package(KF6BalooWidgets 23.07.70)
set_package_properties(KF6BalooWidgets PROPERTIES DESCRIPTION "Baloos Widgets"
URL "https://www.kde.org"
TYPE OPTIONAL
set(HAVE_TERMINAL TRUE)
endif()
-ecm_set_disabled_deprecation_versions(
- QT 5.15
- KF 5.90
-)
-
add_subdirectory(src)
add_subdirectory(doc)
KF6::WindowSystem
KF6::WidgetsAddons
KF6::Codecs
+ KF6::KCMUtils
KF6::MoreTools
)
if (HAVE_KUSERFEEDBACK)
target_link_libraries(
dolphinstatic
- KUserFeedbackCore
- KUserFeedbackWidgets
+ KUserFeedbackCoreQt6
+ KUserFeedbackWidgetsQt6
)
endif()
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()
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};
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.
#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);
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();
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);
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);
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();
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());
}
// 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();
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);
Q_OBJECT
public:
- DolphinGeneralConfigModule(QWidget *parent, const QVariantList &args);
+ DolphinGeneralConfigModule(QObject *parent, const KPluginMetaData &data);
~DolphinGeneralConfigModule() override;
void save() override;
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, {});
}
Q_OBJECT
public:
- DolphinNavigationConfigModule(QWidget *parent, const QVariantList &args);
+ DolphinNavigationConfigModule(QObject *parent);
~DolphinNavigationConfigModule() override;
void save() override;
#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);
Q_OBJECT
public:
- DolphinViewModesConfigModule(QWidget *parent, const QVariantList &args);
+ DolphinViewModesConfigModule(QObject *parent, const KPluginMetaData &data);
~DolphinViewModesConfigModule() override;
void save() override;
#include "trashsettingspage.h"
-#include <KCModuleProxy>
+#include <KCModuleLoader>
+#include <KCModule>
#include <KPluginMetaData>
#include <QFormLayout>
{
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()
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();
}
#include "settings/settingspagebase.h"
-class KCModuleProxy;
+class KCModule;
/**
* @brief Tab page for the 'Trash' settings of the Dolphin settings dialog, it uses the KCM.
private:
void loadSettings();
- KCModuleProxy *m_proxy;
+ KCModule *m_kcm;
};
#endif