File 0001-Introduce-KDE_NO_GLOBAL_MENU-env-variable-to-disable.patch of Package plasma5-integration

From e912ec46eaf620eacfbff37a0d85e408350427d5 Mon Sep 17 00:00:00 2001
From: Kai Uwe Broulik <kde@privat.broulik.de>
Date: Wed, 21 Jun 2017 12:17:16 +0200
Subject: [PATCH] Introduce KDE_NO_GLOBAL_MENU env variable to disable global
 menu

This allows to run specific Qt applications with global menu disabled in case of issues.

Differential Revision: https://phabricator.kde.org/D6310
---
 src/platformtheme/kdeplatformtheme.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/platformtheme/kdeplatformtheme.cpp b/src/platformtheme/kdeplatformtheme.cpp
index 994e1f2..1f026c0 100644
--- a/src/platformtheme/kdeplatformtheme.cpp
+++ b/src/platformtheme/kdeplatformtheme.cpp
@@ -64,6 +64,10 @@ static const QByteArray s_waylandAppMenuObjectPathPropertyName = QByteArrayLiter
 
 static bool checkDBusGlobalMenuAvailable()
 {
+    if (qEnvironmentVariableIsSet("KDE_NO_GLOBAL_MENU")) {
+        return false;
+    }
+
     QDBusConnection connection = QDBusConnection::sessionBus();
     QString registrarService = QStringLiteral("com.canonical.AppMenu.Registrar");
     return connection.interface()->isServiceRegistered(registrarService);
-- 
2.13.0

openSUSE Build Service is sponsored by