[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: New KPluginSelector. Finished.
From: André_Wöbbeking <Woebbeking () kde ! org>
Date: 2008-05-16 21:39:18
Message-ID: 200805162339.20833.Woebbeking () kde ! org
[Download RAW message or body]
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."
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic