[brasero/wip/carlosg/tracker3: 20/24] Obtain TrackerSparqlConnection in a single point
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [brasero/wip/carlosg/tracker3: 20/24] Obtain TrackerSparqlConnection in a single point
- Date: Thu, 16 Sep 2021 13:18:19 +0000 (UTC)
commit 8b222b28a2634ff6fabd75882f3c25de8cd425f5
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Dec 24 12:19:49 2020 +0100
Obtain TrackerSparqlConnection in a single point
The is_available vmethod tries to create a connection if it's not
there. But the BraseroSearchTracker initialization already tries to
obtain the SPARQL connection. Let this method return wether
initialiation was successful.
src/brasero-search-tracker.c | 6 ------
1 file changed, 6 deletions(-)
---
diff --git a/src/brasero-search-tracker.c b/src/brasero-search-tracker.c
index fe7be2bd..f8c29c0d 100644
--- a/src/brasero-search-tracker.c
+++ b/src/brasero-search-tracker.c
@@ -56,12 +56,6 @@ brasero_search_tracker_is_available (BraseroSearchEngine *engine)
BraseroSearchTrackerPrivate *priv;
priv = BRASERO_SEARCH_TRACKER_PRIVATE (engine);
- GError *error = NULL;
- if (priv->connection)
- return TRUE;
-
- priv->cancellable = g_cancellable_new ();
- priv->connection = tracker_sparql_connection_get (priv->cancellable, &error);
return (priv->connection != NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]