Skip to content

Commit 796053d

Browse files
gruljaGeorgesStavracas
authored andcommitted
qt6: fix build against Qt 6.9+
QGenericUnixServices was renamed to QDesktopUnixServices in Qt 6.9. Upstream change: https://codereview.qt-project.org/c/qt/qtbase/+/609639
1 parent 588ffe1 commit 796053d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

libportal/portal-qt6.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,12 @@
3131
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
3232
#include <qpa/qplatformintegration.h>
3333
#include <private/qguiapplication_p.h>
34+
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
35+
#include <private/qdesktopunixservices_p.h>
36+
#else
3437
#include <private/qgenericunixservices_p.h>
3538
#endif
39+
#endif
3640

3741
static gboolean
3842
_xdp_parent_export_qt (XdpParent *parent,
@@ -45,7 +49,11 @@ _xdp_parent_export_qt (XdpParent *parent,
4549
}
4650

4751
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
52+
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
53+
if (const auto services = dynamic_cast<QDesktopUnixServices*>(QGuiApplicationPrivate::platformIntegration()->services()))
54+
#else
4855
if (const auto services = dynamic_cast<QGenericUnixServices*>(QGuiApplicationPrivate::platformIntegration()->services()))
56+
#endif
4957
{
5058
g_autofree char *handle = g_strdup(services->portalWindowIdentifier(w).toUtf8().constData());
5159

0 commit comments

Comments
 (0)