[Development] HEADS UP: Don't use QList, use Q_DECLARE_TYPEINFO
Smith Martin
Martin.Smith at theqtcompany.com
Fri Jul 10 12:37:07 CEST 2015
ok, thanks, G. That explains it. And then there is the further point that it is unwise to use Q_DECLARE_TYPEINFO to declare C to be "good" in this case. What was the reasoning there?
martin
________________________________________
From: development-bounces+martin.smith=theqtcompany.com at qt-project.org <development-bounces+martin.smith=theqtcompany.com at qt-project.org> on behalf of Giuseppe D'Angelo <giuseppe.dangelo at kdab.com>
Sent: Friday, July 10, 2015 12:33 PM
To: development at qt-project.org
Subject: Re: [Development] HEADS UP: Don't use QList, use Q_DECLARE_TYPEINFO
Il 10/07/2015 12:20, Smith Martin ha scritto:
> Sorry, you're the one who said it's bad; I'm quite happy with it. I'm asking if QList<C> becomes QList<C*> even if I declare it as QList<C>.
"Becomes" is a technically-unsound verb so I won't use it...
What happens for QList<C>, if C is "bad", is that the backing array
allocated by QList will store pointers to C (i.e. it will be an array of
C*, not an array of C).
HTH,
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Software Engineer
KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
KDAB - The Qt Experts
More information about the Development
mailing list