diff --git a/src/foldershortcutactionmanager.cpp b/src/foldershortcutactionmanager.cpp index ec49a32ad..6b3c0fd28 100644 --- a/src/foldershortcutactionmanager.cpp +++ b/src/foldershortcutactionmanager.cpp @@ -100,7 +100,7 @@ void FolderShortcutActionManager::updateShortcutsForIndex(const QModelIndex &par if (collection.isValid()) { shortcutChanged(collection); } - if (model->rowCount(child) > 0) { + if (model->hasChildren(child)) { updateShortcutsForIndex(child, 0, model->rowCount(child) - 1); } } diff --git a/src/unityservicemanager.cpp b/src/unityservicemanager.cpp index a5c8051a7..ff54ec6da 100644 --- a/src/unityservicemanager.cpp +++ b/src/unityservicemanager.cpp @@ -97,7 +97,7 @@ void UnityServiceManager::unreadMail(const QAbstractItemModel *model, const QMod } } } - if (model->rowCount(index) > 0) { + if (model->hasChildren(index)) { unreadMail(model, index); } }