Submitted By: Douglas R. Reno Date: 2025-04-21 Initial Package Version: 0.9.1 Upstream Status: Applied Origin: Upstream (commit 796053d2ee) Description: Fixes building libportal with Qt 6.9 and later. In Qt 6.9, QGenericUnixServices was renamed to QDesktopUnixServices. Note that this is using private Qt API. This patch maintains compatibility with older versions of Qt, while adjusting to 6.9. The test for Qt6 passes as well. The issue was brought to our attention by Zhang Wen in BLFS Ticket #21429. diff -Naurp libportal-0.9.1.orig/libportal/portal-qt6.cpp libportal-0.9.1/libportal/portal-qt6.cpp --- libportal-0.9.1.orig/libportal/portal-qt6.cpp 2025-04-21 22:30:40.979853550 -0500 +++ libportal-0.9.1/libportal/portal-qt6.cpp 2025-04-21 22:32:41.287046760 -0500 @@ -31,8 +31,12 @@ #if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) #include #include +#if QT_VERSION >= QT_VERSION_CHECK(6,9,0) +#include +#else #include #endif +#endif static gboolean _xdp_parent_export_qt (XdpParent *parent, @@ -45,7 +49,11 @@ _xdp_parent_export_qt (XdpParent *parent } #if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) +#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0) + if (const auto services = dynamic_cast(QGuiApplicationPrivate::platformIntegration()->services())) +#else if (const auto services = dynamic_cast(QGuiApplicationPrivate::platformIntegration()->services())) +#endif { g_autofree char *handle = g_strdup(services->portalWindowIdentifier(w).toUtf8().constData());