Skip to content

Commit 3c81b4b

Browse files
felixonmarszccrs
authored andcommitted
fix: compatibility with Qt 6.9+
Qt renamed QGenericUnixServices on 6.9+: qt/qtbase@3e29267 The fix for qt/qtdeclarative@2f35c70 wasn't cherry-picked into 6.9.0. Let's change it to target 6.10.0 for now. Also fix CI for Arch Linux.
1 parent 29b7856 commit 3c81b4b

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

.github/workflows/archlinux-build-wlroots-18.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
pacman --noconfirm --noprogressbar -Syu
2222
- name: Install dep
2323
run: |
24-
pacman -Syu --noconfirm --noprogressbar base-devel qt6-base qt6-declarative cmake pkgconfig pixman wlroots wayland-protocols wlr-protocols git
24+
pacman -Syu --noconfirm --noprogressbar base-devel qt6-base qt6-declarative cmake pkgconfig pixman vulkan-headers wlroots wayland-protocols wlr-protocols git
2525
pacman -Syu --noconfirm --noprogressbar clang ninja make
2626
pacman -Syu --noconfirm --noprogressbar fakeroot meson sudo
2727
- uses: actions/checkout@v4

src/server/platformplugin/qwlrootsintegration.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@
2121
#include <QGuiApplication>
2222

2323
#include <private/qgenericunixfontdatabase_p.h>
24+
25+
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
26+
#include <private/qdesktopunixservices_p.h>
27+
#else
2428
#include <private/qgenericunixservices_p.h>
29+
#endif
30+
2531
#include <private/qgenericunixeventdispatcher_p.h>
2632
#include <private/qhighdpiscaling_p.h>
2733
#if QT_CONFIG(vulkan)
@@ -237,7 +243,11 @@ QInputDevice *QWlrootsIntegration::getInputDeviceFrom(WInputDevice *device)
237243
void QWlrootsIntegration::initialize()
238244
{
239245
if (isMaster()) {
246+
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
247+
m_services.reset(new QDesktopUnixServices);
248+
#else
240249
m_services.reset(new QGenericUnixServices);
250+
#endif
241251
}
242252

243253
if (m_onInitialized)

src/server/qtquick/wqmlcreator.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ void WQmlCreatorComponent::create(QSharedPointer<WQmlCreatorDelegateData> data)
206206

207207
auto d = QQmlComponentPrivate::get(m_delegate);
208208
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
209-
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
209+
#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
210210
if (d->m_state.isCompletePending()) {
211211
#else
212212
if (d->state.isCompletePending()) {
@@ -228,7 +228,7 @@ void WQmlCreatorComponent::create(QSharedPointer<WQmlCreatorDelegateData> data,
228228
{
229229
auto d = QQmlComponentPrivate::get(m_delegate);
230230

231-
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
231+
#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
232232
Q_ASSERT(!d->m_state.isCompletePending());
233233
#elif QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
234234
Q_ASSERT(!d->state.isCompletePending());
@@ -281,7 +281,7 @@ void WQmlCreatorComponent::create(QSharedPointer<WQmlCreatorDelegateData> data,
281281
notifyCreatorObjectAdded(creator(), data->object, initialProperties);
282282
} else {
283283
qWarning() << "WQmlCreatorComponent::create failed" << "parent=" << parent << "initialProperties=" << tmp;
284-
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
284+
#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
285285
for (auto e: d->m_state.errors)
286286
#else
287287
for (auto e: d->state.errors)

0 commit comments

Comments
 (0)