[evolution-data-server/openismus-work: 52/52] tests: Don't use g_ensure_type() yet
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/openismus-work: 52/52] tests: Don't use g_ensure_type() yet
- Date: Thu, 22 Nov 2012 04:31:27 +0000 (UTC)
commit d0ad7bd91737b0b807aedf036269be5006da8a80
Author: Mathias Hasselmann <mathias openismus com>
Date: Thu Nov 22 04:57:41 2012 +0100
tests: Don't use g_ensure_type() yet
Seems this function got used by accident, since other places
use the REGISTER_TYPE() macro together with a FIXME comment
still.
tests/libebook/client/test-client-custom-summary.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/tests/libebook/client/test-client-custom-summary.c b/tests/libebook/client/test-client-custom-summary.c
index 6000223..7e97d4d 100644
--- a/tests/libebook/client/test-client-custom-summary.c
+++ b/tests/libebook/client/test-client-custom-summary.c
@@ -6,6 +6,12 @@
#include "client-test-utils.h"
+/* This forces the GType to be registered in a way that
+ * avoids a "statement with no effect" compiler warning.
+ * FIXME Use g_type_ensure() once we require GLib 2.34. */
+#define REGISTER_TYPE(type) \
+ (g_type_class_unref (g_type_class_ref (type)))
+
/****************************** Custom Book Creation *****************************/
@@ -61,7 +67,7 @@ register_source_idle (CreateBookData *data)
backend = e_source_get_extension (data->scratch, E_SOURCE_EXTENSION_ADDRESS_BOOK);
e_source_backend_set_backend_name (backend, "local");
- g_type_ensure (E_TYPE_SOURCE_BACKEND_SUMMARY_SETUP);
+ REGISTER_TYPE (E_TYPE_SOURCE_BACKEND_SUMMARY_SETUP);
setup = e_source_get_extension (data->scratch, E_SOURCE_EXTENSION_BACKEND_SUMMARY_SETUP);
e_source_backend_summary_setup_set_summary_fields (setup,
E_CONTACT_FULL_NAME,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]