1
0
mirror of https://invent.kde.org/system/dolphin synced 2024-07-04 17:30:55 +00:00

Fix some compile error against qt6

This commit is contained in:
Laurent Montel 2022-03-15 13:30:13 +01:00
parent db16b7d1cd
commit c6bccbf6de
5 changed files with 11 additions and 7 deletions

View File

@ -69,7 +69,7 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
WindowSystem WindowSystem
) )
find_package(KUserFeedback 1.0.0) find_package(KUserFeedback 1.2.0)
set_package_properties(KUserFeedback set_package_properties(KUserFeedback
PROPERTIES TYPE OPTIONAL PROPERTIES TYPE OPTIONAL
PURPOSE "Used for submission of telemetry data" 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(Phonon4Qt${QT_MAJOR_VERSION} CONFIG REQUIRED)
find_package(PackageKitQt5) find_package(PackageKitQt${QT_MAJOR_VERSION})
set_package_properties(PackageKitQt5 set_package_properties(PackageKitQt${QT_MAJOR_VERSION}
PROPERTIES DESCRIPTION "Software Manager integration" PROPERTIES DESCRIPTION "Software Manager integration"
TYPE OPTIONAL TYPE OPTIONAL
PURPOSE "Used in the service menu installer" PURPOSE "Used in the service menu installer"
) )
if(PackageKitQt5_FOUND) if(PackageKitQt${QT_MAJOR_VERSION}_FOUND)
set(HAVE_PACKAGEKIT TRUE) set(HAVE_PACKAGEKIT TRUE)
endif() endif()

View File

@ -307,7 +307,7 @@ target_link_libraries(dolphinstatic
KF5::KCMUtils KF5::KCMUtils
KF5::DBusAddons KF5::DBusAddons
KF5::Notifications KF5::Notifications
Phonon::phonon4qt5 Phonon::phonon4qt${QT_MAJOR_VERSION}
) )
if (HAVE_KACTIVITIES) if (HAVE_KACTIVITIES)

View File

@ -15,7 +15,7 @@
#include <KDirLister> #include <KDirLister>
#include <KIO/Job> #include <KIO/Job>
#include <KIO/kio_version.h> #include <kio_version.h>
#include <KLocalizedString> #include <KLocalizedString>
#include <KLazyLocalizedString> #include <KLazyLocalizedString>
#include <KUrlMimeData> #include <KUrlMimeData>

View File

@ -1211,7 +1211,11 @@ QString KStandardItemListWidget::elideRightKeepExtension(const QString &text, in
QString ret = m_customizedFontMetrics.elidedText(text.chopped(extensionLength), QString ret = m_customizedFontMetrics.elidedText(text.chopped(extensionLength),
Qt::ElideRight, Qt::ElideRight,
elidingWidth - extensionWidth); elidingWidth - extensionWidth);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
ret.append(text.rightRef(extensionLength)); ret.append(text.rightRef(extensionLength));
#else
ret.append(QStringView(text).right(extensionLength));
#endif
return ret; return ret;
} }
} }

View File

@ -11,7 +11,7 @@
#include <QWidget> #include <QWidget>
#include <KIO/EmptyTrashJob> #include <KIO/EmptyTrashJob>
#include <KIOWidgets/KDirLister> #include <KDirLister>
class Trash: public QObject class Trash: public QObject
{ {