New KPluginSelector. Finished.

André Wöbbeking Woebbeking at kde.org
Fri May 16 22:39:18 BST 2008


On Friday 16 May 2008, David Faure wrote:
> On Friday 16 May 2008, Rafael =?iso-8859-15?q?Fern=E1ndez_L=F3pez?= 
wrote:

> > QModelIndex's model() method returns a "const QAbstractItemModel*".
>
> Ah, right. If there's no way to get the model from elsewhere then the
> cast is needed, yes. I wish QModelIndex had a non-const model(), I
> needed this before too.

Me too so I asked the trolls about it, here is their reply:

"Any call to a non-const function of the model might invalidate the
QModelIndex and consequentially crash your code. Forcing the use of a
const_cast before doing this potentially dangerous operation is in this
case a good idea."




More information about the kde-core-devel mailing list