Commit 0520e04b authored by Volker Krause's avatar Volker Krause
Browse files

Final bits and pieces for building with Qt6

Minor build system changes, missing includes, a changed return type
of D-Bus type registration.

With this there is only one remaining issue, the generated screencast
Wayland client code is broken (same as in all other modules using this).
parent 0a737b87
Pipeline #168292 passed with stage
in 44 seconds
......@@ -36,6 +36,9 @@ find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
QuickWidgets
Widgets
)
if (QT_MAJOR_VERSION EQUAL "6")
find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS WaylandClient)
endif()
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
CoreAddons
......
......@@ -4,6 +4,8 @@ add_definitions(-DTRANSLATION_DOMAIN="xdg-desktop-portal-kde")
include_directories(${Qt5PrintSupport_PRIVATE_INCLUDE_DIRS})
add_executable(xdg-desktop-portal-kde)
set(xdg_desktop_portal_kde_SRCS
access.cpp
accessdialog.cpp
......@@ -75,9 +77,7 @@ if (QT_MAJOR_VERSION EQUAL "5")
BASENAME zkde-screencast-unstable-v1
)
else()
# qt6_generate_wayland_protocol_client_sources(xdg-desktop-portal-kde FILES ${PLASMA_WAYLAND_PROTOCOLS_DIR}/screencast.xml
# ${CMAKE_CURRENT_SOURCE_DIR}/zkde-screencast-unstable-v1.xml
# )
qt6_generate_wayland_protocol_client_sources(xdg-desktop-portal-kde FILES ${PLASMA_WAYLAND_PROTOCOLS_DIR}/screencast.xml)
endif()
......@@ -87,7 +87,7 @@ qt_add_dbus_interface(xdg_desktop_portal_kde_SRCS ../data/org.freedesktop.Accoun
set_source_files_properties(../data/org.kde.KIOFuse.VFS.xml PROPERTIES NO_NAMESPACE TRUE)
qt_add_dbus_interface(xdg_desktop_portal_kde_SRCS ../data/org.kde.KIOFuse.VFS.xml fuse_interface)
add_executable(xdg-desktop-portal-kde ${xdg_desktop_portal_kde_SRCS})
target_sources(xdg-desktop-portal-kde PRIVATE ${xdg_desktop_portal_kde_SRCS})
target_link_libraries(xdg-desktop-portal-kde
Qt::Core
......@@ -110,6 +110,9 @@ target_link_libraries(xdg-desktop-portal-kde
KirigamiFilepicker
Wayland::Client
)
if (QT_MAJOR_VERSION EQUAL "6")
target_link_libraries(xdg-desktop-portal-kde Qt::PrintSupportPrivate)
endif()
install(TARGETS xdg-desktop-portal-kde DESTINATION ${KDE_INSTALL_LIBEXECDIR})
......
......@@ -218,3 +218,5 @@ QList<QUrl> MobileFileDialog::results() const
{
return m_results;
}
#include "moc_mobilefiledialog.cpp"
......@@ -15,7 +15,7 @@ struct PortalIcon {
QString str;
QDBusVariant data;
static int registerDBusType()
static auto registerDBusType()
{
return qDBusRegisterMetaType<PortalIcon>();
}
......
......@@ -23,6 +23,7 @@
#include <QDBusArgument>
#include <QDBusMetaType>
#include <QDataStream>
#include <QIODevice>
#include <QLoggingCategory>
Q_LOGGING_CATEGORY(XdgDesktopPortalKdeScreenCast, "xdp-kde-screencast")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment