aboutsummaryrefslogtreecommitdiff
path: root/tests/manual-test-snap.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-10-06 12:39:49 -0500
committerRobert Tari <robert@tari.in>2021-07-08 04:19:18 +0200
commit0e7d17165316c373dcf936bc5b56fb39f17283a4 (patch)
tree49a596d2cf51a5c27846cd26007420ad89507f01 /tests/manual-test-snap.cpp
parent34f44f959b63d64f0eec2f16e322796a5bea7c3a (diff)
downloadayatana-indicator-datetime-0e7d17165316c373dcf936bc5b56fb39f17283a4.tar.gz
ayatana-indicator-datetime-0e7d17165316c373dcf936bc5b56fb39f17283a4.tar.bz2
ayatana-indicator-datetime-0e7d17165316c373dcf936bc5b56fb39f17283a4.zip
In main.cpp and tests where Snap is instantiated, provide the system_bus to Snap's constructor
Diffstat (limited to 'tests/manual-test-snap.cpp')
-rw-r--r--tests/manual-test-snap.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/manual-test-snap.cpp b/tests/manual-test-snap.cpp
index 02cbb9f..72fd374 100644
--- a/tests/manual-test-snap.cpp
+++ b/tests/manual-test-snap.cpp
@@ -95,10 +95,12 @@ int main(int argc, const char* argv[])
auto notification_engine = std::make_shared<ain::Engine>("ayatana-indicator-datetime-service");
auto sound_builder = std::make_shared<ain::DefaultSoundBuilder>();
- Snap snap (notification_engine, settings);
+ auto system_bus = g_bus_get_sync(G_BUS_TYPE_SYSTEM, nullptr, nullptr);
+ Snap snap (notification_engine, sound_builder, settings, system_bus);
snap(a, a.alarms.front(), on_response);
g_main_loop_run(loop);
g_main_loop_unref(loop);
+ g_clear_object(&system_bus);
return 0;
}