summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2004-10-17 18:08:43 (UTC)
committer zautrix <zautrix>2004-10-17 18:08:43 (UTC)
commit6f6d1d58938539215bb4fcb5b97cf9fb089a11ef (patch) (side-by-side diff)
tree9937fe24c3fa3f29421b39a58b393e893a11636a /korganizer
parentd92f58ffa1937af8a4240b9d235da15f5f352769 (diff)
downloadkdepimpi-6f6d1d58938539215bb4fcb5b97cf9fb089a11ef.zip
kdepimpi-6f6d1d58938539215bb4fcb5b97cf9fb089a11ef.tar.gz
kdepimpi-6f6d1d58938539215bb4fcb5b97cf9fb089a11ef.tar.bz2
more KDE sync fixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp29
-rw-r--r--korganizer/calendarview.h1
2 files changed, 19 insertions, 11 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index f727cd4..ff1db2c 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -759,3 +759,3 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b
if ( localMod == remoteMod )
- if ( local->revision() == remote->revision() )
+ // if ( local->revision() == remote->revision() )
return 0;
@@ -934,7 +934,4 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
local->resetTempSyncStat();
-#ifdef DESKTOP_VERSION
- //Needed for KDE - OL sync
- local->resetPilotStat();
- remote->resetPilotStat();
-#endif
+ if ( mSyncKDE )
+ remote->resetPilotStat(1);
mLastCalendarSync = QDateTime::currentDateTime();
@@ -971,3 +968,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
}
- if ( fullDateRange )
+ if ( fullDateRange && !mSyncKDE )
mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365);
@@ -1033,5 +1030,4 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
remote->addIncidence( inR );
-#ifdef DESKTOP_VERSION
- inR->setPilotId( 1 );
-#endif
+ if ( mSyncKDE )
+ inR->setPilotId( 2 );
++changedRemote;
@@ -1041,4 +1037,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
idS = inL->IDStr();
+ int pid = inL->pilotId();
local->deleteIncidence( inL );
inL = inR->clone();
+ if ( mSyncKDE )
+ inL->setPilotId( pid );
inL->setIDStr( idS );
@@ -1183,4 +1182,6 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
eventLSync->setReadOnly( true );
- if ( mGlobalSyncMode == SYNC_MODE_NORMAL)
+ if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncKDE) // kde is abnormal...
remote->addEvent( eventRSync );
+ else
+ delete eventRSync;
QString mes;
@@ -3736,2 +3737,7 @@ bool CalendarView::sync(KSyncManager* manager, QString filename, int mode)
// mSyncManager = manager;
+ mSyncKDE = false;
+ if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) {
+ qDebug("SyncKDE request detected!");
+ mSyncKDE = true;
+ }
mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice();
@@ -3742,2 +3748,3 @@ bool CalendarView::syncExternal(KSyncManager* manager, QString resource)
{
+ mSyncKDE = false;
//mSyncManager = manager;
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 9f56cc8..1cd896d 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -489,2 +489,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
private:
+ bool mSyncKDE;
KSyncManager* mSyncManager;