Skip to content

Commit

Permalink
Fix service name used for DBus registration
Browse files Browse the repository at this point in the history
  • Loading branch information
travier committed May 26, 2023
1 parent 60730cf commit 997590f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
34 changes: 34 additions & 0 deletions 0001-fix-app-domain.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 356322cfade88bd82623b5efb63b8de8ed55296a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= <tim@siosm.fr>
Date: Thu, 25 May 2023 12:26:34 +0200
Subject: [PATCH] Set OrganizationDomain before registering the DBus service

The OrganizationDomain is used by KDBusAddons to generate the service
name used to register on the session bus so we need to set it up before
we try registering on the bus.

See: https://bugs.kde.org/show_bug.cgi?id=470246
See: https://github.com/flathub/org.kde.kleopatra/issues/34

CCBUG: 470246
---
src/main.cpp | 3 +++
1 file changed, 3 insertions(+)

diff --git a/src/main.cpp b/src/main.cpp
index d39455bf..e7cd5af6 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -109,6 +109,9 @@ int main(int argc, char **argv)
#endif

KleopatraApplication app(argc, argv);
+ // Set OrganizationDOmain early as this is used to generate the service
+ // name that will be registered on the bus.
+ app.setOrganizationDomain(QStringLiteral("kde.org"));

STARTUP_TIMING << "Application created";
/* Create the unique service ASAP to prevent double starts if
--
2.40.1

4 changes: 4 additions & 0 deletions org.kde.kleopatra.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@
"stable-only": true,
"url-template": "https://download.kde.org/stable/release-service/$version/src/kleopatra-$version.tar.xz"
}
},
{
"type": "patch",
"path": "0001-fix-app-domain.patch"
}
]
}
Expand Down

0 comments on commit 997590f

Please sign in to comment.