-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sortproxymodel: check if source model is a proxy model #31
base: master
Are you sure you want to change the base?
Conversation
Doesn't this rather mean that KSortFilterProxyModel forgets to emit modelReset in its own setSourceModel? It's supposed to tell the world if its own source model changes.... |
I'm actually testing it with a custom proxy model that simply subclassed KDToolBox/qt/model_view/sortProxyModel/sortproxymodel.cpp Lines 133 to 135 in e3fd152
|
Then the bug is that |
Currently, when using
If we call |
Oh, just realized, did you mean treat |
I don't really know. I actually don't know anything about |
Above is a simple test program for the issue that I want to address. (the code is plainly for testing purpose so it's still sort of messy)
|
if the source model is a proxy model, the source model's source model might be changed and our sortproxymodel won't get notified. This might happen when we try to pass a QML-based proxy model as source model, like KItemModel.KSortFilterProxyModel for example.
Patch updated, now we rely on |
@dfaure-kdab sorry for the ping, could you check if the updated patch is fine to merge? |
As I said, @AndreSomers will be the one to approve this, as the maintainer of sortproxymodel. |
if the source model is a proxy model, the source model's source model might be changed and our SortProxyModel won't get notified. This might happen when we try to pass a QML-based proxy model as source model, like KDE Framework's
KItemModel.KSortFilterProxyModel
for example.