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

List:       kde-commits
Subject:    kroupware_branch: kdepim
From:       Bo Thorsen <bo () sonofthor ! dk>
Date:       2003-06-11 8:37:32
[Download RAW message or body]

CVS commit by thorsen: 

Fix kroupware issue #300 - avoid performance issues while syncing a large dir in \
kmail.


  M +6 -2      korganizer/kogroupware.cpp   1.1.2.18
  M +12 -1     libkcal/calendarimap.cpp   1.1.2.62
  M +4 -3      libkcal/calendarimap.h   1.1.2.28


--- kdepim/korganizer/kogroupware.cpp  #1.1.2.17:1.1.2.18
@@ -79,6 +79,10 @@ KOGroupware::KOGroupware( QObject* kmail
   mCalendar = calendar;
   CalendarIMAP* mCalendarIMAP = dynamic_cast<CalendarIMAP*>( mCalendar );
-  if( mCalendarIMAP )
-    connect( mCalendarIMAP, SIGNAL( eventsChanged() ), this, SLOT( \
slotPerhapsUploadFB() ) ); +  if( mCalendarIMAP ) {
+    connect( mCalendarIMAP, SIGNAL( eventsChanged() ),
+             this, SLOT( slotPerhapsUploadFB() ) );
+    connect( kmailTarget, SIGNAL( syncRunning( const QString&, bool ) ),
+             mCalendarIMAP, SLOT( slotSyncRunning( const QString&, bool ) ) );
+  }
 
   connect( this, SIGNAL( newOrUpdatedNote( const QString&, const QString&, const \
QColor&, const QString& ) ),

--- kdepim/libkcal/calendarimap.cpp  #1.1.2.61:1.1.2.62
@@ -757,3 +757,14 @@ void CalendarIMAP::emitEventsChanged()
 }
 
+void CalendarIMAP::slotSyncRunning( const QString& type, bool running )
+{
+  if( type == "Event" || type == "Calendar" ||
+      type == "Task" || type == "Todo" ) {
+    if( running )
+      startBulkUpdate();
+    else
+      stopBulkUpdate();
+  }
+}
+
 #include "calendarimap.moc"

--- kdepim/libkcal/calendarimap.h  #1.1.2.27:1.1.2.28
@@ -110,8 +110,9 @@ public slots:
   virtual void slotTasksFolderExpunged();
   virtual void slotRefreshAll();
+  virtual void slotSyncRunning( const QString&, bool );
 
-private slots:
-  void slotDoIncidenceUpdated();
-  void slotDoAlarmUpdate();
+protected slots:
+  virtual void slotDoIncidenceUpdated();
+  virtual void slotDoAlarmUpdate();
 
 protected:


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

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