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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/applets/clock
From:       Andreas Aardal Hanssen <ahanssen () trolltech ! com>
Date:       2007-09-10 19:46:14
Message-ID: 1189453574.069004.13405.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 710747 by bibr:

Add caching as an experiment. The speed-up is very noticable
when moving the clock around.



 M  +3 -2      clock.cpp  


--- trunk/KDE/kdebase/workspace/plasma/applets/clock/clock.cpp #710746:710747
@@ -51,6 +51,7 @@
       m_dialog(0)
 {
     setHasConfigurationInterface(true);
+    setCachePaintMode(DeviceCoordinateCacheMode);
 
     KConfigGroup cg = config();
     m_showTimeString = cg.readEntry("showTimeString", false);
@@ -107,7 +108,7 @@
     }
 
     m_lastTimeSeen = m_time;
-    update();
+    invalidate();
 }
 
 void Clock::showConfigurationInterface() //TODO: Make the size settable
@@ -137,7 +138,7 @@
     cg.writeEntry("showTimeString", m_showTimeString);
     cg.writeEntry("showSecondHand", m_showSecondHand);
     dataEngine("time")->setProperty("reportSeconds", m_showSecondHand);
-    QGraphicsItem::update();
+    invalidate();
     cg.writeEntry("size", ui.spinSize->value());
     m_size = QSize(ui.spinSize->value(), ui.spinSize->value());
     m_theme->resize(m_size);
[prev in list] [next in list] [prev in thread] [next in thread] 

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