Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.13.0
-
None
-
Windows 10
Qt 5.13.0 MSVC 2017 x64
Qt Creator 4.9.2
Based on Qt 5.12.4 (MSVC 2017, 32 bit)
Built on Jun 26 2019 11:28:42
From revision 8181363fa9
Description
QIdentityProxyModel, as described in the documentation, is most often used to manipulate data, either by introducing new roles not previously available through the source model or by changing the values certain roles return.
QModelIndexList QIdentityProxyModel::match(const QModelIndex &start, int role, const QVariant &value, int hits = 1, Qt::MatchFlags flags = Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const
The existing implementation of QIdentityProxyModel::match does not take this into account. It should be matching the passed value against the data returned by the proxy model; instead it returns the source model's data.
I would have included a small example that filters and remaps certain roles. You would see that calling the proxy model's match method fails when passed the role appropriate for the proxy model, instead succeeding when passed the role from the source model.
"Jira could not attach the file as there was a missing token. Please try attaching the file again."
This Jira issue has existed for over a year now... Going to try to attach via another browser.