From a7bd656cf40b0cf7ee7f96e6c59974804a4894ba Mon Sep 17 00:00:00 2001 From: Harald Sitter Date: Mon, 17 Oct 2022 11:43:30 +0200 Subject: offer an opt out of automatic xdg-desktop-portal use this allows users to skip over the portal invocation if it is undesirable (e.g. during early stages of session setup on KDE's Plasma) Change-Id: I43e3c3a59b9bb71c77012f8f0ec7ad7ba904a050 Reviewed-by: David Edmundson --- 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 eb66e5b1a4..892854fae3 100644 --- a/src/gui/platform/unix/qgenericunixservices.cpp +++ b/src/gui/platform/unix/qgenericunixservices.cpp @@ -347,6 +347,9 @@ private: QGenericUnixServices::QGenericUnixServices() { #if QT_CONFIG(dbus) + if (qEnvironmentVariableIntValue("QT_NO_XDG_DESKTOP_PORTAL") > 0) { + return; + } QDBusMessage message = QDBusMessage::createMethodCall( "org.freedesktop.portal.Desktop"_L1, "/org/freedesktop/portal/desktop"_L1, "org.freedesktop.DBus.Properties"_L1, "Get"_L1); -- cgit v1.2.3