summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Sitter <sitter@kde.org>2022-10-17 11:43:30 +0200
committerHarald Sitter <sitter@kde.org>2022-10-22 17:35:49 +0200
commita7bd656cf40b0cf7ee7f96e6c59974804a4894ba (patch)
tree976e3052fb44cfdde87f3921a2f26806c6f655b6
parent311e508154e7fa5a114ca46c8daed4d43d96b938 (diff)
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 <davidedmundson@kde.org>
-rw-r--r--src/gui/platform/unix/qgenericunixservices.cpp3
1 files changed, 3 insertions, 0 deletions
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);