summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2004-08-02 00:52:35 (UTC)
committer zautrix <zautrix>2004-08-02 00:52:35 (UTC)
commit54157cb44316de72d776cfae70bdadf6c52f4773 (patch) (side-by-side diff)
tree953c8ae225a54fc43a7298d49b08e821bf741cb9 /korganizer
parent3ebd85e83e6f9d4ac59ce1828548f7236e2b1af0 (diff)
downloadkdepimpi-54157cb44316de72d776cfae70bdadf6c52f4773.zip
kdepimpi-54157cb44316de72d776cfae70bdadf6c52f4773.tar.gz
kdepimpi-54157cb44316de72d776cfae70bdadf6c52f4773.tar.bz2
Hack, hack, hack
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp43
-rw-r--r--korganizer/calendarview.h2
2 files changed, 18 insertions, 27 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 9160e1d..cbe2a10 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -911,2 +911,8 @@ void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* t
}
+void CalendarView::checkExternalId( Incidence * inc )
+{
+ QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ;
+ checkExternSyncEvent( lastSync, inc );
+
+}
bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode )
@@ -1028,3 +1034,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
pref = "t";
- if ( des.find(pref+QString::number( inR->zaurusId() ) +"," ) >= 0 && mode != 5) { // delete it
+ if ( des.find(pref+QString::number( inR->getID(mCurrentSyncDevice) ) +"," ) >= 0 && mode != 5) { // delete it
inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE );
@@ -1078,3 +1084,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
- if ( inL->zaurusId() >= 0 && mode != 4 ) {
+ if ( inL->getID(mCurrentSyncDevice) >= 0 && mode != 4 ) {
local->deleteIncidence( inL );
@@ -1083,3 +1089,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
if ( ! KOPrefs::instance()->mWriteBackExistingOnly ) {
- inL->setZaurusId( -1 );
+ inL->setID(mCurrentSyncDevice, -1 );
++addedEventR;
@@ -1202,3 +1208,3 @@ void CalendarView::syncSharp()
if ( loc ) {
- loc->setZaurusId( inc->zaurusId() );
+ loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) );
loc->setZaurusUid( inc->zaurusUid() );
@@ -1831,18 +1837,3 @@ void CalendarView::changeTodoDisplay(Todo *which, int action)
}
-void CalendarView::checkZaurusId( int id, bool todo )
-{
- if ( id >= 0 ) {
- Incidence* lse = mCalendar->event( "last-syncEvent-Sharp-DTM");
- if ( lse ) {
- QString des = lse->description();
- QString pref = "e";
- if ( todo )
- pref = "t";
- des += pref+ QString::number ( id ) + ",";
- lse->setReadOnly( false );
- lse->setDescription( des );
- lse->setReadOnly( true );
- }
- }
-}
+
void CalendarView::changeIncidenceDisplay(Incidence *which, int action)
@@ -2578,3 +2569,3 @@ void CalendarView::deleteTodo(Todo *todo)
} else {
- checkZaurusId( todo->zaurusId(), true );
+ checkExternalId( todo );
calendar()->deleteTodo(todo);
@@ -2590,3 +2581,3 @@ void CalendarView::deleteTodo(Todo *todo)
} else {
- checkZaurusId( todo->zaurusId(), true );
+ checkExternalId( todo );
mCalendar->deleteTodo(todo);
@@ -2652,3 +2643,3 @@ void CalendarView::deleteEvent(Event *anEvent)
- checkZaurusId( anEvent->zaurusId());
+ checkExternalId( anEvent);
mCalendar->deleteEvent(anEvent);
@@ -2686,3 +2677,3 @@ void CalendarView::deleteEvent(Event *anEvent)
schedule(Scheduler::Cancel,anEvent);
- checkZaurusId( anEvent->zaurusId());
+ checkExternalId( anEvent);
mCalendar->deleteEvent(anEvent);
@@ -2694,3 +2685,3 @@ void CalendarView::deleteEvent(Event *anEvent)
schedule(Scheduler::Cancel,anEvent);
- checkZaurusId( anEvent->zaurusId());
+ checkExternalId( anEvent);
mCalendar->deleteEvent(anEvent);
@@ -3448,3 +3439,3 @@ bool CalendarView::removeCompletedSubTodos( Todo* t )
if ( t->isCompleted() ) {
- checkZaurusId( t->zaurusId(), true );
+ checkExternalId( t );
mCalendar->deleteTodo( t );
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 557554f..f7a1213 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -485,3 +485,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete );
- void checkZaurusId( int id, bool todo = false );
+ void checkExternalId( Incidence * inc );
int mGlobalSyncMode;