┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2022-03-15 13:30:13 +0100
committerLaurent Montel <[email protected]>2022-03-15 13:30:13 +0100
commitc6bccbf6de33ba907f1cddfa64dadb8cfeea4d2c (patch)
treee94096e471e2f4aa51f6cda17290193b0c490dbc
parentdb16b7d1cd6ec28399339d58f5f331587aafca44 (diff)
Fix some compile error against qt6
-rw-r--r--CMakeLists.txt8
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/kitemviews/kfileitemmodel.cpp2
-rw-r--r--src/kitemviews/kstandarditemlistwidget.cpp4
-rw-r--r--src/trash/dolphintrash.h2
5 files changed, 11 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 021be0cf3..e19f6c233 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,7 +69,7 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
WindowSystem
)
-find_package(KUserFeedback 1.0.0)
+find_package(KUserFeedback 1.2.0)
set_package_properties(KUserFeedback
PROPERTIES TYPE OPTIONAL
PURPOSE "Used for submission of telemetry data"
@@ -91,13 +91,13 @@ set_package_properties(KF5Activities PROPERTIES DESCRIPTION "KActivities librari
find_package(Phonon4Qt${QT_MAJOR_VERSION} CONFIG REQUIRED)
-find_package(PackageKitQt5)
-set_package_properties(PackageKitQt5
+find_package(PackageKitQt${QT_MAJOR_VERSION})
+set_package_properties(PackageKitQt${QT_MAJOR_VERSION}
PROPERTIES DESCRIPTION "Software Manager integration"
TYPE OPTIONAL
PURPOSE "Used in the service menu installer"
)
-if(PackageKitQt5_FOUND)
+if(PackageKitQt${QT_MAJOR_VERSION}_FOUND)
set(HAVE_PACKAGEKIT TRUE)
endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index bb898b5a7..2e8555cbc 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -307,7 +307,7 @@ target_link_libraries(dolphinstatic
KF5::KCMUtils
KF5::DBusAddons
KF5::Notifications
- Phonon::phonon4qt5
+ Phonon::phonon4qt${QT_MAJOR_VERSION}
)
if (HAVE_KACTIVITIES)
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp
index 6391d7d3f..052a71cbd 100644
--- a/src/kitemviews/kfileitemmodel.cpp
+++ b/src/kitemviews/kfileitemmodel.cpp
@@ -15,7 +15,7 @@
#include <KDirLister>
#include <KIO/Job>
-#include <KIO/kio_version.h>
+#include <kio_version.h>
#include <KLocalizedString>
#include <KLazyLocalizedString>
#include <KUrlMimeData>
diff --git a/src/kitemviews/kstandarditemlistwidget.cpp b/src/kitemviews/kstandarditemlistwidget.cpp
index d04ef370b..db4e4a90e 100644
--- a/src/kitemviews/kstandarditemlistwidget.cpp
+++ b/src/kitemviews/kstandarditemlistwidget.cpp
@@ -1211,7 +1211,11 @@ QString KStandardItemListWidget::elideRightKeepExtension(const QString &text, in
QString ret = m_customizedFontMetrics.elidedText(text.chopped(extensionLength),
Qt::ElideRight,
elidingWidth - extensionWidth);
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
ret.append(text.rightRef(extensionLength));
+#else
+ ret.append(QStringView(text).right(extensionLength));
+#endif
return ret;
}
}
diff --git a/src/trash/dolphintrash.h b/src/trash/dolphintrash.h
index 12f10f101..2ee85e89a 100644
--- a/src/trash/dolphintrash.h
+++ b/src/trash/dolphintrash.h
@@ -11,7 +11,7 @@
#include <QWidget>
#include <KIO/EmptyTrashJob>
-#include <KIOWidgets/KDirLister>
+#include <KDirLister>
class Trash: public QObject
{