From dff8a0f5ade8bf8b12c92625496c8a85b983d83a Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 13 Jan 2014 18:03:38 +0100 Subject: [PATCH 06/12] remove 'testmode' on log stores It's not used any more and wasn't pretty anyway. --- telepathy-logger/log-manager.c | 7 ------- telepathy-logger/log-store-pidgin.c | 20 -------------------- telepathy-logger/log-store-xml.c | 19 ------------------- tests/logger/dbus/test-tpl-log-iter-pidgin.c | 1 - tests/logger/dbus/test-tpl-log-iter-xml.c | 1 - tests/logger/dbus/test-tpl-log-store-pidgin.c | 1 - tests/logger/dbus/test-tpl-log-store-xml.c | 1 - 7 files changed, 50 deletions(-) diff --git a/telepathy-logger/log-manager.c b/telepathy-logger/log-manager.c index 3b89ad5..ff5f418 100644 --- a/telepathy-logger/log-manager.c +++ b/telepathy-logger/log-manager.c @@ -194,13 +194,6 @@ add_log_store (TplLogManager *self, { g_return_if_fail (TPL_IS_LOG_STORE (store)); - /* set the log store in "testmode" if it supports it and the environment is - * currently in test mode */ - if (g_object_class_find_property (G_OBJECT_GET_CLASS (store), "testmode")) - g_object_set (store, - "testmode", (g_getenv ("TPL_TEST_MODE") != NULL), - NULL); - if (!_tpl_log_manager_register_log_store (self, store)) CRITICAL ("Failed to register store name=%s", _tpl_log_store_get_name (store)); diff --git a/telepathy-logger/log-store-pidgin.c b/telepathy-logger/log-store-pidgin.c index 927c3fd..491edce 100644 --- a/telepathy-logger/log-store-pidgin.c +++ b/telepathy-logger/log-store-pidgin.c @@ -46,7 +46,6 @@ struct _TplLogStorePidginPriv { - gboolean test_mode; TpAccountManager *account_manager; gchar *basedir; @@ -55,7 +54,6 @@ struct _TplLogStorePidginPriv enum { PROP_0, PROP_READABLE, - PROP_TESTMODE, }; @@ -81,16 +79,11 @@ tpl_log_store_pidgin_get_property (GObject *object, GValue *value, GParamSpec *pspec) { - TplLogStorePidginPriv *priv = TPL_LOG_STORE_PIDGIN (object)->priv; - switch (param_id) { case PROP_READABLE: g_value_set_boolean (value, TRUE); break; - case PROP_TESTMODE: - g_value_set_boolean (value, priv->test_mode); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); break; @@ -104,13 +97,8 @@ tpl_log_store_pidgin_set_property (GObject *object, const GValue *value, GParamSpec *pspec) { - TplLogStorePidgin *self = TPL_LOG_STORE_PIDGIN (object); - switch (param_id) { - case PROP_TESTMODE: - self->priv->test_mode = g_value_get_boolean (value); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); break; @@ -135,7 +123,6 @@ static void tpl_log_store_pidgin_class_init (TplLogStorePidginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - GParamSpec *param_spec; object_class->get_property = tpl_log_store_pidgin_get_property; object_class->set_property = tpl_log_store_pidgin_set_property; @@ -143,13 +130,6 @@ tpl_log_store_pidgin_class_init (TplLogStorePidginClass *klass) g_object_class_override_property (object_class, PROP_READABLE, "readable"); - param_spec = g_param_spec_boolean ("testmode", - "TestMode", - "Whether the logstore is in testmode, for testsuite use only", - FALSE, G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS); - g_object_class_install_property (object_class, PROP_TESTMODE, param_spec); - - g_type_class_add_private (object_class, sizeof (TplLogStorePidginPriv)); } diff --git a/telepathy-logger/log-store-xml.c b/telepathy-logger/log-store-xml.c index 2207466..34b896a 100644 --- a/telepathy-logger/log-store-xml.c +++ b/telepathy-logger/log-store-xml.c @@ -80,14 +80,12 @@ struct _TplLogStoreXmlPriv { gchar *basedir; - gboolean test_mode; TpAccountManager *account_manager; }; enum { PROP_0, PROP_READABLE, - PROP_TESTMODE }; static void log_store_iface_init (gpointer g_iface, gpointer iface_data); @@ -147,16 +145,11 @@ tpl_log_store_xml_get_property (GObject *object, GValue *value, GParamSpec *pspec) { - TplLogStoreXmlPriv *priv = TPL_LOG_STORE_XML (object)->priv; - switch (param_id) { case PROP_READABLE: g_value_set_boolean (value, TRUE); break; - case PROP_TESTMODE: - g_value_set_boolean (value, priv->test_mode); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); break; @@ -170,13 +163,8 @@ tpl_log_store_xml_set_property (GObject *object, const GValue *value, GParamSpec *pspec) { - TplLogStoreXml *self = TPL_LOG_STORE_XML (object); - switch (param_id) { - case PROP_TESTMODE: - self->priv->test_mode = g_value_get_boolean (value); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); break; @@ -188,7 +176,6 @@ static void _tpl_log_store_xml_class_init (TplLogStoreXmlClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - GParamSpec *param_spec; object_class->finalize = log_store_xml_finalize; object_class->dispose = log_store_xml_dispose; @@ -197,12 +184,6 @@ _tpl_log_store_xml_class_init (TplLogStoreXmlClass *klass) g_object_class_override_property (object_class, PROP_READABLE, "readable"); - param_spec = g_param_spec_boolean ("testmode", - "TestMode", - "Whether the logstore is in testmode, for testsuite use only", - FALSE, G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS); - g_object_class_install_property (object_class, PROP_TESTMODE, param_spec); - g_type_class_add_private (object_class, sizeof (TplLogStoreXmlPriv)); } diff --git a/tests/logger/dbus/test-tpl-log-iter-pidgin.c b/tests/logger/dbus/test-tpl-log-iter-pidgin.c index 48810e8..76f3240 100644 --- a/tests/logger/dbus/test-tpl-log-iter-pidgin.c +++ b/tests/logger/dbus/test-tpl-log-iter-pidgin.c @@ -56,7 +56,6 @@ setup (PidginTestCaseFixture* fixture, g_assert (fixture->main_loop != NULL); fixture->store = g_object_new (TPL_TYPE_LOG_STORE_PIDGIN, - "testmode", TRUE, NULL); fixture->bus = tp_tests_dbus_daemon_dup_or_die (); diff --git a/tests/logger/dbus/test-tpl-log-iter-xml.c b/tests/logger/dbus/test-tpl-log-iter-xml.c index ae3aa48..b028edb 100644 --- a/tests/logger/dbus/test-tpl-log-iter-xml.c +++ b/tests/logger/dbus/test-tpl-log-iter-xml.c @@ -37,7 +37,6 @@ setup (XmlTestCaseFixture* fixture, fixture->main_loop = g_main_loop_new (NULL, FALSE); fixture->store = g_object_new (TPL_TYPE_LOG_STORE_XML, - "testmode", TRUE, NULL); fixture->bus = tp_tests_dbus_daemon_dup_or_die (); diff --git a/tests/logger/dbus/test-tpl-log-store-pidgin.c b/tests/logger/dbus/test-tpl-log-store-pidgin.c index ecd1cf6..255e6ee 100644 --- a/tests/logger/dbus/test-tpl-log-store-pidgin.c +++ b/tests/logger/dbus/test-tpl-log-store-pidgin.c @@ -176,7 +176,6 @@ setup (PidginTestCaseFixture* fixture, DEBUG ("basedir is %s", fixture->basedir); fixture->store = g_object_new (TPL_TYPE_LOG_STORE_PIDGIN, - "testmode", TRUE, NULL); fixture->room = tpl_entity_new_from_room_id ( diff --git a/tests/logger/dbus/test-tpl-log-store-xml.c b/tests/logger/dbus/test-tpl-log-store-xml.c index 14ad21d..10f190c 100644 --- a/tests/logger/dbus/test-tpl-log-store-xml.c +++ b/tests/logger/dbus/test-tpl-log-store-xml.c @@ -37,7 +37,6 @@ setup (XmlTestCaseFixture* fixture, fixture->main_loop = g_main_loop_new (NULL, FALSE); fixture->store = g_object_new (TPL_TYPE_LOG_STORE_XML, - "testmode", TRUE, NULL); if (fixture->tmp_basedir != NULL) -- 1.8.4.2