[tracker/wip/carlosg/deserializer-cursors: 9/15] libtracker-sparql: Set connection on bus TrackerSparqlStatement implementation




commit aa46a5f87e240a4de34bb8af76eed89613d57498
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun May 1 15:35:51 2022 +0200

    libtracker-sparql: Set connection on bus TrackerSparqlStatement implementation
    
    Make it consistent with the other implementations and pass the connection at
    construct time so that tracker_sparql_statement_get_connection() works
    consistently.

 src/libtracker-sparql/bus/tracker-bus-statement.vala | 4 ++--
 src/libtracker-sparql/bus/tracker-bus.vala           | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-sparql/bus/tracker-bus-statement.vala 
b/src/libtracker-sparql/bus/tracker-bus-statement.vala
index 6c4dfa892..7a2472135 100644
--- a/src/libtracker-sparql/bus/tracker-bus-statement.vala
+++ b/src/libtracker-sparql/bus/tracker-bus-statement.vala
@@ -26,8 +26,8 @@ public class Tracker.Bus.Statement : Tracker.Sparql.Statement {
        private string object_path;
        private HashTable<string,GLib.Variant> arguments;
 
-       public Statement (DBusConnection bus, string dbus_name, string object_path, string query) {
-               Object ();
+       public Statement (Sparql.Connection connection, DBusConnection bus, string dbus_name, string 
object_path, string query) {
+               Object (connection: connection);
                this.bus = bus;
                this.dbus_name = dbus_name;
                this.object_path = object_path;
diff --git a/src/libtracker-sparql/bus/tracker-bus.vala b/src/libtracker-sparql/bus/tracker-bus.vala
index ffa6f265d..b4897859d 100644
--- a/src/libtracker-sparql/bus/tracker-bus.vala
+++ b/src/libtracker-sparql/bus/tracker-bus.vala
@@ -191,7 +191,7 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection {
        }
 
        public override Sparql.Statement? query_statement (string sparql, GLib.Cancellable? cancellable = 
null) throws Sparql.Error {
-               return new Bus.Statement (bus, dbus_name, object_path, sparql);
+               return new Bus.Statement (this, bus, dbus_name, object_path, sparql);
        }
 
        static void send_update (DBusConnection bus, string dbus_name, string object_path, string method, 
UnixInputStream input, Cancellable? cancellable, AsyncReadyCallback? callback) throws GLib.Error, 
GLib.IOError {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]