The proxy would initially say columnCount==0 and would then omit to notify
about the insertion of columns. Simpler to just always have columns, even
when we have 0 rows.
CCBUG: 352369
CCMAIL: steveire@gmail.com
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
Note: QStringLiteral and multi-line string literals are not possible
with MSVC 2013 and below (known compiler bug/limitation).
Patch by Paul Wulff <paul.wulff@gmail.com>
CCMAIL: montel@kde.org
Turns out that there's apparently no overload accepting a QPointer as
the first argument.
This is on Gentoo with qtbase e374ffc29c67493a51527117b55a53dfa5dd4267
and GCC 4.8.3.
Also make sure to tie the lifetime of the connection with `this` because
the lambda accesses our D-pointer, which means that it has to be
disconnected on destruction of `this`. Thanks to Milian Wolff for
catching this.
REVIEW: 123679
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.
The KSPM should never clear or reset the selection of the
QItemSelectionModel it refers to. It should be a read-only view on
that selection. If the selection changes while the source is being
reset, ignore that selection change. The proxy will clear its own
cached data when it processes the modelReset signal from the model,
and will populate itself with the selection as it is at that point.