[folks/wip/vala-0-15] More vala 0.15 fixes
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks/wip/vala-0-15] More vala 0.15 fixes
- Date: Wed, 1 Feb 2012 16:57:42 +0000 (UTC)
commit 2dfabbd2bf7ec956c6bfcf149d8e98b7259b94e2
Author: Ryan Lortie <desrt desrt ca>
Date: Wed Feb 1 11:56:15 2012 -0500
More vala 0.15 fixes
Using typeof() on a generic type with type arguments is pointless
because GType is oblivious to generics. Vala now warns about this and
the --fatal-warnings used in the build cause it to fail.
Remove the type arguments from the types in all typeof() calls.
folks/individual-aggregator.vala | 2 +-
tests/eds/add-persona.vala | 12 ++++++------
tests/eds/link-personas.vala | 10 +++++-----
3 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index e008695..91f4172 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -1760,7 +1760,7 @@ public class Folks.IndividualAggregator : Object
if (local_ids.size > 0)
{
- var local_ids_value = Value (typeof (Set<string>));
+ var local_ids_value = Value (typeof (Set));
local_ids_value.set_object (local_ids);
details.insert (
(!) Folks.PersonaStore.detail_key (PersonaDetail.LOCAL_IDS),
diff --git a/tests/eds/add-persona.vala b/tests/eds/add-persona.vala
index b2ad672..b6b8c08 100644
--- a/tests/eds/add-persona.vala
+++ b/tests/eds/add-persona.vala
@@ -167,7 +167,7 @@ public class AddPersonaTests : Folks.TestCase
details.insert (Folks.PersonaStore.detail_key (PersonaDetail.FULL_NAME),
(owned) v1);
- Value? v2 = Value (typeof (Set<EmailFieldDetails>));
+ Value? v2 = Value (typeof (Set));
var emails = new HashSet<EmailFieldDetails> (
(GLib.HashFunc) EmailFieldDetails.hash,
(GLib.EqualFunc) EmailFieldDetails.equal);
@@ -185,7 +185,7 @@ public class AddPersonaTests : Folks.TestCase
details.insert (Folks.PersonaStore.detail_key (PersonaDetail.AVATAR),
(owned) v3);
- Value? v4 = Value (typeof (MultiMap<string, ImFieldDetails>));
+ Value? v4 = Value (typeof (MultiMap));
var im_fds = new HashMultiMap<string, ImFieldDetails> ();
im_fds.set ("jabber", new ImFieldDetails (this._im_addr_1));
im_fds.set ("yahoo", new ImFieldDetails (this._im_addr_2));
@@ -193,7 +193,7 @@ public class AddPersonaTests : Folks.TestCase
details.insert (
Folks.PersonaStore.detail_key (PersonaDetail.IM_ADDRESSES), v4);
- Value? v5 = Value (typeof (Set<PhoneFieldDetails>));
+ Value? v5 = Value (typeof (Set));
var phones = new HashSet<PhoneFieldDetails> (
(GLib.HashFunc) PhoneFieldDetails.hash,
(GLib.EqualFunc) PhoneFieldDetails.equal);
@@ -211,7 +211,7 @@ public class AddPersonaTests : Folks.TestCase
Folks.PersonaStore.detail_key (PersonaDetail.PHONE_NUMBERS),
(owned) v5);
- Value? v6 = Value (typeof (Set<PostalAddress>));
+ Value? v6 = Value (typeof (Set));
var pa_fds = new HashSet<PostalAddressFieldDetails> (
(GLib.HashFunc) PostalAddressFieldDetails.hash,
(GLib.EqualFunc) PostalAddressFieldDetails.equal);
@@ -235,7 +235,7 @@ public class AddPersonaTests : Folks.TestCase
Folks.PersonaStore.detail_key (PersonaDetail.STRUCTURED_NAME),
(owned) v7);
- Value? v8 = Value (typeof (Set<NoteFieldDetails>));
+ Value? v8 = Value (typeof (Set));
var notes = new HashSet<NoteFieldDetails> (
(GLib.HashFunc) NoteFieldDetails.hash,
(GLib.EqualFunc) NoteFieldDetails.equal);
@@ -252,7 +252,7 @@ public class AddPersonaTests : Folks.TestCase
details.insert (Folks.PersonaStore.detail_key (PersonaDetail.BIRTHDAY),
(owned) v9);
- Value? v10 = Value (typeof (Set<Role>));
+ Value? v10 = Value (typeof (Set));
var role_fds = new HashSet<RoleFieldDetails> (
(GLib.HashFunc) RoleFieldDetails.hash,
(GLib.EqualFunc) RoleFieldDetails.equal);
diff --git a/tests/eds/link-personas.vala b/tests/eds/link-personas.vala
index 70c9574..09c5e31 100644
--- a/tests/eds/link-personas.vala
+++ b/tests/eds/link-personas.vala
@@ -211,7 +211,7 @@ public class LinkPersonasTests : Folks.TestCase
if (this._linking_method == LinkingMethod.IM_ADDRESSES ||
this._linking_method == LinkingMethod.EMAIL_AS_IM_ADDRESS)
{
- v1 = Value (typeof (MultiMap<string, ImFieldDetails>));
+ v1 = Value (typeof (MultiMap));
var im_addrs1 = new HashMultiMap<string, ImFieldDetails> (
null, null,
(GLib.HashFunc) ImFieldDetails.hash,
@@ -226,7 +226,7 @@ public class LinkPersonasTests : Folks.TestCase
}
else if (this._linking_method == LinkingMethod.WEB_SERVICE_ADDRESSES)
{
- v1 = Value (typeof (MultiMap<string, WebServiceFieldDetails>));
+ v1 = Value (typeof (MultiMap));
var wsa1 = new HashMultiMap<string, WebServiceFieldDetails> (
null, null,
(GLib.HashFunc) WebServiceFieldDetails.hash,
@@ -246,7 +246,7 @@ public class LinkPersonasTests : Folks.TestCase
Value? v3;
if (this._linking_method == LinkingMethod.IM_ADDRESSES)
{
- v3 = Value (typeof (MultiMap<string, string>));
+ v3 = Value (typeof (MultiMap));
var im_addrs2 = new HashMultiMap<string, ImFieldDetails> (
null, null,
(GLib.HashFunc) ImFieldDetails.hash,
@@ -257,7 +257,7 @@ public class LinkPersonasTests : Folks.TestCase
}
else if (this._linking_method == LinkingMethod.WEB_SERVICE_ADDRESSES)
{
- v3 = Value (typeof (MultiMap<string, WebServiceFieldDetails>));
+ v3 = Value (typeof (MultiMap));
var wsa2 = new HashMultiMap<string, WebServiceFieldDetails> (
null, null,
(GLib.HashFunc) WebServiceFieldDetails.hash,
@@ -268,7 +268,7 @@ public class LinkPersonasTests : Folks.TestCase
}
else if (this._linking_method == LinkingMethod.EMAIL_AS_IM_ADDRESS)
{
- v3 = Value (typeof (Set<EmailFieldDetails>));
+ v3 = Value (typeof (Set));
var emails = new HashSet<EmailFieldDetails> (
(GLib.HashFunc) EmailFieldDetails.hash,
(GLib.EqualFunc) EmailFieldDetails.equal);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]