[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:11:45 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=e5fa5a7

The following commit has been merged in the master branch:
commit e5fa5a743bbd51de41db2cc84ee922f80f6719be
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Thu Dec 20 00:51:10 2012 +0000

    Use the new ContactsListModel
---
 contact-list-widget.cpp | 16 +++++++++-------
 contact-list-widget_p.h |  7 +++++--
 main-widget.cpp         |  3 ++-
 3 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/contact-list-widget.cpp b/contact-list-widget.cpp
index b92d260..365cb1e 100644
--- a/contact-list-widget.cpp
+++ b/contact-list-widget.cpp
@@ -25,6 +25,7 @@
 #include <TelepathyQt/PendingChannelRequest>
 #include <TelepathyQt/PendingReady>
 
+#include <KTp/Models/contacts-list-model.h>
 #include <KTp/Models/contacts-model.h>
 #include <KTp/Models/groups-model.h>
 #include <KTp/Models/accounts-filter-model.h>
@@ -68,13 +69,14 @@ ContactListWidget::ContactListWidget(QWidget *parent)
     d->delegate = new ContactDelegate(this);
     d->compactDelegate = new ContactDelegateCompact(ContactDelegateCompact::Normal, this);
 
-    d->model = new ContactsModel(this);
-    d->groupsModel = new GroupsModel(d->model, this);
+    d->model = new KTp::ContactsListModel(this);
+
+//    d->groupsModel = new GroupsModel(d->model, this);
     d->modelFilter = new AccountsFilterModel(this);
     d->modelFilter->setDynamicSortFilter(true);
     d->modelFilter->setSortRole(Qt::DisplayRole);
 
-    setModel(d->modelFilter);
+    setModel(d->model);
     setSortingEnabled(true);
     sortByColumn(0, Qt::AscendingOrder);
     loadGroupStatesFromConfig();
@@ -278,9 +280,9 @@ void ContactListWidget::toggleGroups(bool show)
     Q_D(ContactListWidget);
 
     if (show) {
-        d->modelFilter->setSourceModel(d->groupsModel);
+//        d->modelFilter->setSourceModel(d->groupsModel);
     } else {
-        d->modelFilter->setSourceModel(d->model);
+//        d->modelFilter->setSourceModel(d->model);
     }
 
     for (int i = 0; i < d->modelFilter->rowCount(); i++) {
@@ -603,10 +605,10 @@ void ContactListWidget::dropEvent(QDropEvent *event)
             //get contact and account out of the stream
             stream >> contact >> account;
 
-            Tp::AccountPtr accountPtr = d->model->accountPtrForPath(account);
+//            Tp::AccountPtr accountPtr = d->model->accountPtrForPath(account);
 
             //casted pointer is checked below, before first use
-            contacts.append(qobject_cast<ContactModelItem*>(d->model->contactItemForId(accountPtr->uniqueIdentifier(), contact)));
+//            contacts.append(qobject_cast<ContactModelItem*>(d->model->contactItemForId(accountPtr->uniqueIdentifier(), contact)));
         }
 
         Q_FOREACH (ContactModelItem *contact, contacts) {
diff --git a/contact-list-widget_p.h b/contact-list-widget_p.h
index 131a20a..63a242c 100644
--- a/contact-list-widget_p.h
+++ b/contact-list-widget_p.h
@@ -22,7 +22,10 @@
 
 #include <TelepathyQt/Types>
 
-class ContactsModel;
+namespace KTp {
+    class ContactsListModel;
+}
+
 class GroupsModel;
 class AccountsFilterModel;
 class ContactDelegate;
@@ -39,7 +42,7 @@ public:
       shouldDrag(false),
       showOffline(false) {}
 
-    ContactsModel          *model;
+    KTp::ContactsListModel          *model;
     GroupsModel            *groupsModel;
     AccountsFilterModel    *modelFilter;
     ContactDelegate        *delegate;
diff --git a/main-widget.cpp b/main-widget.cpp
index 112f8f0..3ddf4c3 100644
--- a/main-widget.cpp
+++ b/main-widget.cpp
@@ -36,6 +36,7 @@
 #include <TelepathyQt/ContactManager>
 #include <TelepathyQt/PendingReady>
 
+#include <KTp/contact-factory.h>
 #include <KTp/Models/contacts-model.h>
 #include <KTp/Widgets/add-contact-dialog.h>
 #include <KTp/Widgets/join-chat-room-dialog.h>
@@ -89,7 +90,7 @@ MainWidget::MainWidget(QWidget *parent)
                                                                                << Tp::Connection::FeatureRoster
                                                                                << Tp::Connection::FeatureSelfContact);
 
-    Tp::ContactFactoryPtr contactFactory = Tp::ContactFactory::create(Tp::Features()  << Tp::Contact::FeatureAlias
+    Tp::ContactFactoryPtr contactFactory = KTp::ContactFactory::create(Tp::Features()  << Tp::Contact::FeatureAlias
                                                                       << Tp::Contact::FeatureAvatarData
                                                                       << Tp::Contact::FeatureSimplePresence
                                                                       << Tp::Contact::FeatureCapabilities

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list