I had some bugs with QComboBox::findData(). After investigation the problems seems to comes from this model (KRecursiveFilterProxyModel). For some reason (i'm lazy to read the entire code to know why it does that), if the role is >= Qt::UserRole then the model use an own mechanism to do the match. This is causing a lots of issues because it break linearity of the proxy model lookup. ie, instead of looking the (proxy)model from 0 to rowCount as requested @ [1], the mapping from proxy to source force a start change [2] - it now starts at the (source)model row, which depending the (proxy)model sorting can be the middle to last rows of the source model, to (source)model rowCount, vanishing anything before the source start. The result behavior is that many possible and valid matches are skipped because QComboBox::findData is not wrapping by default. Manually adding the Qt::MatchWrap flag fix the issue for my case, though I don't find it the correct fix, simply because it break the natural order of the returned indexes compared to the normal match() algorithm. [1]: https://code.woboq.org/qt5/qtbase/src/widgets/widgets/qcombobox.cpp.html#1581 [2]: https://code.woboq.org/qt5/kf5/kitemmodels/src/krecursivefilterproxymodel.cpp.html#288
In plus to the reported natural order break, this also break proxies defining roles in themselves not present in the source model.
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version? If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!