That error message may be related to the QVariant object that is used to store the data associated with each item. The QVariant has a set of resource types that determine how the object is cast to the type or structure that is being stored there (much like a union can store multiple types.
The custom Qt:UserRole values can be used in Standard Model items to store data of specific types which are returned in a QVariant when data is read from a model item. and my guess is this is where the problem lies. An unknown QVariant type wil throw an error.
Qt allows additional user defined types to be defined and used to allow QVariants to store user defined objects/structures. The Qt:UserRole > user defined field type is used in storing the sort order for how items in the BookBrowser should be stored. I will take another longer look to see if they are being used properly in the BookBrowser. Someone should do the same for the KDE Qt plugin which may overwrite or change things.
Last edited by KevinH; 10-10-2018 at 10:11 AM.
Reason: Corrected and updated based on new understanding
|