QVector QPointer <QGraphicsItem> > _graphicsItems;

QMutableVectorIterator<QPointer <QGraphicsItem> > pit(_graphicsItems);
QPointer <QGraphicsItem *> pi;
while (pit.hasNext())
{
pi = pit.next();
if (pi) delete pi;
pit.remove();
}

Won't compile. What am I doing wrong?


For source and errors:
http://pastebin.ca/1248802