[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:18:10 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=c5088dc

The following commit has been merged in the master branch:
commit c5088dcae14472feec807782a3acb6adc00082de
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Thu Sep 30 17:26:19 2010 +0000

    Make use of account and connection factories.
    
    svn path=/trunk/playground/network/telepathy-chat-handler/; revision=1181312
---
 app/main.cpp           | 14 +++++++++++++-
 lib/chatconnection.cpp | 15 +++++++--------
 2 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/app/main.cpp b/app/main.cpp
index 698173c..9f572a6 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -21,6 +21,9 @@
 
 #include <TelepathyQt4/Channel>
 #include <TelepathyQt4/ClientRegistrar>
+#include <TelepathyQt4/AccountFactory>
+#include <TelepathyQt4/ConnectionFactory>
+
 
 #include <KApplication>
 #include <KAboutData>
@@ -39,7 +42,16 @@ int main(int argc, char *argv[])
 
     registerTypes();
 
-    ClientRegistrarPtr registrar = ClientRegistrar::create();
+
+    AccountFactoryPtr  accountFactory = AccountFactory::create(QDBusConnection::sessionBus(),
+                                                               Features() << Account::FeatureCore);
+
+    ConnectionFactoryPtr  connectionFactory = ConnectionFactory::create(QDBusConnection::sessionBus(),
+                                                               Features() <<  Connection::FeatureSelfContact
+                                                               << Connection::FeatureCore);
+
+
+    ClientRegistrarPtr registrar = ClientRegistrar::create(accountFactory, connectionFactory);
     MainWindow* mainWindow = new MainWindow();
 
     AbstractClientPtr handler = AbstractClientPtr::dynamicCast(SharedPtr<MainWindow>(mainWindow));
diff --git a/lib/chatconnection.cpp b/lib/chatconnection.cpp
index 0bd8fb8..c289350 100644
--- a/lib/chatconnection.cpp
+++ b/lib/chatconnection.cpp
@@ -33,14 +33,11 @@ ChatConnection::ChatConnection(QObject *parent, const AccountPtr account, const
         PendingReady* op = m_channel->becomeReady(Features() << TextChannel::FeatureMessageQueue
                            << TextChannel::FeatureMessageSentSignal
                            << TextChannel::FeatureChatState
+                           << TextChannel::FeatureMessageCapabilities
                            << Channel::FeatureCore);
-        connect(op, SIGNAL(finished(Tp::PendingOperation*)), this, SLOT(onChannelReady(Tp::PendingOperation*)));
-
-        //FIXME, we need to actually wait for this. Fortunately we can use factories soon.
-        connection->becomeReady(Features() << Connection::FeatureSelfContact
-                                << Connection::FeatureCore);
 
 
+        connect(op, SIGNAL(finished(Tp::PendingOperation*)), this, SLOT(onChannelReady(Tp::PendingOperation*)));
     } else {
         qDebug() << "more than one channel?"; // I don't understand channels yet.
     }
@@ -50,16 +47,18 @@ ChatConnection::ChatConnection(QObject *parent, const AccountPtr account, const
 
 //Private slots
 
-void ChatConnection::onChannelReady(Tp::PendingOperation*)
+void ChatConnection::onChannelReady(Tp::PendingOperation* op)
 {
+    qDebug() << "done";
     PendingContacts* p = m_connection->contactManager()->upgradeContacts(QList<ContactPtr>::fromSet(m_channel->groupContacts()),
                          QSet<Contact::Feature>() << Contact::FeatureAlias
                          << Contact::FeatureAvatarToken
+                         << Contact::FeatureAvatarData
                          << Contact::FeatureCapabilities
-                         << Contact::FeatureSimplePresence
-                                                                        );
+                         << Contact::FeatureSimplePresence);
     connect(p, SIGNAL(finished(Tp::PendingOperation*)), this, SLOT(onPendingContactsReady(Tp::PendingOperation*)));
     qDebug() << "channel ready";
+
 }
 
 void ChatConnection::onPendingContactsReady(Tp::PendingOperation*)

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list