[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:05:03 UTC 2016


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

The following commit has been merged in the master branch:
commit 6f929bfdac9342594ef6391dbc273d8d11224536
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date:   Wed Feb 23 13:07:39 2011 +0100

    New model role returning contact capabilities. Also removing the "Info" and "Err" test buttons.
---
 fakecontactsmodel.cpp |  4 ++++
 fakecontactsmodel.h   |  3 ++-
 main-widget.cpp       | 26 +++++++++++++-------------
 3 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/fakecontactsmodel.cpp b/fakecontactsmodel.cpp
index 78a905c..66c5953 100644
--- a/fakecontactsmodel.cpp
+++ b/fakecontactsmodel.cpp
@@ -172,6 +172,10 @@ QVariant FakeContactsModel::data(const QModelIndex& index, int role) const
         {
             return contact->isContact();
         }
+        else if(role == ModelRoles::ContactCapabilities)
+        {
+            return qVariantFromValue<Tp::ConnectionCapabilities>(contact->data()->capabilities());
+        }
     }
     else 
     {
diff --git a/fakecontactsmodel.h b/fakecontactsmodel.h
index 2623cff..8e0ffcb 100644
--- a/fakecontactsmodel.h
+++ b/fakecontactsmodel.h
@@ -59,7 +59,8 @@ public:
         AccountGroupRole     = Qt::UserRole + 5,
         AccountAllContactsCountRole = Qt::UserRole + 6,
         AccountAvailContactsCountRole = Qt::UserRole + 7,
-        AccountIconRole      = Qt::UserRole + 8
+        AccountIconRole      = Qt::UserRole + 8,
+        ContactCapabilities  = Qt::UserRole + 9
     };
 };
 
diff --git a/main-widget.cpp b/main-widget.cpp
index 224e33c..5536012 100644
--- a/main-widget.cpp
+++ b/main-widget.cpp
@@ -427,19 +427,19 @@ void MainWidget::onAccountManagerReady(Tp::PendingOperation* op)
     
     m_accountButtonsLayout->insertStretch(-1);
     
-    QPushButton *bInfo = new QPushButton(this);
-    bInfo->setText("Info");
-    bInfo->setObjectName("infoBt");
-    
-    QPushButton *bErr = new QPushButton(this);
-    bErr->setText("Err");
-    bErr->setObjectName("errBt");
-    
-    connect(bInfo, SIGNAL(clicked(bool)), this, SLOT(systemMessageTest()));
-    connect(bErr, SIGNAL(clicked(bool)), this, SLOT(systemMessageTest()));
-    
-    m_accountButtonsLayout->addWidget(bInfo);
-    m_accountButtonsLayout->addWidget(bErr);
+//     QPushButton *bInfo = new QPushButton(this);
+//     bInfo->setText("Info");
+//     bInfo->setObjectName("infoBt");
+//     
+//     QPushButton *bErr = new QPushButton(this);
+//     bErr->setText("Err");
+//     bErr->setObjectName("errBt");
+//     
+//     connect(bInfo, SIGNAL(clicked(bool)), this, SLOT(systemMessageTest()));
+//     connect(bErr, SIGNAL(clicked(bool)), this, SLOT(systemMessageTest()));
+//     
+//     m_accountButtonsLayout->addWidget(bInfo);
+//     m_accountButtonsLayout->addWidget(bErr);
 }
 
 void MainWidget::systemMessageTest()

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list