QSFPM: remove redundant call to update_source_sort_column()
Everywhere else in this code, it says
if (update_source_sort_column() && dynamic_sortfilter)
so, doing the same here.
This originally comes from commit 3ffcfc357d
but skelly isn't around anymore, and Milian (reviewer) had
no objection to this change either. Looking into the implementation,
calling it twice is a no-op anyway, create_mapping will early-return
with "already done".
On the other hand, now it has a chance of returning true, while before
it would always return false in the second call ("return true if the column was changed").
I couldn't write a unittest for that case though, it would require that
a source reset also changes the proxy->source column mapping somehow,
but I don't see how that can be done (the latter being the QSFPM setup).
Change-Id: Ie560facf1039a1afc02543e83bfdef0f8f2e09fc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
0263cfdfa0
commit
a5073956f8
@ -1623,8 +1623,7 @@ void QSortFilterProxyModelPrivate::_q_sourceReset()
|
||||
_q_clearMapping();
|
||||
// All internal structures are deleted in clear()
|
||||
q->endResetModel();
|
||||
update_source_sort_column();
|
||||
if (dynamic_sortfilter && update_source_sort_column())
|
||||
if (update_source_sort_column() && dynamic_sortfilter)
|
||||
sort();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user