[SCM] kitemmodels packaging branch, master, updated. debian/5.28.0-1-5-gc3678e0

Maximiliano Curia maxy at moszumanska.debian.org
Tue Apr 4 16:04:29 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/frameworks/kitemmodels.git;a=commitdiff;h=b8466dd

The following commit has been merged in the master branch:
commit b8466dd32bd4dc433bafd7c9600cc1b34fd6c051
Author: Maximiliano Curia <maxy at gnuservers.com.ar>
Date:   Tue Apr 4 17:47:15 2017 +0200

    Add new upstream patch: Update-proxies-for-recently-realised-class-of-bugs.patch
---
 ...oxies-for-recently-realised-class-of-bugs.patch | 110 +++++++++++++++++++++
 debian/patches/series                              |   1 +
 2 files changed, 111 insertions(+)

diff --git a/debian/patches/Update-proxies-for-recently-realised-class-of-bugs.patch b/debian/patches/Update-proxies-for-recently-realised-class-of-bugs.patch
new file mode 100644
index 0000000..e6a717d
--- /dev/null
+++ b/debian/patches/Update-proxies-for-recently-realised-class-of-bugs.patch
@@ -0,0 +1,110 @@
+From: Stephen Kelly <steveire at gmail.com>
+Date: Tue, 20 Dec 2016 22:40:22 +0000
+Subject: Update proxies for recently realised class of bugs.
+
+Store persistent indexes for updating after emitting any signals which
+can invoke user code.
+---
+ src/kconcatenaterowsproxymodel.cpp | 22 +++++++++++-----------
+ src/kdescendantsproxymodel.cpp     |  4 ++--
+ src/kselectionproxymodel.cpp       | 18 +++++++++---------
+ 3 files changed, 22 insertions(+), 22 deletions(-)
+
+diff --git a/src/kconcatenaterowsproxymodel.cpp b/src/kconcatenaterowsproxymodel.cpp
+index f3b0c10..465c09b 100644
+--- a/src/kconcatenaterowsproxymodel.cpp
++++ b/src/kconcatenaterowsproxymodel.cpp
+@@ -303,17 +303,6 @@ void KConcatenateRowsProxyModelPrivate::slotDataChanged(const QModelIndex &from,
+ 
+ void KConcatenateRowsProxyModelPrivate::slotSourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint)
+ {
+-    const QModelIndexList persistentIndexList = q->persistentIndexList();
+-    layoutChangePersistentIndexes.reserve(persistentIndexList.size());
+-
+-    foreach (const QPersistentModelIndex &proxyPersistentIndex, persistentIndexList) {
+-        proxyIndexes << proxyPersistentIndex;
+-        Q_ASSERT(proxyPersistentIndex.isValid());
+-        const QPersistentModelIndex srcPersistentIndex = q->mapToSource(proxyPersistentIndex);
+-        Q_ASSERT(srcPersistentIndex.isValid());
+-        layoutChangePersistentIndexes << srcPersistentIndex;
+-    }
+-
+     QList<QPersistentModelIndex> parents;
+     parents.reserve(sourceParents.size());
+     foreach (const QPersistentModelIndex &parent, sourceParents) {
+@@ -327,6 +316,17 @@ void KConcatenateRowsProxyModelPrivate::slotSourceLayoutAboutToBeChanged(const Q
+     }
+ 
+     emit q->layoutAboutToBeChanged(parents, hint);
++
++    const QModelIndexList persistentIndexList = q->persistentIndexList();
++    layoutChangePersistentIndexes.reserve(persistentIndexList.size());
++
++    foreach (const QPersistentModelIndex &proxyPersistentIndex, persistentIndexList) {
++        proxyIndexes << proxyPersistentIndex;
++        Q_ASSERT(proxyPersistentIndex.isValid());
++        const QPersistentModelIndex srcPersistentIndex = q->mapToSource(proxyPersistentIndex);
++        Q_ASSERT(srcPersistentIndex.isValid());
++        layoutChangePersistentIndexes << srcPersistentIndex;
++    }
+ }
+ 
+ void KConcatenateRowsProxyModelPrivate::slotSourceLayoutChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint)
+diff --git a/src/kdescendantsproxymodel.cpp b/src/kdescendantsproxymodel.cpp
+index 810d3f1..5f758ff 100644
+--- a/src/kdescendantsproxymodel.cpp
++++ b/src/kdescendantsproxymodel.cpp
+@@ -901,6 +901,8 @@ void KDescendantsProxyModelPrivate::sourceLayoutAboutToBeChanged()
+         return;
+     }
+ 
++    q->layoutAboutToBeChanged();
++
+     QPersistentModelIndex srcPersistentIndex;
+     Q_FOREACH (const QPersistentModelIndex &proxyPersistentIndex, q->persistentIndexList()) {
+         m_proxyIndexes << proxyPersistentIndex;
+@@ -909,8 +911,6 @@ void KDescendantsProxyModelPrivate::sourceLayoutAboutToBeChanged()
+         Q_ASSERT(srcPersistentIndex.isValid());
+         m_layoutChangePersistentIndexes << srcPersistentIndex;
+     }
+-
+-    q->layoutAboutToBeChanged();
+ }
+ 
+ void KDescendantsProxyModelPrivate::sourceLayoutChanged()
+diff --git a/src/kselectionproxymodel.cpp b/src/kselectionproxymodel.cpp
+index 873e974..d0ff4a1 100644
+--- a/src/kselectionproxymodel.cpp
++++ b/src/kselectionproxymodel.cpp
+@@ -767,15 +767,6 @@ void KSelectionProxyModelPrivate::sourceLayoutAboutToBeChanged()
+ 
+     emit q->layoutAboutToBeChanged();
+ 
+-    QPersistentModelIndex srcPersistentIndex;
+-    Q_FOREACH (const QPersistentModelIndex &proxyPersistentIndex, q->persistentIndexList()) {
+-        m_proxyIndexes << proxyPersistentIndex;
+-        Q_ASSERT(proxyPersistentIndex.isValid());
+-        srcPersistentIndex = q->mapToSource(proxyPersistentIndex);
+-        Q_ASSERT(srcPersistentIndex.isValid());
+-        m_layoutChangePersistentIndexes << srcPersistentIndex;
+-    }
+-
+     QItemSelection selection;
+     Q_FOREACH (const QModelIndex &rootIndex, m_rootIndexList) {
+         // This will be optimized later.
+@@ -786,6 +777,15 @@ void KSelectionProxyModelPrivate::sourceLayoutAboutToBeChanged()
+     selection = kNormalizeSelection(selection);
+     emit q->rootSelectionAboutToBeRemoved(selection);
+ 
++    QPersistentModelIndex srcPersistentIndex;
++    Q_FOREACH (const QPersistentModelIndex &proxyPersistentIndex, q->persistentIndexList()) {
++        m_proxyIndexes << proxyPersistentIndex;
++        Q_ASSERT(proxyPersistentIndex.isValid());
++        srcPersistentIndex = q->mapToSource(proxyPersistentIndex);
++        Q_ASSERT(srcPersistentIndex.isValid());
++        m_layoutChangePersistentIndexes << srcPersistentIndex;
++    }
++
+     m_rootIndexList.clear();
+ }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 4120a8c..eeb5769 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 Fix-assert-in-beginRemoveRows-when-deselecting-an-empty-c.patch
 KExtraColumnsProxyModel-Persist-model-indexes-after-emitt.patch
+Update-proxies-for-recently-realised-class-of-bugs.patch

-- 
kitemmodels packaging



More information about the pkg-kde-commits mailing list