summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2022-08-28 11:14:21 +0200
committerCarlos Garnacho <carlosg@gnome.org>2022-08-30 16:56:47 +0000
commit7818fbc60bf58fdf0ea6f555d5466bfe7bf7bffa (patch)
treef996a4e14eef5cb6053a7da097b6f6358735a2b1
parent3cdc00edc66e3101386a7effe185ea060909bd9a (diff)
downloadtracker-7818fbc60bf58fdf0ea6f555d5466bfe7bf7bffa.tar.gz
libtracker-sparql: Avoid deprecated API usage warnings better
Or the right way. We still use at places tracker_namespace_manager_get_default() to preserve backwards compatible behavior, so these deprecated warnings should be avoided with G_GNUC_BEGIN/END_IGNORE_DEPRECATIONS.
-rw-r--r--src/libtracker-sparql/tracker-resource.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libtracker-sparql/tracker-resource.c b/src/libtracker-sparql/tracker-resource.c
index c027eecee..fa3d1fe2f 100644
--- a/src/libtracker-sparql/tracker-resource.c
+++ b/src/libtracker-sparql/tracker-resource.c
@@ -19,9 +19,6 @@
#include "config.h"
-/* Allow usage of tracker_namespace_manager_get_default() */
-#define TRACKER_VERSION_MIN_REQUIRED TRACKER_VERSION_3_2
-
#include <glib.h>
#include <json-glib/json-glib.h>
@@ -1169,7 +1166,9 @@ tracker_resource_print_turtle (TrackerResource *self,
g_return_val_if_fail (TRACKER_IS_RESOURCE (self), "");
if (namespaces == NULL) {
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
namespaces = tracker_namespace_manager_get_default ();
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
return tracker_resource_print_rdf (self, namespaces, TRACKER_RDF_FORMAT_TURTLE, NULL);
@@ -1403,7 +1402,9 @@ tracker_resource_print_sparql_update (TrackerResource *resource,
priv = GET_PRIVATE(resource);
if (namespaces == NULL) {
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
namespaces = tracker_namespace_manager_get_default ();
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
if (g_hash_table_size (priv->properties) == 0) {
@@ -1587,7 +1588,9 @@ tracker_resource_print_jsonld (TrackerResource *self,
char *result;
if (namespaces == NULL) {
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
namespaces = tracker_namespace_manager_get_default ();
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
context.all_namespaces = namespaces;