if(parentItem == 0 || webPreview.parentItem == parentItem) {
// posting an event ensures that the item will not be removed as
// the result of another event. this could result in bad segfaults
if(parentItem == 0 || webPreview.parentItem == parentItem) {
// posting an event ensures that the item will not be removed as
// the result of another event. this could result in bad segfaults