------------------------------------------------------------
revno: 445
committer: Michal Hruby <michal....@gmail.com>
branch nick: zeitgeist
timestamp: Tue 2012-03-20 13:19:23 +0100
message:
  Add Event.take_subject
modified:
  extensions/fts++/indexer.cpp
  src/datamodel.vala


--
lp:zeitgeist
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird

Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.
To unsubscribe from this branch go to 
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird/+edit-subscription
=== modified file 'extensions/fts++/indexer.cpp'
--- extensions/fts++/indexer.cpp	2012-03-19 21:33:59 +0000
+++ extensions/fts++/indexer.cpp	2012-03-20 12:19:23 +0000
@@ -958,7 +958,7 @@
         ZeitgeistEvent *event = zeitgeist_event_new ();
         ZeitgeistSubject *subject = zeitgeist_subject_new ();
         zeitgeist_subject_set_current_uri (subject, subj_uri);
-        zeitgeist_event_add_subject (event, subject); // FIXME: leaks?
+        zeitgeist_event_take_subject (event, subject);
         g_ptr_array_add (event_templates, event);
       }
     }
@@ -1032,7 +1032,7 @@
         ZeitgeistEvent *event = zeitgeist_event_new ();
         ZeitgeistSubject *subject = zeitgeist_subject_new ();
         zeitgeist_subject_set_origin (subject, subj_origin);
-        zeitgeist_event_add_subject (event, subject); // FIXME: leaks?
+        zeitgeist_event_take_subject (event, subject);
         g_ptr_array_add (event_templates, event);
       }
     }
@@ -1040,7 +1040,7 @@
     g_ptr_array_unref (results);
 
     // construct custom where clause which combines the original template
-    // with the uris we found
+    // with the origins we found
     ZeitgeistWhereClause *where;
     where = zeitgeist_db_reader_get_where_clause_for_query (zg_reader,
         time_range, templates, storage_state, error);

=== modified file 'src/datamodel.vala'
--- src/datamodel.vala	2012-03-19 19:56:38 +0000
+++ src/datamodel.vala	2012-03-20 12:19:23 +0000
@@ -398,6 +398,11 @@
             subjects.add (subject);
         }
 
+        public void take_subject (owned Subject subject)
+        {
+            subjects.add ((owned) subject);
+        }
+
         public Event.full (string? interpretation=null,
             string? manifestation=null, string? actor=null,
             string? origin=null, ...)

_______________________________________________
Mailing list: https://launchpad.net/~zeitgeist
Post to     : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp

Reply via email to