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

List:       kde-commits
Subject:    KDE/kdeplasma-addons/applets/frame
From:       Anne-Marie Mahfouf <annma () kde ! org>
Date:       2010-04-30 5:54:07
Message-ID: 20100430055407.76A92AC8A7 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1120926 by annma:

stop timer when engine is not used anymore
add a few comments


 M  +5 -2      frame.cpp  


--- trunk/KDE/kdeplasma-addons/applets/frame/frame.cpp #1120925:1120926
@@ -583,6 +583,7 @@
     Plasma::DataEngine *engine = dataEngine("potd");
     const QString identifier = m_potdProvider + ':' + m_currentDay.toString(Qt::ISODate);
     engine->disconnectSource(identifier, m_mySlideShow);
+    m_autoUpdateTimer->stop();
 }
 
 void Frame::initSlideShow()
@@ -733,17 +734,19 @@
 {
     if ( ( m_currentDay != QDate::currentDate() ) ) {
         reloadImage();
-    }
-    
+        //keep after reloadImage()
     m_currentDay = QDate::currentDate();
 }
+}
 
 void Frame::reloadImage()
 {
     if (m_potd) {
         Plasma::DataEngine *engine = dataEngine("potd");
+        //disconnect yesterday's source
         QString identifier = m_potdProvider + ':' + m_currentDay.toString(Qt::ISODate);
         engine->disconnectSource(identifier, m_mySlideShow);
+        //connect today's source
         identifier = m_potdProvider + ':' + QDate::currentDate().toString(Qt::ISODate);
         engine->connectSource(identifier, m_mySlideShow);
     } else {
[prev in list] [next in list] [prev in thread] [next in thread] 

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