Fix double-free on ItemWidget in cache in Qt 4.8

Unreasonable double-free when using QList::value() on items of type
QSharedPointer<ItemWidget> (Qt 4 bug?).