forked from qt-creator/qt-creator
Use isEmpty() vs "count() == 0"
Change-Id: I9b3103fbc4e881693039c1a5e81f0d2b97803978 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
committed by
Laurent Montel
parent
65e22d5a0a
commit
f3c8a2db1e
@@ -164,7 +164,7 @@ void TaskModel::clearTasks(Core::Id categoryId)
|
||||
typedef QHash<Core::Id,CategoryData>::ConstIterator IdCategoryConstIt;
|
||||
|
||||
if (!categoryId.isValid()) {
|
||||
if (m_tasks.count() == 0)
|
||||
if (m_tasks.isEmpty())
|
||||
return;
|
||||
beginRemoveRows(QModelIndex(), 0, m_tasks.count() -1);
|
||||
m_tasks.clear();
|
||||
|
||||
Reference in New Issue
Block a user