fix: kded6 uses offscreen QPA on Redox — Qt6 Wayland crashes at null+8

kded6's detectPlatform() forces QT_QPA_PLATFORM=wayland regardless
of external environment. On Redox, Qt6 Wayland QPA crashes during
wl_registry init (page fault at null+8). kded6 is a headless
D-Bus daemon — it does not need Wayland.

Added #ifdef Q_OS_REDOX guard: use 'offscreen' instead of 'wayland'.
Combined with libwayland null guards, this provides defense in depth
against the Qt6 Wayland crash on Redox.
This commit is contained in:
2026-05-06 13:49:52 +01:00
parent 9f19ecf7b6
commit 652af71a9c
@@ -575,7 +575,13 @@ static bool detectPlatform(int argc, char **argv)
return false;
}
if (qstrcmp(sessionType.data(), "wayland") == 0) {
#ifdef Q_OS_REDOX
// Qt6 Wayland QPA crashes at null+8 during wl_registry init on Redox.
// kded6 is a headless D-Bus daemon — use offscreen platform instead.
qputenv("QT_QPA_PLATFORM", "offscreen");
#else
qputenv("QT_QPA_PLATFORM", "wayland");
#endif
return true;
} else if (qstrcmp(sessionType.data(), "x11") == 0) {
qputenv("QT_QPA_PLATFORM", "xcb");