If the row being removed from the source model isn't shown by KRFPM,
it's correct that we don't need to emit any signals, however we still
need to tell our base class QSFPM so that it updates the mappings
of the visible siblings below that removed row.
Testcase: deleting the Last Search folder in kmail
(full integration test for this testcase will be added to mailcommon).
REVIEW: 128428
BUG: 349789
FIXED-IN: 5.25
We need to disconnect from a previous source model if present, not the new
one, and we need to be prepared for the new source model to be 0.
REVIEW: 126117
The compiler is not smart enough to hoist this call out
of the loop. But we can expect that the row count will not
change during a call to filterAcceptsRow.
0df92439241a76c6a67efa9485bd95c3c25d63a0 by Christian Mollekopf
445453a6ab79a57f5ed2a94ba35afa36fbb8e325 by myself
+ a fix for the runtime warnings with Qt < 5.5, grabbed from Gammaray's copy.
QMetaObject::invokeMethod calls QMetaObject::indexForMethod internally,
which is rather expensive. So look up the method once, and invoke it
via QMetaMethod directly.
REVIEW: 122109
The upstream commit f96baeb75fc36a41d2b08f880536cee5a8041e79
with the title:
QSortFilterProxyModel: honor the roles parameter of dataChanged
changes the signature of the private _q_sourceDataChanged slot
of QSortFilterProxyModel. I talked to Peppe and he told me to just
use the new signature from Qt 5.5 and onwards. Note that the vector
of roles was present in the dataChanged signal from 5.0 onwards
already. It was simply ignored by QSFPM so far.
Indeed, this patch fixes the following crash on Kate startup for me:
QMetaObject::invokeMethod: QMetaObject::invokeMethod: No such method
KRecursiveFilterProxyModel::_q_sourceDataChanged(QModelIndex,QModelIndex)
Candidates are:
_q_sourceDataChanged(QModelIndex,QModelIndex,QVector<int>)
ASSERT: "success" in file
kf5/src/frameworks/kitemmodels/src/krecursivefilterproxymodel.cpp, line 55
REVIEW: 121931
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
techbase wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://community.kde.org/Frameworks/GitOldHistory
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo, kdelibs frameworks branch, at commit
162066dbbecde401a7347a1cff4fe72a9c919f58