author | zautrix <zautrix> | 2004-08-01 12:02:39 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-01 12:02:39 (UTC) |
commit | c31e99f265dbe8762efca20667f8ccd973840f8f (patch) (side-by-side diff) | |
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 @@ -1000,9 +1000,9 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int QString pref = "e"; if ( inR->type() == "Todo" ) pref = "t"; if ( des.find(pref+QString::number( inR->zaurusId() ) +"," ) >= 0 && mode != 5) { // delete it - inR->setZaurusStat( SYNC_TEMPSTATE_DELETE ); + inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); //remote->deleteIncidence( inR ); ++deletedEventR; } else { inR->setLastModified( modifiedCalendar ); @@ -1170,9 +1170,9 @@ void CalendarView::syncSharp() iL = calendar->rawIncidences(); inc = iL.first(); Incidence* loc; while ( inc ) { - if ( inc->zaurusStat() == SYNC_TEMPSTATE_NEW_ID ) { + if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { loc = mCalendar->incidence(inc->uid() ); if ( loc ) { loc->setZaurusId( inc->zaurusId() ); loc->setZaurusUid( inc->zaurusUid() ); diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp index 3437f45..df05ab3 100644 --- a/libkcal/icalformatimpl.cpp +++ b/libkcal/icalformatimpl.cpp @@ -273,11 +273,8 @@ void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence) if (incidence->zaurusUid() > 0) { incidence->setNonKDECustomProperty("X-ZAURUSUID", QString::number(incidence->zaurusUid())); } - if (incidence->zaurusStat() > 0) { - incidence->setNonKDECustomProperty("X-ZAURUSSTAT", QString::number(incidence->zaurusStat())); - } writeIncidenceBase(parent,incidence); if (incidence->cancelled()) { icalcomponent_add_property(parent,icalproperty_new_status(ICAL_STATUS_CANCELLED)); @@ -1292,13 +1289,8 @@ void ICalFormatImpl::readIncidence(icalcomponent *parent,Incidence *incidence) if (!kp.isNull()) { incidence->setZaurusUid(kp.toInt()); } - kp = incidence->nonKDECustomProperty("X-ZAURUSSTAT"); - if (!kp.isNull()) { - incidence->setZaurusStat(kp.toInt()); - } - // Cancel backwards compatibility mode for subsequent changes by the application incidence->recurrence()->setCompatVersion(); // add categories diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp index 9479048..707d666 100644 --- a/libkcal/incidencebase.cpp +++ b/libkcal/incidencebase.cpp @@ -39,9 +39,9 @@ IncidenceBase::IncidenceBase() : mHasDuration = false; mPilotId = 0; mZaurusId = -1; mZaurusUid = 0; - mZaurusStat = 0; + mTempSyncStat = 0; mSyncStatus = 0; mAttendees.setAutoDelete( true ); } @@ -62,9 +62,9 @@ IncidenceBase::IncidenceBase(const IncidenceBase &i) : mLastModified = i.mLastModified; mPilotId = i.mPilotId; mZaurusId = i.mZaurusId; mZaurusUid = i.mZaurusUid; - mZaurusStat = i.mZaurusStat; + mTempSyncStat = i.mTempSyncStat; mSyncStatus = i.mSyncStatus; // The copied object is a new one, so it isn't observed by the observer // of the original object. @@ -361,16 +361,16 @@ void IncidenceBase::setZaurusUid( int id ) if (mReadOnly) return; mZaurusUid = id; } -int IncidenceBase::zaurusStat() const +int IncidenceBase::tempSyncStat() const { - return mZaurusStat; + return mTempSyncStat; } -void IncidenceBase::setZaurusStat( int id ) +void IncidenceBase::setTempSyncStat( int id ) { if (mReadOnly) return; - mZaurusStat = id; + mTempSyncStat = id; } 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 @@ -129,10 +129,10 @@ class IncidenceBase : public CustomProperties void setZaurusId(int id); int zaurusId() const; void setZaurusUid(int id); int zaurusUid() const; - void setZaurusStat(int id); - int zaurusStat() const; + void setTempSyncStat(int id); + int tempSyncStat() const; void registerObserver( Observer * ); void unRegisterObserver( Observer * ); void updated(); @@ -154,9 +154,9 @@ class IncidenceBase : public CustomProperties int mDuration; bool mHasDuration; int mZaurusId; int mZaurusUid; - int mZaurusStat; + int mTempSyncStat; // PILOT SYNCHRONIZATION STUFF int mPilotId; // unique id for pilot sync int mSyncStatus; // status (for sync) diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp index 973f19d..d39d2dd 100644 --- a/libkcal/sharpformat.cpp +++ b/libkcal/sharpformat.cpp @@ -91,9 +91,9 @@ class SharpParser : public QObject else event = new Event; event->setZaurusId( attList[0].toInt() ); event->setZaurusUid( cSum ); - event->setZaurusStat(SYNC_TEMPSTATE_NEW_EXTERNAL ); + event->setTempSyncStat(SYNC_TEMPSTATE_NEW_EXTERNAL ); event->setSummary( attList[2] ); event->setLocation( attList[3] ); event->setDescription( attList[4] ); @@ -202,9 +202,9 @@ class SharpParser : public QObject //2,"Familie,Freunde,Holiday",20040318T000000,20040324T000000,20040317T000000,1,2,tod2,notes todo->setZaurusId( attList[0].toInt() ); todo->setZaurusUid( cSum ); - todo->setZaurusStat( SYNC_TEMPSTATE_NEW_EXTERNAL ); + todo->setTempSyncStat( SYNC_TEMPSTATE_NEW_EXTERNAL ); todo->setSummary( attList[7] ); todo->setDescription( attList[8]); @@ -467,9 +467,9 @@ int SharpFormat::getNumFromRecord( QString answer, Incidence* inc ) if ( ok && newnum > 0) { retval = newnum; inc->setZaurusId( newnum ); inc->setZaurusUid( getCsum( templist ) ); - inc->setZaurusStat( SYNC_TEMPSTATE_NEW_ID ); + inc->setTempSyncStat( SYNC_TEMPSTATE_NEW_ID ); } } } //qDebug("getNumFromRecord returning : %d ", retval); @@ -506,13 +506,13 @@ bool SharpFormat::save( Calendar *calendar) QString message = i18n("Processing event # "); int procCount = 0; while ( ev ) { //qDebug("i %d ", ++i); - if ( ev->zaurusStat() != SYNC_TEMPSTATE_NEW_EXTERNAL ) { + if ( ev->tempSyncStat() != SYNC_TEMPSTATE_NEW_EXTERNAL ) { status.setText ( message + QString::number ( ++procCount ) ); qApp->processEvents(); QString eString = getEventString( ev ); - if ( ev->zaurusStat() == SYNC_TEMPSTATE_DELETE ) { // delete + if ( ev->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) { // delete // deleting empty strings does not work. // we write first and x and then delete the record with the x eString = eString.replace( QRegExp(",\"\""),",\"x\"" ); changeString += eString + "\n"; @@ -592,13 +592,13 @@ bool SharpFormat::save( Calendar *calendar) i = 0; message = i18n("Processing todo # "); procCount = 0; while ( to ) { - if ( to->zaurusStat() != SYNC_TEMPSTATE_NEW_EXTERNAL ) { + if ( to->tempSyncStat() != SYNC_TEMPSTATE_NEW_EXTERNAL ) { status.setText ( message + QString::number ( ++procCount ) ); qApp->processEvents(); QString eString = getTodoString( to ); - if ( to->zaurusStat() == SYNC_TEMPSTATE_DELETE ) { // delete + if ( to->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) { // delete // deleting empty strings does not work. // we write first and x and then delete the record with the x eString = eString.replace( QRegExp(",\"\""),",\"x\"" ); changeString += eString + "\n"; |