[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kdeui/itemviews
From:       Alex Merry <kde () randomguy3 ! me ! uk>
Date:       2010-10-01 23:00:16
Message-ID: 20101001230018.1F236AC891 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1181738 by alexmerry:

Avoid an infinite loop in some cases when there is only one item in the block



 M  +3 -0      kcategorizedview.cpp  


--- trunk/KDE/kdelibs/kdeui/itemviews/kcategorizedview.cpp #1181737:1181738
@@ -369,6 +369,9 @@
     int res = prevRect.height();
     Q_FOREVER {
         prevIndex = proxyModel->index(prevIndex.row() - 1, q->modelColumn(), q->rootIndex());
+        if (!prevIndex.isValid()) {
+            return res;
+        }
         const QRect tempRect = q->visualRect(prevIndex);
         if (tempRect.topLeft().y() < prevRect.topLeft().y()) {
             break;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic