From f4efa6641726bd1074b39ff835acddcdf365475c Mon Sep 17 00:00:00 2001 From: Tiernan Hubble Date: Thu, 1 Jun 2023 19:41:27 -0600 Subject: [PATCH] Apply qt6 changes to KDE download manager integration. --- src/lib/downloads/downloadmanagermodel.cpp | 4 ++++ src/plugins/KDEFrameworksIntegration/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/downloads/downloadmanagermodel.cpp b/src/lib/downloads/downloadmanagermodel.cpp index b41cc22fa..fb35ead16 100644 --- a/src/lib/downloads/downloadmanagermodel.cpp +++ b/src/lib/downloads/downloadmanagermodel.cpp @@ -33,7 +33,11 @@ QVariant DownloadManagerModel::data(const QModelIndex &index, int role) const { if (role == Qt::DisplayRole) { const DownloadItem *item = m_downloads.at(index.row()); +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) return item; +#else + return QVariant::fromValue(item); +#endif } return QVariant(); } diff --git a/src/plugins/KDEFrameworksIntegration/CMakeLists.txt b/src/plugins/KDEFrameworksIntegration/CMakeLists.txt index f5dcc7c5c..fd2474161 100644 --- a/src/plugins/KDEFrameworksIntegration/CMakeLists.txt +++ b/src/plugins/KDEFrameworksIntegration/CMakeLists.txt @@ -26,5 +26,5 @@ target_link_libraries(KDEFrameworksIntegration KF${KF_MAJOR_VERSION}::Crash KF${KF_MAJOR_VERSION}::CoreAddons KF${KF_MAJOR_VERSION}::PurposeWidgets - KF5::JobWidgets + KF${KF_MAJOR_VERSION}::JobWidgets )