summaryrefslogtreecommitdiff
path: root/qt4
diff options
context:
space:
mode:
authorAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2011-10-07 02:53:19 -0300
committerAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2011-10-07 02:53:19 -0300
commit32ee6427141bde4f85eb257f6c1cc47029908084 (patch)
treeb2831b1c0744614b11b877ad69479e6f368d1e9f /qt4
parent79dc4666fe2792c62b3c43dd5732de45d7898f41 (diff)
contacts-conn example cm: Allow to change avatar without emitting AvatarUpdated.
Diffstat (limited to 'qt4')
-rw-r--r--qt4/tests/dbus/contacts-avatar.cpp2
-rw-r--r--qt4/tests/lib/glib/contacts-conn.c10
-rw-r--r--qt4/tests/lib/glib/contacts-conn.h3
3 files changed, 10 insertions, 5 deletions
diff --git a/qt4/tests/dbus/contacts-avatar.cpp b/qt4/tests/dbus/contacts-avatar.cpp
index c5bb38be0..9de795a8a 100644
--- a/qt4/tests/dbus/contacts-avatar.cpp
+++ b/qt4/tests/dbus/contacts-avatar.cpp
@@ -111,7 +111,7 @@ void TestContactsAvatar::createContactWithFakeAvatar(const char *id)
tp_tests_contacts_connection_change_avatar_data(
TP_TESTS_CONTACTS_CONNECTION(mConn->service()), handle,
- array, avatarMimeType, avatarToken);
+ array, avatarMimeType, avatarToken, true);
g_array_unref(array);
Tp::UIntList handles = Tp::UIntList() << handle;
diff --git a/qt4/tests/lib/glib/contacts-conn.c b/qt4/tests/lib/glib/contacts-conn.c
index 9b349db58..8991da3d8 100644
--- a/qt4/tests/lib/glib/contacts-conn.c
+++ b/qt4/tests/lib/glib/contacts-conn.c
@@ -657,13 +657,17 @@ tp_tests_contacts_connection_change_avatar_data (
TpHandle handle,
GArray *data,
const gchar *mime_type,
- const gchar *token)
+ const gchar *token,
+ gboolean emit_avatar_updated)
{
g_hash_table_insert (self->priv->avatars,
GUINT_TO_POINTER (handle), avatar_data_new (data, mime_type, token));
- tp_svc_connection_interface_avatars_emit_avatar_updated (self,
- handle, token);
+ if (emit_avatar_updated)
+ {
+ tp_svc_connection_interface_avatars_emit_avatar_updated (self,
+ handle, token);
+ }
}
void
diff --git a/qt4/tests/lib/glib/contacts-conn.h b/qt4/tests/lib/glib/contacts-conn.h
index e848b4f64..9cf1114c1 100644
--- a/qt4/tests/lib/glib/contacts-conn.h
+++ b/qt4/tests/lib/glib/contacts-conn.h
@@ -95,7 +95,8 @@ void tp_tests_contacts_connection_change_avatar_data (
TpHandle handle,
GArray *data,
const gchar *mime_type,
- const gchar *token);
+ const gchar *token,
+ gboolean emit_avatar_updated);
void tp_tests_contacts_connection_change_locations (
TpTestsContactsConnection *self,