1
0
mirror of https://invent.kde.org/system/dolphin synced 2024-07-02 16:31:23 +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
)
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()

View File

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

View File

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

View File

@ -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;
}
}

View File

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