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

List:       kde-commits
Subject:    KDE/kdepim/knotes
From:       Laurent Montel <montel () kde ! org>
Date:       2009-03-03 18:26:48
Message-ID: 1236104808.861101.14409.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 934748 by mlaurent:

Minor optimization


 M  +7 -5      knotesalarm.cpp  


--- trunk/KDE/kdepim/knotes/knotesalarm.cpp #934747:934748
@@ -48,9 +48,9 @@
 {
   setObjectName( name );
   // TODO: fix timezone stuff?
-  
+
   connect( &m_checkTimer, SIGNAL( timeout() ), SLOT( checkAlarms() ) );
-  
+
   // interval in seconds
   m_checkTimer.start( 1000 * KNotesGlobalConfig::self()->checkInterval() );
 }
@@ -61,19 +61,21 @@
   if ( !from.isValid() ) {
     from.setTime_t( 0 );
   }
-  
+
   KDateTime now = KDateTime::currentLocalDateTime();
   KNotesGlobalConfig::self()->setAlarmsLastChecked( now.dateTime() );
   QList<KCal::Alarm *> alarms = m_manager->alarms( KDateTime( from,
 KDateTime::LocalZone ), now );
-  
+  if ( alarms.isEmpty() )
+      return;
+
   QStringList notes;
   QList<KCal::Alarm *>::ConstIterator it;
   for ( it = alarms.constBegin(); it != alarms.constEnd(); ++it ) {
     KCal::Incidence *incidence = ( *it )->parent();
     notes += incidence->summary();
   }
-  
+
   if ( !notes.isEmpty() ) {
     KMessageBox::informationList( 0,
                                   i18n( "The following notes triggered "
[prev in list] [next in list] [prev in thread] [next in thread] 

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