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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/netbook/containments/sal
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2009-09-30 21:11:01
Message-ID: 1254345061.817111.14951.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1029835 by aseigo:

no need to make a temporary and slow copy of the values; the map is ordered and \
foreach returns the values for us


 M  +3 -4      griditemview.cpp  


--- trunk/KDE/kdebase/workspace/plasma/netbook/containments/sal/griditemview.cpp \
#1029834:1029835 @@ -147,7 +147,6 @@
     }
 
     //Relayout the grid
-    QList<Plasma::IconWidget *>orderedItems = m_items.values();
     int validIndex = 0;
 
     QSizeF availableSize;
@@ -162,7 +161,7 @@
     }
 
     if (size().width() <= availableSize.width()) {
-        foreach (Plasma::IconWidget *icon, orderedItems) {
+        foreach (Plasma::IconWidget *icon, m_items) {
             if (m_layout->itemAt(validIndex) == icon) {
                 ++validIndex;
             } else {
@@ -187,7 +186,7 @@
         int i = 0;
 
 
-        foreach (Plasma::IconWidget *icon, orderedItems) {
+        foreach (Plasma::IconWidget *icon, m_items) {
             if (i < validIndex) {
                 ++i;
                 continue;
@@ -210,7 +209,7 @@
         int i = 0;
 
 
-        foreach (Plasma::IconWidget *icon, orderedItems) {
+        foreach (Plasma::IconWidget *icon, m_items) {
             if (i < validIndex) {
                 ++i;
                 continue;


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

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