From 2a4604e59e14ab0c784ac05cb17fdfabd7b6df1d Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Thu, 21 Nov 2024 10:56:46 +0100 Subject: [PATCH] QGenericUnixServices: avoid dbus calls on non xdg envs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: QTBUG-130884 Pick-to: 6.8 6.5 Change-Id: I2525293f776676cda63e61c3c5093045dbafcf38 Reviewed-by: Tor Arne Vestbø (cherry picked from commit 1969b1a90a79dad049694bd1540f8627d5f26875) Reviewed-by: Qt Cherry-pick Bot --- src/gui/platform/unix/qgenericunixservices.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/platform/unix/qgenericunixservices.cpp b/src/gui/platform/unix/qgenericunixservices.cpp index a36976a6937..444d6940960 100644 --- a/src/gui/platform/unix/qgenericunixservices.cpp +++ b/src/gui/platform/unix/qgenericunixservices.cpp @@ -373,6 +373,9 @@ private: QGenericUnixServices::QGenericUnixServices() { + if (desktopEnvironment() == QByteArrayLiteral("UNKNOWN")) + return; + #if QT_CONFIG(dbus) if (qEnvironmentVariableIntValue("QT_NO_XDG_DESKTOP_PORTAL") > 0) { return;