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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/netbook/containments/sal
From:       Marco Martin <notmart () gmail ! com>
Date:       2009-11-30 21:08:43
Message-ID: 1259615323.861563.26278.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1056787 by mart:

move the row/columns calculation out of the loop, since this value may change during te loop


 M  +4 -2      itemcontainer.cpp  


--- trunk/KDE/kdebase/workspace/plasma/netbook/containments/sal/itemcontainer.cpp #1056786:1056787
@@ -232,8 +232,10 @@
         }
     }
 
-    for (int row = validRow; row < m_layout->rowCount(); ++row) {
-        for (int column = validColumn; column < m_layout->columnCount(); ++column) {
+    const int nRows = m_layout->rowCount();
+    const int nColumns = m_layout->columnCount();
+    for (int row = validRow; row < nRows; ++row) {
+        for (int column = validColumn; column < nColumns; ++column) {
             QGraphicsLayoutItem * item = m_layout->itemAt(row, column);
             //FIXME: no other way to remove a specific item in a grid layout
             // this s really, really horrible
[prev in list] [next in list] [prev in thread] [next in thread] 

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