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


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

The following commit has been merged in the master branch:
commit 68950c200357f69f2082bdd536e163533f85aebd
Author: Dan Vrátil <dvratil at redhat.com>
Date:   Tue Jan 15 16:09:12 2013 +0100

    Set dragEnabled to false since we handle drag ourselves
    
    We have our own implementation of drag&drop within the contact list.
    With dragEnabled set to true, there were actually two parallel drags
    and you had to drop twice in order to stop the drag.
---
 contact-list-widget.cpp | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/contact-list-widget.cpp b/contact-list-widget.cpp
index a9be0ed..acc6955 100644
--- a/contact-list-widget.cpp
+++ b/contact-list-widget.cpp
@@ -95,7 +95,7 @@ ContactListWidget::ContactListWidget(QWidget *parent)
     setIndentation(0);
     setMouseTracking(true);
     setExpandsOnDoubleClick(false); //the expanding/collapsing is handled manually
-    setDragEnabled(true);
+    setDragEnabled(false); // we handle drag&drop ourselves
     viewport()->setAcceptDrops(true);
     setDropIndicatorShown(true);
 
@@ -294,10 +294,8 @@ 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++) {
@@ -523,13 +521,14 @@ void ContactListWidget::mousePressEvent(QMouseEvent *event)
 
     QTreeView::mousePressEvent(event);
 
-    if (!dragEnabled()) {
-        return;
-    }
-
     QModelIndex index = indexAt(event->pos());
     d->shouldDrag = false;
 
+    // no drag when grouping by accounts
+    if (d->modelFilter->groupMode() == ContactsModel2::AccountGrouping) {
+        return;
+    }
+
     // if no contact, no drag
     if (index.data(ContactsModel::TypeRole).toInt() != ContactsModel::ContactRowType) {
         return;
@@ -593,7 +592,6 @@ void ContactListWidget::dropEvent(QDropEvent *event)
         return;
     }
 
-
     if (event->mimeData()->hasUrls()) {
         kDebug() << "Filed dropped";
 

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list