[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:12:00 UTC 2016


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

The following commit has been merged in the master branch:
commit 2cda5ed49cdbdaef51d3409ce60a90d4767b874f
Author: Dan Vrátil <dvratil at redhat.com>
Date:   Tue Jan 15 15:07:33 2013 +0100

    Disable drag&drop when groupping by accounts
---
 contact-list-widget.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/contact-list-widget.cpp b/contact-list-widget.cpp
index 6ba4a98..1b7f401 100644
--- a/contact-list-widget.cpp
+++ b/contact-list-widget.cpp
@@ -285,8 +285,10 @@ void ContactListWidget::toggleGroups(bool show)
 
     if (show) {
         d->modelFilter->setGroupMode(ContactsModel2::GroupGrouping);
+        setDragEnabled(true);
     } else {
         d->modelFilter->setGroupMode(ContactsModel2::AccountGrouping);
+        setDragEnabled(false);
     }
 
     for (int i = 0; i < d->modelFilter->rowCount(); i++) {
@@ -512,11 +514,15 @@ void ContactListWidget::mousePressEvent(QMouseEvent *event)
 
     QTreeView::mousePressEvent(event);
 
+    if (!dragEnabled()) {
+        return;
+    }
+
     QModelIndex index = indexAt(event->pos());
     d->shouldDrag = false;
 
     // if no contact, no drag
-    if (!index.data(ContactsModel::TypeRole).toInt() == ContactsModel::ContactRowType) {
+    if (index.data(ContactsModel::TypeRole).toInt() != ContactsModel::ContactRowType) {
         return;
     }
 

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list