diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-08-31 16:59:09 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-08-31 16:59:09 +0200 |
commit | c623dec2d1da089ccafd02c9eda235ed4699defc (patch) | |
tree | 6e58ce183724b17b1e89550dac80e51a4865b361 /tests/test-service.cc | |
parent | 7379a3dc11eec20b947b82cc096b58a0cc0d7372 (diff) | |
parent | cacf569a9a95ea39c78b124987bf4dae72557f27 (diff) | |
download | ayatana-indicator-session-c623dec2d1da089ccafd02c9eda235ed4699defc.tar.gz ayatana-indicator-session-c623dec2d1da089ccafd02c9eda235ed4699defc.tar.bz2 ayatana-indicator-session-c623dec2d1da089ccafd02c9eda235ed4699defc.zip |
Merge branch 'tari01-pr/deprecations-warnings'
Attributes GH PR #19: https://github.com/AyatanaIndicators/ayatana-indicator-session/pull/19
Diffstat (limited to 'tests/test-service.cc')
-rw-r--r-- | tests/test-service.cc | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/tests/test-service.cc b/tests/test-service.cc index fccdb1d..196419b 100644 --- a/tests/test-service.cc +++ b/tests/test-service.cc @@ -4,16 +4,16 @@ Copyright 2012 Canonical Ltd. Authors: Charles Kerr <charles.kerr@canonical.com> -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published by the Free Software Foundation. -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along +You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -24,6 +24,13 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include "backend-mock-guest.h" #include "backend-mock-actions.h" +gboolean onMainLoopQuit(gpointer pUserData) +{ + g_main_loop_quit((GMainLoop*)pUserData); + + return FALSE; +} + /*** **** ***/ @@ -169,7 +176,7 @@ class ServiceTest: public GTestDBusFixture G_BUS_NAME_WATCHER_FLAGS_NONE, on_name_appeared, // quits the loop NULL, this, NULL); - const guint timer_id = g_timeout_add_seconds (TIME_LIMIT_SEC, (GSourceFunc)g_main_loop_quit, loop); + const guint timer_id = g_timeout_add_seconds(TIME_LIMIT_SEC, onMainLoopQuit, loop); g_main_loop_run (loop); g_source_remove (timer_id); g_bus_unwatch_name (watch_id); |