From 268dad58f685d589bc05251ec9d52df7333aa257 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 26 Aug 2012 20:43:27 +0300 Subject: [PATCH] TorrentContentModel code clean up --- src/torrentcontentmodelfolder.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/torrentcontentmodelfolder.cpp b/src/torrentcontentmodelfolder.cpp index 670b20cf4..6162da668 100644 --- a/src/torrentcontentmodelfolder.cpp +++ b/src/torrentcontentmodelfolder.cpp @@ -98,8 +98,7 @@ void TorrentContentModelFolder::updatePriority() if (isRootItem()) return; - if (m_childItems.isEmpty()) - return; + Q_ASSERT(!m_childItems.isEmpty()); // If all children have the same priority // then the folder should have the same @@ -113,7 +112,7 @@ void TorrentContentModelFolder::updatePriority() } // All child items have the same priority // Update own if necessary - if (prio != priority()) + if (prio != m_priority) setPriority(prio); }