'Custom sorting implementation.
Prefers all items which start with self._pattern. Other than that, keep
items in their original order.
Args:
_lindex: The QModelIndex of the left item (*left* < right)
rindex: The QModelIndex of the right item (left < *right*)
Return:
True if left < right, else False'

def lessThan(self, _lindex, rindex):

    qtutils.ensure_valid(rindex)
    right = self.srcmodel.data(rindex)
    return (not right.startswith(self._pattern))
