On Mon, Aug 21, 2006 at 01:09:57PM +0200, Edwin Leuven wrote:
> which makes me wonder why it works for kde...
>
> is the following a good solution?
>
> unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() :
> (unsigned int *)img.colorTable().begin();
Probably not. I am not sure about Qt guarantes, but if this were
Standard C++ it would break on some conforming implementations.
The iterator can be a 'real' object, not a bald pointer e.g.
unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() :
&img.colorTable()[0]
would be better in any case.
Andre'