author | zautrix <zautrix> | 2004-08-07 14:52:25 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-07 14:52:25 (UTC) |
commit | 31764784e8753157a936e42e21dcdc41bd8e2eb7 (patch) (side-by-side diff) | |
tree | ddfe5653aadd0277d1181dc459ff73c50256be13 | |
parent | 5f86d160a6d4406bdef53c8fe244baed0518142d (diff) | |
download | kdepimpi-31764784e8753157a936e42e21dcdc41bd8e2eb7.zip kdepimpi-31764784e8753157a936e42e21dcdc41bd8e2eb7.tar.gz kdepimpi-31764784e8753157a936e42e21dcdc41bd8e2eb7.tar.bz2 |
Sync fixes
-rw-r--r-- | libkcal/calendar.h | 4 | ||||
-rw-r--r-- | libkcal/calendarlocal.cpp | 4 | ||||
-rw-r--r-- | libkcal/calendarlocal.h | 4 | ||||
-rw-r--r-- | libkcal/sharpformat.cpp | 10 |
4 files changed, 11 insertions, 11 deletions
diff --git a/libkcal/calendar.h b/libkcal/calendar.h index d59bca6..4a3223c 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h @@ -157,17 +157,17 @@ public: /** Delete event from calendar. */ virtual void deleteEvent( Event * ) = 0; /** Retrieves an event on the basis of the unique string ID. */ virtual Event *event( const QString &UniqueStr ) = 0; - virtual Event *event( QString, int ) = 0; + virtual Event *event( QString, QString ) = 0; /** Builds and then returns a list of all events that match for the date specified. useful for dayView, etc. etc. The calendar filter is applied. */ QPtrList<Event> events( const QDate &date, bool sorted = false); /** Get events, which occur on the given date. @@ -206,17 +206,17 @@ public: Return filterd list of todos. */ virtual QPtrList<Todo> todos(); /** Searches todolist for an event with this unique string identifier, returns a pointer or null. */ virtual Todo *todo( const QString &uid ) = 0; - virtual Todo *todo( QString, int ) = 0; + virtual Todo *todo( QString, QString ) = 0; /** Returns list of todos due on the specified date. */ virtual QPtrList<Todo> todos( const QDate &date ) = 0; /** Return unfiltered list of todos. */ virtual QPtrList<Todo> rawTodos() = 0; diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index e464a77..21b4aaf 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp @@ -207,17 +207,17 @@ void CalendarLocal::deleteTodo( Todo *todo ) setModified( true ); } } QPtrList<Todo> CalendarLocal::rawTodos() { return mTodoList; } -Todo *CalendarLocal::todo( QString syncProf, int id ) +Todo *CalendarLocal::todo( QString syncProf, QString id ) { Todo *todo; for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { if ( todo->getID( syncProf ) == id ) return todo; } return 0; } @@ -230,17 +230,17 @@ QPtrList<Event> CalendarLocal::getExternLastSyncEvents() if ( todo->uid().left( 15 ) == QString("last-syncEvent-") ) if ( todo->summary().left(3) == "E: " ) el.append( todo ); } return el; } -Event *CalendarLocal::event( QString syncProf, int id ) +Event *CalendarLocal::event( QString syncProf, QString id ) { Event *todo; for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { if ( todo->getID( syncProf ) == id ) return todo; } return 0; } diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h index 4728063..5b6c64c 100644 --- a/libkcal/calendarlocal.h +++ b/libkcal/calendarlocal.h @@ -170,18 +170,18 @@ class CalendarLocal : public Calendar */ QPtrList<Event> rawEventsForDate( const QDateTime &qdt ); /** Get unfiltered events in a range of dates. If inclusive is set to true, only events are returned, which are completely included in the range. */ QPtrList<Event> rawEvents( const QDate &start, const QDate &end, bool inclusive = false ); - Todo *todo( QString, int uid ); - Event *event( QString,int uid ); + Todo *todo( QString, QString ); + Event *event( QString, QString ); protected: // Event* mNextAlarmEvent; QString mNextSummary; QString mNextAlarmEventDateTimeString; diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp index e8934bf..ebfe164 100644 --- a/libkcal/sharpformat.cpp +++ b/libkcal/sharpformat.cpp @@ -80,31 +80,31 @@ class SharpParser : public QObject ++i ; } if ( skip ) return false; ulong cSum = SharpFormat::getCsum(attList ); if ( qName == "Event" ) { Event *event; - event = existingCalendar->event( "Sharp_DTM",attList[0].toInt() ); + event = existingCalendar->event( "Sharp_DTM",attList[0] ); if ( event ) event = (Event*)event->clone(); else event = new Event; event->setID("Sharp_DTM", attList[0] ); event->setCsum( "Sharp_DTM", QString::number( cSum )); event->setTempSyncStat(SYNC_TEMPSTATE_NEW_EXTERNAL ); event->setSummary( attList[2] ); event->setLocation( attList[3] ); event->setDescription( attList[4] ); if ( attList[7] == "1" ) { - event->setDtStart( QDateTime(fromString( attList[17]+"000000", false ).date(),QTime(0,0,0 ) )); - event->setDtEnd( QDateTime(fromString( attList[18]+"000000", false ).date(),QTime(0,0,0 ))); + event->setDtStart( QDateTime(fromString( attList[17]+"T000000", false ).date(),QTime(0,0,0 ) )); + event->setDtEnd( QDateTime(fromString( attList[18]+"T000000", false ).date(),QTime(0,0,0 ))); event->setFloats( true ); } else { event->setFloats( false ); event->setDtStart( fromString( attList[5] ) ); event->setDtEnd( fromString( attList[6] )); } QString rtype = attList[11]; @@ -184,17 +184,17 @@ class SharpParser : public QObject int alarmOffset = attList[9].toInt(); alarm->setStartOffset( alarmOffset * -60 ); } mCalendar->addEvent( event); } else if ( qName == "Todo" ) { Todo *todo; - todo = existingCalendar->todo( "Sharp_DTM", attList[0].toInt() ); + todo = existingCalendar->todo( "Sharp_DTM", attList[0] ); if (todo ) todo = (Todo*)todo->clone(); else todo = new Todo; //CARDID,CATEGORY,ETDY,LTDY,FNDY,MARK,PRTY,TITL,MEM1 // 0 1 2 3 4 5 6 7 8 //1,,,,,1,4,Loch zumachen,"" @@ -353,17 +353,17 @@ ulong SharpFormat::getCsum( const QStringList & attList) cSum += add; } } } return cSum; } #include <stdlib.h> -#define DEBUGMODE false +#define DEBUGMODE true bool SharpFormat::load( Calendar *calendar, Calendar *existngCal ) { bool debug = DEBUGMODE; //debug = true; QString text; QString codec = "utf8"; |