Linux: Fix building with Qt 6.9

This commit is contained in:
Kovid Goyal 2025-04-05 02:59:58 +05:30
parent 1973cdb7d6
commit 30b66dc452
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 1 deletions

View File

@ -27,7 +27,13 @@ QT_BEGIN_NAMESPACE
#ifndef __APPLE__ #ifndef __APPLE__
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
#include <QtGui/private/qgenericunixservices_p.h>
class GenericUnixServices : public QGenericUnixServices { class GenericUnixServices : public QGenericUnixServices {
#else
#include <QtGui/private/qdesktopunixservices_p.h>
class GenericUnixServices : public QDesktopUnixServices {
#endif
/* We must return desktop environment as UNKNOWN otherwise other parts of /* We must return desktop environment as UNKNOWN otherwise other parts of
* Qt will try to query the nativeInterface() without checking if it exists * Qt will try to query the nativeInterface() without checking if it exists
* leading to a segfault. For example, defaultHintStyleFromMatch() queries * leading to a segfault. For example, defaultHintStyleFromMatch() queries

View File

@ -3,7 +3,6 @@
#include <qpa/qplatformintegration.h> #include <qpa/qplatformintegration.h>
#include <qpa/qplatformscreen.h> #include <qpa/qplatformscreen.h>
#include <qpa/qplatformservices.h> #include <qpa/qplatformservices.h>
#include <QtGui/private/qgenericunixservices_p.h>
#include <QScopedPointer> #include <QScopedPointer>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE