[tracker/gdbus] plugins/evolution: Remove unneeded g_utf8_validate
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/gdbus] plugins/evolution: Remove unneeded g_utf8_validate
- Date: Thu, 28 Oct 2010 14:08:17 +0000 (UTC)
commit 7d4ff99ea170e66855bf03e33c044d5c0f99911e
Author: Philip Van Hoof <philip codeminded be>
Date: Thu Oct 28 16:07:42 2010 +0200
plugins/evolution: Remove unneeded g_utf8_validate
This was already validated everywhere
src/plugins/evolution/tracker-evolution-plugin.c | 46 ++++++++++------------
1 files changed, 21 insertions(+), 25 deletions(-)
---
diff --git a/src/plugins/evolution/tracker-evolution-plugin.c b/src/plugins/evolution/tracker-evolution-plugin.c
index d2a5fed..81d7f6d 100644
--- a/src/plugins/evolution/tracker-evolution-plugin.c
+++ b/src/plugins/evolution/tracker-evolution-plugin.c
@@ -434,45 +434,41 @@ static void
add_contact (TrackerSparqlBuilder *sparql, const gchar *predicate, const gchar *uri, const gchar *value)
{
gchar *email = NULL, *fullname = NULL;
+ gchar *email_uri;
get_email_and_fullname (value, &email, &fullname);
- if ((email && g_utf8_validate (email, -1, NULL)) && (fullname && g_utf8_validate (fullname, -1, NULL))) {
- gchar *email_uri;
+ email_uri = g_strdup_printf ("mailto:%s", email);
- email_uri = g_strdup_printf ("mailto:%s", email);
-
- tracker_sparql_builder_subject_iri (sparql, email_uri);
- tracker_sparql_builder_predicate (sparql, "a");
- tracker_sparql_builder_object (sparql, "nco:EmailAddress");
+ tracker_sparql_builder_subject_iri (sparql, email_uri);
+ tracker_sparql_builder_predicate (sparql, "a");
+ tracker_sparql_builder_object (sparql, "nco:EmailAddress");
- tracker_sparql_builder_subject_iri (sparql, email_uri);
- tracker_sparql_builder_predicate (sparql, "nco:emailAddress");
- tracker_sparql_builder_object_string (sparql, email);
+ tracker_sparql_builder_subject_iri (sparql, email_uri);
+ tracker_sparql_builder_predicate (sparql, "nco:emailAddress");
+ tracker_sparql_builder_object_string (sparql, email);
- tracker_sparql_builder_subject_iri (sparql, uri);
- tracker_sparql_builder_predicate (sparql, predicate);
+ tracker_sparql_builder_subject_iri (sparql, uri);
+ tracker_sparql_builder_predicate (sparql, predicate);
- tracker_sparql_builder_object_blank_open (sparql);
+ tracker_sparql_builder_object_blank_open (sparql);
- tracker_sparql_builder_predicate (sparql, "a");
- tracker_sparql_builder_object (sparql, "nco:Contact");
+ tracker_sparql_builder_predicate (sparql, "a");
+ tracker_sparql_builder_object (sparql, "nco:Contact");
- if (fullname) {
- tracker_sparql_builder_predicate (sparql, "nco:fullname");
- tracker_sparql_builder_object_string (sparql, fullname);
- }
+ if (fullname) {
+ tracker_sparql_builder_predicate (sparql, "nco:fullname");
+ tracker_sparql_builder_object_string (sparql, fullname);
+ }
- tracker_sparql_builder_predicate (sparql, "nco:hasEmailAddress");
- tracker_sparql_builder_object_iri (sparql, email_uri);
+ tracker_sparql_builder_predicate (sparql, "nco:hasEmailAddress");
+ tracker_sparql_builder_object_iri (sparql, email_uri);
- tracker_sparql_builder_object_blank_close (sparql);
- g_free (email_uri);
- }
+ tracker_sparql_builder_object_blank_close (sparql);
+ g_free (email_uri);
g_free (email);
g_free (fullname);
-
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]