From 7aedc83ffa5283b47fa2af8e2b4e0c5fce114f19 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Sat, 11 Apr 2020 15:04:21 +0200 Subject: [PATCH] Use hasChildren --- src/foldershortcutactionmanager.cpp | 2 +- src/unityservicemanager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); } }