[Kst] Fwd: kdelibs/kdeui

George Staikos staikos at kde.org
Sat Jul 10 17:48:09 CEST 2004


This is probably a factor for us in data mode...  Fix will only be in 3.3.


----------  Forwarded Message  ----------

Subject: kdelibs/kdeui
Date: Saturday 10 July 2004 02:38
From: Clarence Dang <dang at kde.org>
To: kde-cvs at kde.org

CVS commit by dang:

Don't call QStatusBar::reformat() when the text of a fixed
item is changed since the layout of the statusbar won't be changed.  This
dramatically reduces CPU usage if the text is set frequently (e.g. moving the
mouse over the drawing area in KolourPaint).

Actually, I'm not sure if calling reformat() is ever needed at all since I
imagine geometry management would take care of it.

This is the patch I sent to kde-core-devel on Jun 16.


  M +4 -1      kstatusbar.cpp   1.49


--- kdelibs/kdeui/kstatusbar.cpp  #1.48:1.49
@@ -132,6 +132,9 @@ void KStatusBar::changeItem( const QStri
     }
     l->setText(text);
+    if(l->minimumWidth () != l->maximumWidth ())
+    {
     reformat();
   }
+  }
   else
     kdDebug() << "KStatusBar::changeItem: bad item id: " << id << endl;

-------------------------------------------------------

-- 
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/



More information about the Kst mailing list