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


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

The following commit has been merged in the master branch:
commit 57b2bbc773b50bf3da554dcc21f78e599f6e1769
Author: Dan Vrátil <dvratil at redhat.com>
Date:   Thu Jan 3 23:07:17 2013 +0100

    Don't disconnect from null sourceModel()
---
 KTp/Models/contacts-filter-model.cpp | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/KTp/Models/contacts-filter-model.cpp b/KTp/Models/contacts-filter-model.cpp
index ec3a4e1..6f26992 100644
--- a/KTp/Models/contacts-filter-model.cpp
+++ b/KTp/Models/contacts-filter-model.cpp
@@ -524,14 +524,16 @@ QVariant ContactsFilterModel::data(const QModelIndex &index, int role) const
 void ContactsFilterModel::setSourceModel(QAbstractItemModel *sourceModel)
 {
     // Disconnect the previous source model
-    disconnect(this->sourceModel(), SIGNAL(dataChanged(QModelIndex,QModelIndex)),
-               this, SLOT(sourceModelChanged(QModelIndex)));
-    disconnect(this->sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)),
-               this, SLOT(sourceModelChanged(QModelIndex)));
-    disconnect(this->sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
-               this, SLOT(sourceModelChanged(QModelIndex)));
-    disconnect(this->sourceModel(), SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)),
-               this, SLOT(sourceModelChanged(QModelIndex)));
+    if (this->sourceModel()) {
+        disconnect(this->sourceModel(), SIGNAL(dataChanged(QModelIndex,QModelIndex)),
+                this, SLOT(sourceModelChanged(QModelIndex)));
+        disconnect(this->sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)),
+                this, SLOT(sourceModelChanged(QModelIndex)));
+        disconnect(this->sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
+                this, SLOT(sourceModelChanged(QModelIndex)));
+        disconnect(this->sourceModel(), SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)),
+                this, SLOT(sourceModelChanged(QModelIndex)));
+    }
 
     // Clear all cached values as they aren't valid anymore because the source model changed.
     d->m_onlineContactsCounts.clear();

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list