author | zautrix <zautrix> | 2004-08-01 12:02:39 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-01 12:02:39 (UTC) |
commit | c31e99f265dbe8762efca20667f8ccd973840f8f (patch) (unidiff) | |
tree | 29e7fd6845d187f41f9d80e756611dc8bc182bdc | |
parent | e954cc1e29b129982e4d07c4f490d7e881597374 (diff) | |
download | kdepimpi-c31e99f265dbe8762efca20667f8ccd973840f8f.zip kdepimpi-c31e99f265dbe8762efca20667f8ccd973840f8f.tar.gz kdepimpi-c31e99f265dbe8762efca20667f8ccd973840f8f.tar.bz2 |
Changed zaurusstat to tempsyncstat
-rw-r--r-- | korganizer/calendarview.cpp | 4 | ||||
-rw-r--r-- | libkcal/icalformatimpl.cpp | 8 | ||||
-rw-r--r-- | libkcal/incidencebase.cpp | 12 | ||||
-rw-r--r-- | libkcal/incidencebase.h | 6 | ||||
-rw-r--r-- | libkcal/sharpformat.cpp | 14 |
5 files changed, 18 insertions, 26 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index fd68dc4..b543eca 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1001,7 +1001,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1001 | if ( inR->type() == "Todo" ) | 1001 | if ( inR->type() == "Todo" ) |
1002 | pref = "t"; | 1002 | pref = "t"; |
1003 | if ( des.find(pref+QString::number( inR->zaurusId() ) +"," ) >= 0 && mode != 5) { // delete it | 1003 | if ( des.find(pref+QString::number( inR->zaurusId() ) +"," ) >= 0 && mode != 5) { // delete it |
1004 | inR->setZaurusStat( SYNC_TEMPSTATE_DELETE ); | 1004 | inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); |
1005 | //remote->deleteIncidence( inR ); | 1005 | //remote->deleteIncidence( inR ); |
1006 | ++deletedEventR; | 1006 | ++deletedEventR; |
1007 | } else { | 1007 | } else { |
@@ -1171,7 +1171,7 @@ void CalendarView::syncSharp() | |||
1171 | inc = iL.first(); | 1171 | inc = iL.first(); |
1172 | Incidence* loc; | 1172 | Incidence* loc; |
1173 | while ( inc ) { | 1173 | while ( inc ) { |
1174 | if ( inc->zaurusStat() == SYNC_TEMPSTATE_NEW_ID ) { | 1174 | if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { |
1175 | loc = mCalendar->incidence(inc->uid() ); | 1175 | loc = mCalendar->incidence(inc->uid() ); |
1176 | if ( loc ) { | 1176 | if ( loc ) { |
1177 | loc->setZaurusId( inc->zaurusId() ); | 1177 | loc->setZaurusId( inc->zaurusId() ); |
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp index 3437f45..df05ab3 100644 --- a/libkcal/icalformatimpl.cpp +++ b/libkcal/icalformatimpl.cpp | |||
@@ -274,9 +274,6 @@ void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence) | |||
274 | if (incidence->zaurusUid() > 0) { | 274 | if (incidence->zaurusUid() > 0) { |
275 | incidence->setNonKDECustomProperty("X-ZAURUSUID", QString::number(incidence->zaurusUid())); | 275 | incidence->setNonKDECustomProperty("X-ZAURUSUID", QString::number(incidence->zaurusUid())); |
276 | } | 276 | } |
277 | if (incidence->zaurusStat() > 0) { | ||
278 | incidence->setNonKDECustomProperty("X-ZAURUSSTAT", QString::number(incidence->zaurusStat())); | ||
279 | } | ||
280 | 277 | ||
281 | writeIncidenceBase(parent,incidence); | 278 | writeIncidenceBase(parent,incidence); |
282 | if (incidence->cancelled()) { | 279 | if (incidence->cancelled()) { |
@@ -1293,11 +1290,6 @@ void ICalFormatImpl::readIncidence(icalcomponent *parent,Incidence *incidence) | |||
1293 | incidence->setZaurusUid(kp.toInt()); | 1290 | incidence->setZaurusUid(kp.toInt()); |
1294 | } | 1291 | } |
1295 | 1292 | ||
1296 | kp = incidence->nonKDECustomProperty("X-ZAURUSSTAT"); | ||
1297 | if (!kp.isNull()) { | ||
1298 | incidence->setZaurusStat(kp.toInt()); | ||
1299 | } | ||
1300 | |||
1301 | // Cancel backwards compatibility mode for subsequent changes by the application | 1293 | // Cancel backwards compatibility mode for subsequent changes by the application |
1302 | incidence->recurrence()->setCompatVersion(); | 1294 | incidence->recurrence()->setCompatVersion(); |
1303 | 1295 | ||
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp index 9479048..707d666 100644 --- a/libkcal/incidencebase.cpp +++ b/libkcal/incidencebase.cpp | |||
@@ -40,7 +40,7 @@ IncidenceBase::IncidenceBase() : | |||
40 | mPilotId = 0; | 40 | mPilotId = 0; |
41 | mZaurusId = -1; | 41 | mZaurusId = -1; |
42 | mZaurusUid = 0; | 42 | mZaurusUid = 0; |
43 | mZaurusStat = 0; | 43 | mTempSyncStat = 0; |
44 | mSyncStatus = 0; | 44 | mSyncStatus = 0; |
45 | mAttendees.setAutoDelete( true ); | 45 | mAttendees.setAutoDelete( true ); |
46 | } | 46 | } |
@@ -63,7 +63,7 @@ IncidenceBase::IncidenceBase(const IncidenceBase &i) : | |||
63 | mPilotId = i.mPilotId; | 63 | mPilotId = i.mPilotId; |
64 | mZaurusId = i.mZaurusId; | 64 | mZaurusId = i.mZaurusId; |
65 | mZaurusUid = i.mZaurusUid; | 65 | mZaurusUid = i.mZaurusUid; |
66 | mZaurusStat = i.mZaurusStat; | 66 | mTempSyncStat = i.mTempSyncStat; |
67 | mSyncStatus = i.mSyncStatus; | 67 | mSyncStatus = i.mSyncStatus; |
68 | 68 | ||
69 | // The copied object is a new one, so it isn't observed by the observer | 69 | // The copied object is a new one, so it isn't observed by the observer |
@@ -362,14 +362,14 @@ void IncidenceBase::setZaurusUid( int id ) | |||
362 | mZaurusUid = id; | 362 | mZaurusUid = id; |
363 | } | 363 | } |
364 | 364 | ||
365 | int IncidenceBase::zaurusStat() const | 365 | int IncidenceBase::tempSyncStat() const |
366 | { | 366 | { |
367 | return mZaurusStat; | 367 | return mTempSyncStat; |
368 | } | 368 | } |
369 | void IncidenceBase::setZaurusStat( int id ) | 369 | void IncidenceBase::setTempSyncStat( int id ) |
370 | { | 370 | { |
371 | if (mReadOnly) return; | 371 | if (mReadOnly) return; |
372 | mZaurusStat = id; | 372 | mTempSyncStat = id; |
373 | } | 373 | } |
374 | 374 | ||
375 | void IncidenceBase::registerObserver( IncidenceBase::Observer *observer ) | 375 | void IncidenceBase::registerObserver( IncidenceBase::Observer *observer ) |
diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h index 0ab7eef..ce6e254 100644 --- a/libkcal/incidencebase.h +++ b/libkcal/incidencebase.h | |||
@@ -130,8 +130,8 @@ class IncidenceBase : public CustomProperties | |||
130 | int zaurusId() const; | 130 | int zaurusId() const; |
131 | void setZaurusUid(int id); | 131 | void setZaurusUid(int id); |
132 | int zaurusUid() const; | 132 | int zaurusUid() const; |
133 | void setZaurusStat(int id); | 133 | void setTempSyncStat(int id); |
134 | int zaurusStat() const; | 134 | int tempSyncStat() const; |
135 | 135 | ||
136 | void registerObserver( Observer * ); | 136 | void registerObserver( Observer * ); |
137 | void unRegisterObserver( Observer * ); | 137 | void unRegisterObserver( Observer * ); |
@@ -155,7 +155,7 @@ class IncidenceBase : public CustomProperties | |||
155 | bool mHasDuration; | 155 | bool mHasDuration; |
156 | int mZaurusId; | 156 | int mZaurusId; |
157 | int mZaurusUid; | 157 | int mZaurusUid; |
158 | int mZaurusStat; | 158 | int mTempSyncStat; |
159 | 159 | ||
160 | // PILOT SYNCHRONIZATION STUFF | 160 | // PILOT SYNCHRONIZATION STUFF |
161 | int mPilotId; // unique id for pilot sync | 161 | int mPilotId; // unique id for pilot sync |
diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp index 973f19d..d39d2dd 100644 --- a/libkcal/sharpformat.cpp +++ b/libkcal/sharpformat.cpp | |||
@@ -92,7 +92,7 @@ class SharpParser : public QObject | |||
92 | event = new Event; | 92 | event = new Event; |
93 | event->setZaurusId( attList[0].toInt() ); | 93 | event->setZaurusId( attList[0].toInt() ); |
94 | event->setZaurusUid( cSum ); | 94 | event->setZaurusUid( cSum ); |
95 | event->setZaurusStat(SYNC_TEMPSTATE_NEW_EXTERNAL ); | 95 | event->setTempSyncStat(SYNC_TEMPSTATE_NEW_EXTERNAL ); |
96 | 96 | ||
97 | event->setSummary( attList[2] ); | 97 | event->setSummary( attList[2] ); |
98 | event->setLocation( attList[3] ); | 98 | event->setLocation( attList[3] ); |
@@ -203,7 +203,7 @@ class SharpParser : public QObject | |||
203 | 203 | ||
204 | todo->setZaurusId( attList[0].toInt() ); | 204 | todo->setZaurusId( attList[0].toInt() ); |
205 | todo->setZaurusUid( cSum ); | 205 | todo->setZaurusUid( cSum ); |
206 | todo->setZaurusStat( SYNC_TEMPSTATE_NEW_EXTERNAL ); | 206 | todo->setTempSyncStat( SYNC_TEMPSTATE_NEW_EXTERNAL ); |
207 | 207 | ||
208 | todo->setSummary( attList[7] ); | 208 | todo->setSummary( attList[7] ); |
209 | todo->setDescription( attList[8]); | 209 | todo->setDescription( attList[8]); |
@@ -468,7 +468,7 @@ int SharpFormat::getNumFromRecord( QString answer, Incidence* inc ) | |||
468 | retval = newnum; | 468 | retval = newnum; |
469 | inc->setZaurusId( newnum ); | 469 | inc->setZaurusId( newnum ); |
470 | inc->setZaurusUid( getCsum( templist ) ); | 470 | inc->setZaurusUid( getCsum( templist ) ); |
471 | inc->setZaurusStat( SYNC_TEMPSTATE_NEW_ID ); | 471 | inc->setTempSyncStat( SYNC_TEMPSTATE_NEW_ID ); |
472 | } | 472 | } |
473 | } | 473 | } |
474 | } | 474 | } |
@@ -507,11 +507,11 @@ bool SharpFormat::save( Calendar *calendar) | |||
507 | int procCount = 0; | 507 | int procCount = 0; |
508 | while ( ev ) { | 508 | while ( ev ) { |
509 | //qDebug("i %d ", ++i); | 509 | //qDebug("i %d ", ++i); |
510 | if ( ev->zaurusStat() != SYNC_TEMPSTATE_NEW_EXTERNAL ) { | 510 | if ( ev->tempSyncStat() != SYNC_TEMPSTATE_NEW_EXTERNAL ) { |
511 | status.setText ( message + QString::number ( ++procCount ) ); | 511 | status.setText ( message + QString::number ( ++procCount ) ); |
512 | qApp->processEvents(); | 512 | qApp->processEvents(); |
513 | QString eString = getEventString( ev ); | 513 | QString eString = getEventString( ev ); |
514 | if ( ev->zaurusStat() == SYNC_TEMPSTATE_DELETE ) { // delete | 514 | if ( ev->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) { // delete |
515 | // deleting empty strings does not work. | 515 | // deleting empty strings does not work. |
516 | // we write first and x and then delete the record with the x | 516 | // we write first and x and then delete the record with the x |
517 | eString = eString.replace( QRegExp(",\"\""),",\"x\"" ); | 517 | eString = eString.replace( QRegExp(",\"\""),",\"x\"" ); |
@@ -593,11 +593,11 @@ bool SharpFormat::save( Calendar *calendar) | |||
593 | message = i18n("Processing todo # "); | 593 | message = i18n("Processing todo # "); |
594 | procCount = 0; | 594 | procCount = 0; |
595 | while ( to ) { | 595 | while ( to ) { |
596 | if ( to->zaurusStat() != SYNC_TEMPSTATE_NEW_EXTERNAL ) { | 596 | if ( to->tempSyncStat() != SYNC_TEMPSTATE_NEW_EXTERNAL ) { |
597 | status.setText ( message + QString::number ( ++procCount ) ); | 597 | status.setText ( message + QString::number ( ++procCount ) ); |
598 | qApp->processEvents(); | 598 | qApp->processEvents(); |
599 | QString eString = getTodoString( to ); | 599 | QString eString = getTodoString( to ); |
600 | if ( to->zaurusStat() == SYNC_TEMPSTATE_DELETE ) { // delete | 600 | if ( to->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) { // delete |
601 | // deleting empty strings does not work. | 601 | // deleting empty strings does not work. |
602 | // we write first and x and then delete the record with the x | 602 | // we write first and x and then delete the record with the x |
603 | eString = eString.replace( QRegExp(",\"\""),",\"x\"" ); | 603 | eString = eString.replace( QRegExp(",\"\""),",\"x\"" ); |