Re: [Development] Role names and Proxy Models

2012-01-17 Thread Stephen Kelly
On Tuesday, January 17, 2012 08:48:29 you wrote: Wouldn't that force the model to reset twice? That is, would I not have to add beginResetModel / endResetModel around the call to setRoleNames? Yes, true. Also not an unsolvable problem. In Qt5 it's not so relevant anyway because roleNames is

Re: [Development] Role names and Proxy Models

2012-01-16 Thread Stephen Kelly
Hi Johan, Please reply to the list. On Monday, January 16, 2012 08:22:48 you wrote: 2012/1/16 Stephen Kelly stephen.ke...@kdab.com: I'm not sure what your actual proposal is? My issue is that the role names of a proxy model are taken directly from the model being proxied, i.e. the

Re: [Development] Role names and Proxy Models

2012-01-16 Thread Olivier Goffart
On Monday 16 January 2012 02:13:44 Stephen Kelly wrote: [...] If QML doesn't re-read the rolenames when the model is reset, then there's a patch to be made in QtDeclarative. (QAbstractProxyModel doesn't re-read them on reset either. Ogoffart rejected my patch to make it do that for reasons

Re: [Development] Role names and Proxy Models

2012-01-16 Thread Giuseppe D'Angelo
On 16 January 2012 12:21, Olivier Goffart oliv...@woboq.com wrote: I think Qt 5 still do not implement ways to notify that the role name change. Proper signals to handle that (along the lines of all other QAIM signals) can always be added after 5.0, right? -- Giuseppe D'Angelo

Re: [Development] Role names and Proxy Models

2012-01-16 Thread Stephen Kelly
On Monday, January 16, 2012 13:21:19 you wrote: On Monday 16 January 2012 02:13:44 Stephen Kelly wrote: [...] If QML doesn't re-read the rolenames when the model is reset, then there's a patch to be made in QtDeclarative. (QAbstractProxyModel doesn't re-read them on reset either.

Re: [Development] Role names and Proxy Models

2012-01-16 Thread Olivier Goffart
On Monday 16 January 2012 13:48:33 Stephen Kelly wrote: On Monday, January 16, 2012 13:21:19 you wrote: On Monday 16 January 2012 02:13:44 Stephen Kelly wrote: [...] If QML doesn't re-read the rolenames when the model is reset, then there's a patch to be made in QtDeclarative.

Re: [Development] Role names and Proxy Models

2012-01-15 Thread Stephen Kelly
On Friday, January 13, 2012 22:37:16 Johan Thelin wrote: Hi all, I've been constructing a proxy model that hides multiple underlying models. In this process, I have to translate the custom roles for each model. E.g. the custom role enumeration for the duration of a music track is not the