[tracker] libtracker-data: Remove unused tracker_property_type_to_string
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Remove unused tracker_property_type_to_string
- Date: Thu, 18 Mar 2010 12:39:57 +0000 (UTC)
commit 623bc68e098610644dd876f22fdcf718a92282d0
Author: Jürg Billeter <j bitron ch>
Date: Thu Mar 18 13:35:53 2010 +0100
libtracker-data: Remove unused tracker_property_type_to_string
src/libtracker-data/tracker-property.c | 46 ----------------
src/libtracker-data/tracker-property.h | 1 -
tests/libtracker-common/Makefile.am | 23 --------
tests/libtracker-common/tracker-field-test.c | 75 --------------------------
4 files changed, 0 insertions(+), 145 deletions(-)
---
diff --git a/src/libtracker-data/tracker-property.c b/src/libtracker-data/tracker-property.c
index 82ddb93..6823702 100644
--- a/src/libtracker-data/tracker-property.c
+++ b/src/libtracker-data/tracker-property.c
@@ -107,24 +107,6 @@ tracker_property_type_get_type (void)
G_DEFINE_TYPE (TrackerProperty, tracker_property, G_TYPE_OBJECT);
-const gchar *
-tracker_property_type_to_string (TrackerPropertyType fieldtype)
-{
- GType type;
- GEnumClass *enum_class;
- GEnumValue *enum_value;
-
- type = tracker_property_type_get_type ();
- enum_class = G_ENUM_CLASS (g_type_class_peek (type));
- enum_value = g_enum_get_value (enum_class, fieldtype);
-
- if (!enum_value) {
- return NULL;
- }
-
- return enum_value->value_nick;
-}
-
static void
tracker_property_class_init (TrackerPropertyClass *klass)
{
@@ -174,30 +156,6 @@ property_finalize (GObject *object)
(G_OBJECT_CLASS (tracker_property_parent_class)->finalize) (object);
}
-static gboolean
-field_int_validate (TrackerProperty *field,
- const gchar *property,
- gint value)
-{
-#ifdef G_DISABLE_CHECKS
- GParamSpec *spec;
- GValue value = { 0 };
- gboolean valid;
-
- spec = g_object_class_find_property (G_OBJECT_CLASS (field), property);
- g_return_val_if_fail (spec != NULL, FALSE);
-
- g_value_init (&value, spec->value_type);
- g_value_set_int (&value, verbosity);
- valid = g_param_value_validate (spec, &value);
- g_value_unset (&value);
-
- g_return_val_if_fail (valid != TRUE, FALSE);
-#endif
-
- return TRUE;
-}
-
/**
* tracker_property_new:
*
@@ -561,10 +519,6 @@ tracker_property_set_weight (TrackerProperty *field,
TrackerPropertyPriv *priv;
g_return_if_fail (TRACKER_IS_PROPERTY (field));
- if (!field_int_validate (field, "weight", value)) {
- return;
- }
-
priv = GET_PRIV (field);
priv->weight = value;
diff --git a/src/libtracker-data/tracker-property.h b/src/libtracker-data/tracker-property.h
index 42a4bb0..052e7c4 100644
--- a/src/libtracker-data/tracker-property.h
+++ b/src/libtracker-data/tracker-property.h
@@ -47,7 +47,6 @@ typedef enum {
} TrackerPropertyType;
GType tracker_property_type_get_type (void) G_GNUC_CONST;
-const gchar *tracker_property_type_to_string (TrackerPropertyType fieldtype);
/*
* TrackerProperty
diff --git a/tests/libtracker-common/Makefile.am b/tests/libtracker-common/Makefile.am
index 986e289..e52f392 100644
--- a/tests/libtracker-common/Makefile.am
+++ b/tests/libtracker-common/Makefile.am
@@ -2,17 +2,6 @@ include $(top_srcdir)/Makefile.decl
noinst_PROGRAMS = $(TEST_PROGS)
-#
-# NOTE: Some of these tests have been disabled (by Martyn) temporarily
-# because make distcheck fails. The reason for this is that it
-# depends files being installed to $prefix/share which have not
-# been installed at this point.
-#
-# These tests include:
-#
-# tracker-field
-#
-
TEST_PROGS += \
tracker-dbus \
tracker-type-utils \
@@ -67,16 +56,4 @@ tracker_file_utils_LDADD = \
$(GLIB2_LIBS) \
$(GCOV_LIBS)
-# tracker_property_SOURCES = \
-# tracker-field-test.c
-#
-# tracker_property_LDADD = \
-# $(top_builddir)/tests/common/libtracker-testcommon.la \
-# $(top_builddir)/src/libtracker-common/libtracker-common.la \
-# $(PANGO_LIBS) \
-# $(GMODULE_LIBS) \
-# $(GTHREAD_LIBS) \
-# $(GLIB2_LIBS) \
-# $(GCOV_LIBS)
-
EXTRA_DIST = non-utf8.txt
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]