when you touch this function, I think it is possible to simplify workflow. You always delesetAllItems and always return item ( even if it is NULL). So it can look like:

```C
YItem *
YComboBox::selectedItem()
{
    // Make sure exactly this item is selected (and no other). If item not found, then don't select anything
    YSelectionWidget::deselectAllItems();

    // Try to find an item with this text
    YItem * item = findItem( text() );

    if ( item )
    {
        item->setSelected( true );
    }

    return item;
}
```

I think it is easier to see what is going on.