[telepathy-qt4/master] Fixed bug 20268: Connection's selfContact object should initially have no features.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Tue Jun 30 10:07:12 PDT 2009
---
TelepathyQt4/connection.cpp | 5 +----
tests/dbus/contacts.cpp | 10 +++++++++-
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/TelepathyQt4/connection.cpp b/TelepathyQt4/connection.cpp
index 5050c71..3e4c873 100644
--- a/TelepathyQt4/connection.cpp
+++ b/TelepathyQt4/connection.cpp
@@ -344,10 +344,7 @@ void Connection::Private::introspectSelfContact(Connection::Private *self)
debug() << "Building self contact";
// FIXME: these should be features when Connection is sanitized
PendingContacts *contacts = self->contactManager->contactsForHandles(
- UIntList() << self->selfHandle,
- QSet<Contact::Feature>() << Contact::FeatureAlias
- << Contact::FeatureAvatarToken
- << Contact::FeatureSimplePresence);
+ UIntList() << self->selfHandle);
self->parent->connect(contacts,
SIGNAL(finished(Tp::PendingOperation *)),
SLOT(gotSelfContact(Tp::PendingOperation *)));
diff --git a/tests/dbus/contacts.cpp b/tests/dbus/contacts.cpp
index d2d9c57..52421b2 100644
--- a/tests/dbus/contacts.cpp
+++ b/tests/dbus/contacts.cpp
@@ -212,6 +212,15 @@ void TestContacts::testSelfContact()
QCOMPARE(selfContact->handle()[0], mConn->selfHandle());
QCOMPARE(selfContact->id(), QString("me at example.com"));
+ QVERIFY(connect(selfContact->manager()->upgradeContacts(
+ QList<ContactPtr>() << selfContact,
+ QSet<Contact::Feature>() << Contact::FeatureAlias
+ << Contact::FeatureAvatarToken
+ << Contact::FeatureSimplePresence),
+ SIGNAL(finished(Tp::PendingOperation*)),
+ SLOT(expectPendingContactsFinished(Tp::PendingOperation*))));
+ QCOMPARE(mLoop->exec(), 0);
+
QCOMPARE(selfContact->alias(), QString("me at example.com"));
QVERIFY(!selfContact->isAvatarTokenKnown());
@@ -219,7 +228,6 @@ void TestContacts::testSelfContact()
QCOMPARE(selfContact->presenceStatus(), QString("available"));
QCOMPARE(selfContact->presenceType(), uint(Tp::ConnectionPresenceTypeAvailable));
QCOMPARE(selfContact->presenceMessage(), QString(""));
-
}
void TestContacts::testForHandles()
--
1.5.6.5
More information about the telepathy-commits
mailing list