aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2016-09-21 17:07:33 -0500
committerRobert Tari <robert@tari.in>2021-07-08 03:30:39 +0200
commit7244cca7fbb45f9b67e53da46731e29b0c7bb620 (patch)
tree376f362e264904e834a082f4c8f9870f53a73476 /src
parent2425f66e98b3b1d201c5d2388611edb37be0ee7e (diff)
downloadayatana-indicator-datetime-7244cca7fbb45f9b67e53da46731e29b0c7bb620.tar.gz
ayatana-indicator-datetime-7244cca7fbb45f9b67e53da46731e29b0c7bb620.tar.bz2
ayatana-indicator-datetime-7244cca7fbb45f9b67e53da46731e29b0c7bb620.zip
Use an explicit registry object so that it gets free'd when the function exits
Diffstat (limited to 'src')
-rw-r--r--src/notifications.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/notifications.cpp b/src/notifications.cpp
index 4a2c846..a0ceb6f 100644
--- a/src/notifications.cpp
+++ b/src/notifications.cpp
@@ -26,6 +26,7 @@
#ifdef HAS_LOMIRIAPPLAUNCH
#include <liblomiri-app-launch/lomiri-app-launch/appid.h>
+#include <liblomiri-app-launch/lomiri-app-launch/registry.h>
#endif
#include <uuid/uuid.h>
@@ -463,7 +464,8 @@ private:
static std::string calendar_app_id()
{
#ifdef HAS_LOMIRIAPPLAUNCH
- auto app_id = lomiri::app_launch::AppID::discover("com.lomiri.calendar");
+ auto registry = std::make_shared<lomiri::app_launch::Registry>();
+ auto app_id = lomiri::app_launch::AppID::discover(registry, "com.lomiri.calendar");
if (!app_id.empty())
// Due the use of old API by messaging_menu we need append a extra ".desktop" to the app_id.