Version: (using Devel) Installed from: Compiled sources OS: Linux I was playing with KCategorizedView and noticed that it crashes with a segfault when the supplied model is not a KCategorizedSortFilterProxyModel (and thus m_proxyModel is NULL). The crashes occur when one single-clicks an entry, or double-clicks to rename it. (There are parts of the code that check of m_proxyModel is NULL, so I assume this usage of the class is meant to be valid.) Patch attached below. The same also occurs when no KCategoryDrawer is supplied, but I'm not sure how to fix that.
Created attachment 23910 [details] fix crashes when m_proxyModel is NULL
Created attachment 23911 [details] Test case for proxy model Remove the drawer bit to fire off the other crash. Steps to reproduce: 1. Click an entry For the drawer (after the patch is applied, otherwise it crashes before you finish this): 1. Double-click an entry 2. Type a new name 3. Press enter
Thanks for notifying. I can't check the patches nor the problems at the moment, but I can tell some info: - KCategorizedView is not meant to be used with a model different from a KCategorizedSortFilterProxyModel. On the other hand, it shouldn't force it to crash. About the crashes, I am aware of some "random" crashes, that happens if you don't call, for instance: listView->setSpacing(10); If calling to that method makes the view not to crash anymore, please close this bug. If it is still crashing, please confirm so, and I will take a look next week. Thank you.
The crashes still occur for me when adding the call.
Thanks for your observations. KCategorizedView shouldn't crash now.