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

List:       kde-commits
Subject:    playground/network/videocatcher/src
From:       Jonas Emanuel Müller <zanoi () zanoi ! net>
Date:       2010-10-21 15:19:05
Message-ID: 20101021151905.CA501AC897 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1188165 by jonasemuller:

only set auto refresh timer if there are any channels

 M  +2 -0      mainwindowkde.cpp  


--- trunk/playground/network/videocatcher/src/mainwindowkde.cpp #1188164:1188165
@@ -614,6 +614,7 @@
 void MainWindow::initAutoRefreshChannels()
 {
     d->m_autoRefreshChannelsTimer->stop(); //if timer is already running, stop it
+    if(d->m_channelModel->rowCount()) { //only set timer if there are any channels
     //get the refresh single channel refresh time from the settings and convert it \
                to milliseconds
     int singleChannelAutoRefreshInterval = \
Configure::channelRefreshInterval().toInt() * 60000;  //do nothing if refresh \
interval is set to 0 @@ -626,6 +627,7 @@
     connect(d->m_autoRefreshChannelsTimer, SIGNAL(timeout()), this, \
                SLOT(autoRefreshChannels()));
     d->m_autoRefreshChannelsTimer->start(autoRefreshInterval); //start counter with \
the calculated refresh time and calling autoRefreshChannels  }
+}
 
 /** This is the slot that is called  by the timer to automatically refresh channels. \
                
  * It works by refreshing one channel at each call, and cycling through all \
available channels.


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

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