[Libreoffice-commits] .: Branch 'feature/tubes2' - 3 commits - tubes/qa tubes/source
Will Thompson
wjt at kemper.freedesktop.org
Fri Mar 23 04:22:23 PDT 2012
tubes/qa/test_manager.cxx | 13 +++----------
tubes/source/contact-list.cxx | 5 ++++-
2 files changed, 7 insertions(+), 11 deletions(-)
New commits:
commit 4e2123df38772634684fea53b404274d3fac9ea9
Author: Will Thompson <will.thompson at collabora.co.uk>
Date: Fri Mar 23 11:22:05 2012 +0000
tubes test: remove an unused function
diff --git a/tubes/qa/test_manager.cxx b/tubes/qa/test_manager.cxx
index 236b23d..8ca3b9f 100644
--- a/tubes/qa/test_manager.cxx
+++ b/tubes/qa/test_manager.cxx
@@ -154,15 +154,6 @@ TestTeleTubes::~TestTeleTubes()
mpMainLoop = NULL;
}
-static void TeleTestTubes_ContactListPrepared( GError *errorOr0, void *user_data )
-{
- TestTeleTubes *self = reinterpret_cast<TestTeleTubes *>(user_data);
-
- CPPUNIT_ASSERT( errorOr0 == 0 );
-
- g_main_loop_quit (self->mpMainLoop);
-}
-
void TestTeleTubes::spinMainLoop()
{
g_main_loop_run( mpMainLoop);
commit 48acf01da950702459e64438f44510088ec5e518
Author: Will Thompson <will.thompson at collabora.co.uk>
Date: Fri Mar 23 11:20:30 2012 +0000
tubes test: disable testFailAlways()
diff --git a/tubes/qa/test_manager.cxx b/tubes/qa/test_manager.cxx
index c2fbe89..236b23d 100644
--- a/tubes/qa/test_manager.cxx
+++ b/tubes/qa/test_manager.cxx
@@ -91,7 +91,9 @@ public:
CPPUNIT_TEST( testDestroyManager1 );
CPPUNIT_TEST( testDestroyManager2 );
CPPUNIT_TEST( testDestroyAccepterContact );
- CPPUNIT_TEST( testFailAlways ); // need failure to display SAL_LOG, comment out for real builds
+#if 0
+ CPPUNIT_TEST( testFailAlways ); // test failure displays SAL_LOG, uncomment for debugging
+#endif
CPPUNIT_TEST_SUITE_END();
private:
commit 2458e00c88a9978f66b95413cb2e68606bb9b9d4
Author: Will Thompson <will.thompson at collabora.co.uk>
Date: Fri Mar 23 11:18:38 2012 +0000
tubes: skip self contact
You should only have yourself on your contact list on rare occasions,
butâ¦
diff --git a/tubes/source/contact-list.cxx b/tubes/source/contact-list.cxx
index 4cedc50..317f5d7 100644
--- a/tubes/source/contact-list.cxx
+++ b/tubes/source/contact-list.cxx
@@ -92,6 +92,7 @@ AccountContactPairV ContactList::getContacts()
{
TpAccount *account = reinterpret_cast<TpAccount *>(accounts->data);
TpConnection *connection = tp_account_get_connection (account);
+ TpContact *self;
GPtrArray *contacts;
guint i;
@@ -103,13 +104,15 @@ AccountContactPairV ContactList::getContacts()
TP_CONTACT_LIST_STATE_SUCCESS)
continue;
+ self = tp_connection_get_self_contact (connection);
contacts = tp_connection_dup_contact_list (connection);
for (i = 0; i < contacts->len; i++)
{
TpContact *contact =
reinterpret_cast<TpContact *>(g_ptr_array_index (contacts, i));
- if (contact_supports_libo_dtube (contact))
+ if (contact != self &&
+ contact_supports_libo_dtube (contact))
{
g_object_ref (account);
g_object_ref (contact);
More information about the Libreoffice-commits
mailing list