[folks] Fix non-matching generic types



commit 6189df636771020200c671d5448edbaa90ed66b4
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Thu Sep 29 18:15:23 2016 +0200

    Fix non-matching generic types

 folks/anti-linkable.vala               |    8 ++++----
 tests/dummy/individual-retrieval.vala  |    4 ++--
 tests/dummy/search-view.vala           |   12 ++++++------
 tests/folks/primary-store-changes.vala |    4 ++--
 tests/lib/dummy/test-case.vala         |    4 ++--
 5 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/folks/anti-linkable.vala b/folks/anti-linkable.vala
index fd70ecc..662a781 100644
--- a/folks/anti-linkable.vala
+++ b/folks/anti-linkable.vala
@@ -119,7 +119,7 @@ public interface Folks.AntiLinkable : Folks.Persona
   public async void add_anti_links (Set<Persona> other_personas)
       throws PropertyError
     {
-      var new_anti_links = SmallSet.copy (this.anti_links);
+      var new_anti_links = SmallSet<string>.copy (this.anti_links);
 
       foreach (var p in other_personas)
         {
@@ -154,7 +154,7 @@ public interface Folks.AntiLinkable : Folks.Persona
   public async void remove_anti_links (Set<Persona> other_personas)
       throws PropertyError
     {
-      var new_anti_links = SmallSet.copy (this.anti_links);
+      var new_anti_links = SmallSet<string>.copy (this.anti_links);
 
       foreach (var p in other_personas)
         {
@@ -183,7 +183,7 @@ public interface Folks.AntiLinkable : Folks.Persona
     {
        if (!this.has_global_anti_link())
          {
-           var new_anti_links = SmallSet.copy (this.anti_links);
+           var new_anti_links = SmallSet<string>.copy (this.anti_links);
            new_anti_links.add ("*");
            yield this.change_anti_links (new_anti_links);
          }
@@ -206,7 +206,7 @@ public interface Folks.AntiLinkable : Folks.Persona
     {
        if (this.has_global_anti_link())
          {
-           var new_anti_links = SmallSet.copy (this.anti_links);
+           var new_anti_links = SmallSet<string>.copy (this.anti_links);
            new_anti_links.remove ("*");
            yield this.change_anti_links (new_anti_links);
          }
diff --git a/tests/dummy/individual-retrieval.vala b/tests/dummy/individual-retrieval.vala
index 749a53f..a0842cf 100644
--- a/tests/dummy/individual-retrieval.vala
+++ b/tests/dummy/individual-retrieval.vala
@@ -50,7 +50,7 @@ public class IndividualRetrievalTests : DummyTest.TestCase
           "renato jabber com", "renato yahoo com" },
     };
 
-  private static async Folks.Persona _create_persona_from_info (
+  private static async FolksDummy.Persona _create_persona_from_info (
       FolksDummy.PersonaStore store, PersonaInfo info)
     {
       var p = new FullPersona (store, info.contact_id);
@@ -90,7 +90,7 @@ public class IndividualRetrievalTests : DummyTest.TestCase
 
   private async void _register_personas ()
     {
-      var personas = new HashSet<Folks.Persona> ();
+      var personas = new HashSet<FolksDummy.Persona> ();
 
       /* Create a set of personas. */
       foreach (var info in IndividualRetrievalTests._persona_info)
diff --git a/tests/dummy/search-view.vala b/tests/dummy/search-view.vala
index 44f3a9b..be17a06 100644
--- a/tests/dummy/search-view.vala
+++ b/tests/dummy/search-view.vala
@@ -96,7 +96,7 @@ public class SearchViewTests : DummyTest.TestCase
       persona2.update_full_name ("Artemis Arachnid");
       persona3.update_full_name ("Álvaro Pañuelo");
 
-      var personas = new HashSet<Folks.Persona> ();
+      var personas = new HashSet<FolksDummy.Persona> ();
       personas.add (persona0);
       personas.add (persona1);
       personas.add (persona2);
@@ -205,7 +205,7 @@ public class SearchViewTests : DummyTest.TestCase
       var unexpected_matches = new HashSet<string> ();
 
       /* Add a first persona who will be matched. */
-      var personas = new HashSet<Folks.Persona> ();
+      var personas = new HashSet<FolksDummy.Persona> ();
       personas.add (this._generate_main_persona ());
 
       /* Add a second persona, not expected to match the query. */
@@ -274,7 +274,7 @@ public class SearchViewTests : DummyTest.TestCase
       email_addresses.add (new EmailFieldDetails ("mallory@isis.secret"));
       persona2.update_email_addresses (email_addresses);
 
-      personas = new HashSet<Folks.Persona> ();
+      personas = new HashSet<FolksDummy.Persona> ();
       personas.add (persona2);
       expected_matches.add ("persona2");
 
@@ -306,7 +306,7 @@ public class SearchViewTests : DummyTest.TestCase
        * search that only matches that value and confirm. */
 
       /* NOTE: each contact added here will only count if it has a test below */
-      var personas = new HashSet<Folks.Persona> ();
+      var personas = new HashSet<FolksDummy.Persona> ();
       personas.add (this._generate_test_contact ("full-name",
           (p) => { p.update_full_name ("full_name"); }));
       personas.add (this._generate_test_contact ("nickname",
@@ -492,7 +492,7 @@ public class SearchViewTests : DummyTest.TestCase
     {
       var main_loop = new GLib.MainLoop (null, false);
 
-      var personas = new HashSet<Folks.Persona> ();
+      var personas = new HashSet<FolksDummy.Persona> ();
       personas.add (this._generate_main_persona ());
 
       this.dummy_persona_store.register_personas (personas);
@@ -540,7 +540,7 @@ public class SearchViewTests : DummyTest.TestCase
     {
       var main_loop = new GLib.MainLoop (null, false);
 
-      var personas = new HashSet<Folks.Persona> ();
+      var personas = new HashSet<FolksDummy.Persona> ();
       personas.add (this._generate_main_persona ());
 
       this.dummy_persona_store.register_personas (personas);
diff --git a/tests/folks/primary-store-changes.vala b/tests/folks/primary-store-changes.vala
index 78d6c32..b7bb9d2 100644
--- a/tests/folks/primary-store-changes.vala
+++ b/tests/folks/primary-store-changes.vala
@@ -55,7 +55,7 @@ public class PrimaryStoreChangesTests : DummyTest.TestCase
           this._settings.set_string ("primary-store", "dummy:dummy-store");
         }
 
-      var persona_stores = new HashSet<PersonaStore> ();
+      var persona_stores = new HashSet<FolksDummy.PersonaStore> ();
       persona_stores.add (this.second_persona_store);
       this.dummy_backend.unregister_persona_stores (persona_stores);
 
@@ -80,7 +80,7 @@ public class PrimaryStoreChangesTests : DummyTest.TestCase
       this.second_persona_store.persona_type = typeof (FolksDummy.FullPersona);
 
       /* Register it with the backend. */
-      var persona_stores = new HashSet<PersonaStore> ();
+      var persona_stores = new HashSet<FolksDummy.PersonaStore> ();
       persona_stores.add (this.second_persona_store);
       this.dummy_backend.register_persona_stores (persona_stores);
     }
diff --git a/tests/lib/dummy/test-case.vala b/tests/lib/dummy/test-case.vala
index 84eb90a..f47a7b7 100644
--- a/tests/lib/dummy/test-case.vala
+++ b/tests/lib/dummy/test-case.vala
@@ -121,7 +121,7 @@ public class DummyTest.TestCase : Folks.TestCase
       this.dummy_persona_store.persona_type = typeof (FolksDummy.FullPersona);
 
       /* Register it with the backend. */
-      var persona_stores = new HashSet<PersonaStore> ();
+      var persona_stores = new HashSet<FolksDummy.PersonaStore> ();
       persona_stores.add (this.dummy_persona_store);
       this.dummy_backend.register_persona_stores (persona_stores);
     }
@@ -133,7 +133,7 @@ public class DummyTest.TestCase : Folks.TestCase
    */
   public override void tear_down ()
     {
-      var persona_stores = new HashSet<PersonaStore> ();
+      var persona_stores = new HashSet<FolksDummy.PersonaStore> ();
       persona_stores.add (this.dummy_persona_store);
       this.dummy_backend.unregister_persona_stores (persona_stores);
 


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