Commit e912ec46 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

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
parent 7ace568d
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment