Bug 682719 — eds test fails to compile
authorPhilip Withnall <philip@tecnocode.co.uk>
Tue, 28 Aug 2012 23:04:31 +0000 (00:04 +0100)
committerPhilip Withnall <philip@tecnocode.co.uk>
Tue, 28 Aug 2012 23:26:09 +0000 (00:26 +0100)
Don’t use deprecated EDS API in the EDS tests. The replacement API doesn’t
require a dependency version bump.

Closes: https://bugzilla.gnome.org/show_bug.cgi?id=682719

NEWS
tests/lib/eds/backend.vala

diff --git a/NEWS b/NEWS
index 908251e..86e828a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ Bugs fixed:
 • Bug 682572 — Build failures due to accessing static members
 • Bug 682346 — build: Make telepathy backend optional
 • Bug 682809 — Lazy instantiation of multi-valued properties
+• Bug 682719 — eds test fails to compile
 
 Overview of changes from libfolks 0.7.2 to libfolks 0.7.3
 =========================================================
index fdba091..f64d9e2 100644 (file)
@@ -274,25 +274,19 @@ public class EdsTest.Backend
       Environment.set_variable ("FOLKS_BACKEND_EDS_USE_ADDRESS_BOOKS",
                                 "", true);
 
-      /* Use the async remove method because the sync method currently hangs. */
-      this._addressbook.remove.begin (null, (o, r) =>
+      try
         {
-          try
-            {
-              var ret = this._addressbook.remove.end (r);
-              if (ret == false)
-                {
-                  GLib.warning ("remove() addressbook returned false on %s\n",
-                      this._addressbook_name);
-                }
-              this._addressbook = null;
-            }
-          catch (GLib.Error e)
-            {
-              GLib.warning ("Unable to remove addressbook %s because: %s\n",
-                  this._addressbook_name, e.message);
-            }
-        });
+          this._source.remove_sync ();
+        }
+      catch (GLib.Error e)
+        {
+          GLib.warning ("Unable to remove addressbook ‘%s’: %s",
+              this._addressbook_name, e.message);
+        }
+      finally
+        {
+          this._addressbook = null;
+        }
     }
 
   private Gee.HashMap<string, string> _parse_addrs (string addr_s)