-rw-r--r-- | libkcal/calendar.cpp | 2 | ||||
-rw-r--r-- | libkcal/calendarlocal.cpp | 12 | ||||
-rw-r--r-- | libkcal/incidencebase.cpp | 7 | ||||
-rw-r--r-- | libkcal/incidencebase.h | 1 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 2 | ||||
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 2 |
6 files changed, 17 insertions, 9 deletions
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index b1806ee..8535191 100644 --- a/libkcal/calendar.cpp +++ b/libkcal/calendar.cpp | |||
@@ -379,9 +379,9 @@ void Calendar::addIncidenceBranch(Incidence *i) | |||
379 | bool Calendar::addIncidence(Incidence *i) | 379 | bool Calendar::addIncidence(Incidence *i) |
380 | { | 380 | { |
381 | Incidence::AddVisitor<Calendar> v(this); | 381 | Incidence::AddVisitor<Calendar> v(this); |
382 | if ( i->calID() == 0 ) | 382 | if ( i->calID() == 0 ) |
383 | i->setCalID( mDefaultCalendar ); | 383 | i->setCalID_block( mDefaultCalendar ); |
384 | i->setCalEnabled( true ); | 384 | i->setCalEnabled( true ); |
385 | return i->accept(v); | 385 | return i->accept(v); |
386 | } | 386 | } |
387 | void Calendar::deleteIncidence(Incidence *in) | 387 | void Calendar::deleteIncidence(Incidence *in) |
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index c82ea92..b02f706 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp | |||
@@ -148,14 +148,14 @@ bool CalendarLocal::mergeCalendar( Calendar* remote ) | |||
148 | if ( ! inL->isReadOnly () || inL->uid().left(15) == QString("last-syncEvent-") ) { | 148 | if ( ! inL->isReadOnly () || inL->uid().left(15) == QString("last-syncEvent-") ) { |
149 | int calID = inL->calID(); | 149 | int calID = inL->calID(); |
150 | deleteIncidence( inL ); | 150 | deleteIncidence( inL ); |
151 | inL = inR->clone(); | 151 | inL = inR->clone(); |
152 | inL->setCalID( calID ); | 152 | inL->setCalID_block( calID ); |
153 | addIncidence( inL ); | 153 | addIncidence( inL ); |
154 | } | 154 | } |
155 | } else { | 155 | } else { |
156 | inL = inR->clone(); | 156 | inL = inR->clone(); |
157 | inL->setCalID( 0 );// add to default cal | 157 | inL->setCalID_block( 0 );// add to default cal |
158 | addIncidence( inL ); | 158 | addIncidence( inL ); |
159 | } | 159 | } |
160 | inR = er.next(); | 160 | inR = er.next(); |
161 | } | 161 | } |
@@ -207,9 +207,9 @@ void CalendarLocal::addCalendar( Calendar* cal ) | |||
207 | if ( ev->uid().left( 15 ) == QString("last-syncEvent-") ) { | 207 | if ( ev->uid().left( 15 ) == QString("last-syncEvent-") ) { |
208 | Event * se = event( ev->uid() ); | 208 | Event * se = event( ev->uid() ); |
209 | if ( se ) | 209 | if ( se ) |
210 | el.append( se ); | 210 | el.append( se ); |
211 | ev->setCalID( 1 ); | 211 | ev->setCalID_block( 1 ); |
212 | } | 212 | } |
213 | ev->unRegisterObserver( cal ); | 213 | ev->unRegisterObserver( cal ); |
214 | ev->registerObserver( this ); | 214 | ev->registerObserver( this ); |
215 | mEventList.append( ev ); | 215 | mEventList.append( ev ); |
@@ -341,9 +341,9 @@ bool CalendarLocal::addEvent( Event *event ) | |||
341 | event->registerObserver( this ); | 341 | event->registerObserver( this ); |
342 | 342 | ||
343 | setModified( true ); | 343 | setModified( true ); |
344 | if ( event->calID() == 0 ) | 344 | if ( event->calID() == 0 ) |
345 | event->setCalID( mDefaultCalendar ); | 345 | event->setCalID_block( mDefaultCalendar ); |
346 | event->setCalEnabled( true ); | 346 | event->setCalEnabled( true ); |
347 | 347 | ||
348 | return true; | 348 | return true; |
349 | } | 349 | } |
@@ -395,9 +395,9 @@ bool CalendarLocal::addTodo( Todo *todo ) | |||
395 | setupRelations( todo ); | 395 | setupRelations( todo ); |
396 | 396 | ||
397 | setModified( true ); | 397 | setModified( true ); |
398 | if ( todo->calID() == 0 ) | 398 | if ( todo->calID() == 0 ) |
399 | todo->setCalID( mDefaultCalendar ); | 399 | todo->setCalID_block( mDefaultCalendar ); |
400 | todo->setCalEnabled( true ); | 400 | todo->setCalEnabled( true ); |
401 | return true; | 401 | return true; |
402 | } | 402 | } |
403 | 403 | ||
@@ -923,9 +923,9 @@ bool CalendarLocal::addJournal(Journal *journal) | |||
923 | journal->registerObserver( this ); | 923 | journal->registerObserver( this ); |
924 | 924 | ||
925 | setModified( true ); | 925 | setModified( true ); |
926 | if ( journal->calID() == 0 ) | 926 | if ( journal->calID() == 0 ) |
927 | journal->setCalID( mDefaultCalendar ); | 927 | journal->setCalID_block( mDefaultCalendar ); |
928 | journal->setCalEnabled( true ); | 928 | journal->setCalEnabled( true ); |
929 | return true; | 929 | return true; |
930 | } | 930 | } |
931 | 931 | ||
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp index cfef973..56c0560 100644 --- a/libkcal/incidencebase.cpp +++ b/libkcal/incidencebase.cpp | |||
@@ -151,8 +151,15 @@ void IncidenceBase::setTagged( bool b) | |||
151 | } | 151 | } |
152 | void IncidenceBase::setCalID( int id ) | 152 | void IncidenceBase::setCalID( int id ) |
153 | { | 153 | { |
154 | if ( mCalID > 0 ) { | 154 | if ( mCalID > 0 ) { |
155 | updated(); | ||
156 | } | ||
157 | mCalID = id; | ||
158 | } | ||
159 | void IncidenceBase::setCalID_block( int id ) | ||
160 | { | ||
161 | if ( mCalID > 0 ) { | ||
155 | blockLastModified = true; | 162 | blockLastModified = true; |
156 | updated(); | 163 | updated(); |
157 | blockLastModified = false; | 164 | blockLastModified = false; |
158 | } | 165 | } |
diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h index 444d4c4..3edc03b 100644 --- a/libkcal/incidencebase.h +++ b/libkcal/incidencebase.h | |||
@@ -142,8 +142,9 @@ class IncidenceBase : public CustomProperties | |||
142 | void registerObserver( Observer * ); | 142 | void registerObserver( Observer * ); |
143 | void unRegisterObserver( Observer * ); | 143 | void unRegisterObserver( Observer * ); |
144 | void updated(); | 144 | void updated(); |
145 | void setCalID( int id ); | 145 | void setCalID( int id ); |
146 | void setCalID_block( int id ); | ||
146 | int calID() const; | 147 | int calID() const; |
147 | void setCalEnabled( bool ); | 148 | void setCalEnabled( bool ); |
148 | bool calEnabled() const; | 149 | bool calEnabled() const; |
149 | void setAlarmEnabled( bool ); | 150 | void setAlarmEnabled( bool ); |
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index fa7804e..0109c02 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -1179,9 +1179,9 @@ void KSyncManager::syncPi() | |||
1179 | } | 1179 | } |
1180 | } | 1180 | } |
1181 | ++startRemote; | 1181 | ++startRemote; |
1182 | ++startLocal; | 1182 | ++startLocal; |
1183 | 1183 | mAskForPreferences = false; | |
1184 | } | 1184 | } |
1185 | mPisyncFinished = true; | 1185 | mPisyncFinished = true; |
1186 | } else { | 1186 | } else { |
1187 | KCommandSocket* commandSocket = new KCommandSocket( "", mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() ); | 1187 | KCommandSocket* commandSocket = new KCommandSocket( "", mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() ); |
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 744a914..1f9afcb 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp | |||
@@ -368,9 +368,9 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
368 | mRemotePort = new QLineEdit(temphb); | 368 | mRemotePort = new QLineEdit(temphb); |
369 | mRemotePortAB = new QLineEdit(temphb); | 369 | mRemotePortAB = new QLineEdit(temphb); |
370 | mRemotePortPWM = new QLineEdit(temphb); | 370 | mRemotePortPWM = new QLineEdit(temphb); |
371 | 371 | ||
372 | lab = new QLabel( i18n("Local/remote Resource sync partners"), piWidget); | 372 | lab = new QLabel( i18n("Local/remote Resource sync partners (Leave empty to not sync)"), piWidget); |
373 | mTableBox = new QHBox( piWidget ); | 373 | mTableBox = new QHBox( piWidget ); |
374 | mResTableKopi = new QTable( 1, 1, mTableBox ); | 374 | mResTableKopi = new QTable( 1, 1, mTableBox ); |
375 | mResTableKapi = new QTable( 1, 1, mTableBox ); | 375 | mResTableKapi = new QTable( 1, 1, mTableBox ); |
376 | mResTablePwmpi = new QTable( 1, 1, mTableBox ); | 376 | mResTablePwmpi = new QTable( 1, 1, mTableBox ); |