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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/desktop/containments/desktop
From:       Laurent Montel <montel () kde ! org>
Date:       2010-08-02 7:15:32
Message-ID: 20100802071532.2F265AC7A9 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1158157 by mlaurent:

const'ify


 M  +5 -5      itemspace.cpp  
 M  +5 -5      itemspace.h  


--- trunk/KDE/kdebase/workspace/plasma/desktop/containments/desktop/itemspace.cpp \
#1158156:1158157 @@ -36,7 +36,7 @@
 {
 }
 
-void ItemSpace::setWorkingArea(QSizeF area)
+void ItemSpace::setWorkingArea(const QSizeF& area)
 {
     if (workingGeom.isValid()) {
         // if the working area size changed and alignment includes right or bottom,
@@ -160,7 +160,7 @@
     }
 }
 
-qreal ItemSpace::positionVisibility (QRectF geom)
+qreal ItemSpace::positionVisibility (const QRectF& geom)
 {
     QRectF visibleArea = QRectF(QPointF(), workingGeom);
     QRectF visibleItemPart = visibleArea.intersected(geom);
@@ -193,7 +193,7 @@
     return group.m_pushAvailable;
 }
 
-bool ItemSpace::positionedProperly(QRectF itemGeom)
+bool ItemSpace::positionedProperly(const QRectF& itemGeom)
 {
     QRectF fullGeom = itemGeom.adjusted(-placementSpacing, -placementSpacing, \
placementSpacing, placementSpacing);  return (QRectF(QPointF(), \
workingGeom).contains(fullGeom)); @@ -698,7 +698,7 @@
 }
 
 // TODO: optimize
-void ItemSpace::moveItem(int groupIndex, int itemInGroup, QRectF newGeom)
+void ItemSpace::moveItem(int groupIndex, int itemInGroup, const QRectF& newGeom)
 {
     ItemSpaceItem copy = m_groups[groupIndex].m_groupItems[itemInGroup];
 
@@ -712,7 +712,7 @@
     checkPreferredPositions();
 }
 
-void ItemSpace::resizeItem(int resizeGroupId, int resizeItemInGroup, QSizeF newSize)
+void ItemSpace::resizeItem(int resizeGroupId, int resizeItemInGroup, const QSizeF& \
newSize)  {
     ItemSpaceItem &resizeItem = \
m_groups[resizeGroupId].m_groupItems[resizeItemInGroup];  QRectF oldGeom = \
                resizeItem.lastGeometry;
--- trunk/KDE/kdebase/workspace/plasma/desktop/containments/desktop/itemspace.h \
#1158156:1158157 @@ -40,13 +40,13 @@
   public:
     ItemSpace();
 
-    void setWorkingArea(QSizeF area);
+    void setWorkingArea(const QSizeF& area);
 
     /**
      * Returns the visibility of an item at a given position.
      * This is the part of the item inside the working area.
      **/
-    qreal positionVisibility(QRectF geom);
+    qreal positionVisibility(const QRectF& geom);
 
     class ItemSpaceItem
     {
@@ -109,7 +109,7 @@
      * @param itemInGroup the index of the item in its group
      * @param newGeom the new geometry of the item
      **/
-    void moveItem(int groupIndex, int itemInGroup, QRectF newGeom);
+    void moveItem(int groupIndex, int itemInGroup, const QRectF& newGeom);
 
     /**
      * Resize an item. The item's alignment corner will be the center of resizing.
@@ -118,7 +118,7 @@
      * @param direction in which direction pushing will be done
      * @param newSize the item's new size
      **/
-    void resizeItem(int groupId, int itemInGroup, QSizeF newSize);
+    void resizeItem(int groupId, int itemInGroup, const QSizeF& newSize);
 
     /**
      * Offset the positions of all items.
@@ -164,7 +164,7 @@
         bool findAll
     ) const;
 
-    bool positionedProperly(QRectF itemGeom);
+    bool positionedProperly(const QRectF& itemGeom);
 
     /**
      * Represents a group of overlapping items.


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

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