[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:07:52 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=4b87a88

The following commit has been merged in the master branch:
commit 4b87a88a6acfacc24d938a37eeada43dd3da0d77
Author: Martin Klapetek <mklapetek at kde.org>
Date:   Sat Nov 16 13:18:21 2013 +0100

    Detect person/contact row types properly
---
 KTp/Models/kpeopletranslationproxy.cpp | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/KTp/Models/kpeopletranslationproxy.cpp b/KTp/Models/kpeopletranslationproxy.cpp
index 15b48bf..1d71447 100644
--- a/KTp/Models/kpeopletranslationproxy.cpp
+++ b/KTp/Models/kpeopletranslationproxy.cpp
@@ -70,12 +70,10 @@ QVariant KPeopleTranslationProxy::data(const QModelIndex &proxyIndex, int role)
         case Qt::DisplayRole:
             return mapToSource(proxyIndex).data(KPeople::PersonsModel::FormattedNameRole);
         case KTp::RowTypeRole:
-            if (mapToSource(proxyIndex).data(KPeople::PersonsModel::PersonIdRole)
-                        .toString().startsWith((QLatin1String("kpeople://")))) {
-
-                return KTp::PersonRowType;
-            } else {
+            if (proxyIndex.parent().isValid() || sourceModel()->rowCount(mapToSource(proxyIndex)) <= 1) {
                 return KTp::ContactRowType;
+            } else {
+                return KTp::PersonRowType;
             }
 //             //if the person has max 1 child, it's a fake person, so treat it as contact row
 //             if (mapToSource(proxyIndex).parent().isValid() || sourceModel()->rowCount(mapToSource(proxyIndex)) <= 1) {

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list