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

List:       kde-commits
Subject:    kdepim/kaddressbook/views
From:       Laurent Montel <montell () club-internet ! fr>
Date:       2003-01-17 10:53:53
[Download RAW message or body]

CVS commit by mlaurent: 

Add const
fix mem leak


  M +7 -8      cardview.cpp   1.7
  M +86 -86    cardview.h   1.3
  M +25 -24    kaddressbooktableview.cpp   1.5
  M +5 -8      kaddressbooktableview.h   1.4


--- kdepim/kaddressbook/views/cardview.cpp  #1.6:1.7
@@ -488,7 +488,5 @@ void CardViewItem::setCaption(const QStr
 {
   d->mCaption = caption;
-
-  if (mView)
-    mView->repaintItem(this);
+  repaintCard();
 }
 
@@ -636,4 +634,6 @@ CardView::CardView(QWidget *parent, cons
 CardView::~CardView()
 {
+    delete d->mFm;
+    delete d->mBFm;
   delete d;
 }
@@ -1617,5 +1616,5 @@ void CardView::drawRubberBands( int pos 
 
 
-int CardView::itemWidth()
+int CardView::itemWidth()const
 {
   return d->mItemWidth;
@@ -1663,5 +1662,5 @@ void CardView::setSeparatorWidth( int wi
 }
 
-int CardView::maxFieldLines()
+int CardView::maxFieldLines()const
 {
   return d->mMaxFieldLines;

--- kdepim/kaddressbook/views/cardview.h  #1.2:1.3
@@ -342,5 +342,5 @@ class CardView : public QScrollView
 
     /** @return the width made available to the card items. */
-    int itemWidth();
+    int itemWidth()const;
 
     /** Sets the width made available to card items. */
@@ -368,5 +368,5 @@ class CardView : public QScrollView
     
     /** @return the maximum number of lines pr field */
-    int maxFieldLines();
+    int maxFieldLines()const;
     
   signals:

--- kdepim/kaddressbook/views/kaddressbooktableview.cpp  #1.4:1.5
@@ -12,4 +12,5 @@
 #include <qevent.h>
 #include <qurl.h>
+#include <qpixmap.h>
 
 #include <kabc/addressbook.h>

--- kdepim/kaddressbook/views/kaddressbooktableview.h  #1.3:1.4
@@ -10,10 +10,7 @@
 #include <qstring.h>
 #include <qdialog.h>
-#include <qpixmap.h>
 #include <qtabdialog.h>
-#include <qfileinfo.h>
 #include <qstringlist.h>
 #include <qvaluelist.h>
-#include <qtooltip.h>
 
 #include "undo.h"


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

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