Use QString::isEmpty() instead of size() comparsion