summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-08-07 14:52:25 (UTC)
committer zautrix <zautrix>2004-08-07 14:52:25 (UTC)
commit31764784e8753157a936e42e21dcdc41bd8e2eb7 (patch) (unidiff)
treeddfe5653aadd0277d1181dc459ff73c50256be13
parent5f86d160a6d4406bdef53c8fe244baed0518142d (diff)
downloadkdepimpi-31764784e8753157a936e42e21dcdc41bd8e2eb7.zip
kdepimpi-31764784e8753157a936e42e21dcdc41bd8e2eb7.tar.gz
kdepimpi-31764784e8753157a936e42e21dcdc41bd8e2eb7.tar.bz2
Sync fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/calendar.h4
-rw-r--r--libkcal/calendarlocal.cpp4
-rw-r--r--libkcal/calendarlocal.h4
-rw-r--r--libkcal/sharpformat.cpp10
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
@@ -159,13 +159,13 @@ public:
159 */ 159 */
160 virtual void deleteEvent( Event * ) = 0; 160 virtual void deleteEvent( Event * ) = 0;
161 /** 161 /**
162 Retrieves an event on the basis of the unique string ID. 162 Retrieves an event on the basis of the unique string ID.
163 */ 163 */
164 virtual Event *event( const QString &UniqueStr ) = 0; 164 virtual Event *event( const QString &UniqueStr ) = 0;
165 virtual Event *event( QString, int ) = 0; 165 virtual Event *event( QString, QString ) = 0;
166 /** 166 /**
167 Builds and then returns a list of all events that match for the 167 Builds and then returns a list of all events that match for the
168 date specified. useful for dayView, etc. etc. 168 date specified. useful for dayView, etc. etc.
169 The calendar filter is applied. 169 The calendar filter is applied.
170 */ 170 */
171 QPtrList<Event> events( const QDate &date, bool sorted = false); 171 QPtrList<Event> events( const QDate &date, bool sorted = false);
@@ -208,13 +208,13 @@ public:
208 virtual QPtrList<Todo> todos(); 208 virtual QPtrList<Todo> todos();
209 /** 209 /**
210 Searches todolist for an event with this unique string identifier, 210 Searches todolist for an event with this unique string identifier,
211 returns a pointer or null. 211 returns a pointer or null.
212 */ 212 */
213 virtual Todo *todo( const QString &uid ) = 0; 213 virtual Todo *todo( const QString &uid ) = 0;
214 virtual Todo *todo( QString, int ) = 0; 214 virtual Todo *todo( QString, QString ) = 0;
215 /** 215 /**
216 Returns list of todos due on the specified date. 216 Returns list of todos due on the specified date.
217 */ 217 */
218 virtual QPtrList<Todo> todos( const QDate &date ) = 0; 218 virtual QPtrList<Todo> todos( const QDate &date ) = 0;
219 /** 219 /**
220 Return unfiltered list of todos. 220 Return unfiltered list of todos.
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index e464a77..21b4aaf 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -209,13 +209,13 @@ void CalendarLocal::deleteTodo( Todo *todo )
209} 209}
210 210
211QPtrList<Todo> CalendarLocal::rawTodos() 211QPtrList<Todo> CalendarLocal::rawTodos()
212{ 212{
213 return mTodoList; 213 return mTodoList;
214} 214}
215Todo *CalendarLocal::todo( QString syncProf, int id ) 215Todo *CalendarLocal::todo( QString syncProf, QString id )
216{ 216{
217 Todo *todo; 217 Todo *todo;
218 for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { 218 for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) {
219 if ( todo->getID( syncProf ) == id ) return todo; 219 if ( todo->getID( syncProf ) == id ) return todo;
220 } 220 }
221 221
@@ -232,13 +232,13 @@ QPtrList<Event> CalendarLocal::getExternLastSyncEvents()
232 el.append( todo ); 232 el.append( todo );
233 } 233 }
234 234
235 return el; 235 return el;
236 236
237} 237}
238Event *CalendarLocal::event( QString syncProf, int id ) 238Event *CalendarLocal::event( QString syncProf, QString id )
239{ 239{
240 Event *todo; 240 Event *todo;
241 for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { 241 for ( todo = mEventList.first(); todo; todo = mEventList.next() ) {
242 if ( todo->getID( syncProf ) == id ) return todo; 242 if ( todo->getID( syncProf ) == id ) return todo;
243 } 243 }
244 244
diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h
index 4728063..5b6c64c 100644
--- a/libkcal/calendarlocal.h
+++ b/libkcal/calendarlocal.h
@@ -172,14 +172,14 @@ class CalendarLocal : public Calendar
172 /** 172 /**
173 Get unfiltered events in a range of dates. If inclusive is set to true, 173 Get unfiltered events in a range of dates. If inclusive is set to true,
174 only events are returned, which are completely included in the range. 174 only events are returned, which are completely included in the range.
175 */ 175 */
176 QPtrList<Event> rawEvents( const QDate &start, const QDate &end, 176 QPtrList<Event> rawEvents( const QDate &start, const QDate &end,
177 bool inclusive = false ); 177 bool inclusive = false );
178 Todo *todo( QString, int uid ); 178 Todo *todo( QString, QString );
179 Event *event( QString,int uid ); 179 Event *event( QString, QString );
180 180
181 181
182 182
183 protected: 183 protected:
184 184
185 // Event* mNextAlarmEvent; 185 // Event* mNextAlarmEvent;
diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp
index e8934bf..ebfe164 100644
--- a/libkcal/sharpformat.cpp
+++ b/libkcal/sharpformat.cpp
@@ -82,27 +82,27 @@ class SharpParser : public QObject
82 if ( skip ) 82 if ( skip )
83 return false; 83 return false;
84 ulong cSum = SharpFormat::getCsum(attList ); 84 ulong cSum = SharpFormat::getCsum(attList );
85 85
86 if ( qName == "Event" ) { 86 if ( qName == "Event" ) {
87 Event *event; 87 Event *event;
88 event = existingCalendar->event( "Sharp_DTM",attList[0].toInt() ); 88 event = existingCalendar->event( "Sharp_DTM",attList[0] );
89 if ( event ) 89 if ( event )
90 event = (Event*)event->clone(); 90 event = (Event*)event->clone();
91 else 91 else
92 event = new Event; 92 event = new Event;
93 event->setID("Sharp_DTM", attList[0] ); 93 event->setID("Sharp_DTM", attList[0] );
94 event->setCsum( "Sharp_DTM", QString::number( cSum )); 94 event->setCsum( "Sharp_DTM", QString::number( cSum ));
95 event->setTempSyncStat(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] );
99 event->setDescription( attList[4] ); 99 event->setDescription( attList[4] );
100 if ( attList[7] == "1" ) { 100 if ( attList[7] == "1" ) {
101 event->setDtStart( QDateTime(fromString( attList[17]+"000000", false ).date(),QTime(0,0,0 ) )); 101 event->setDtStart( QDateTime(fromString( attList[17]+"T000000", false ).date(),QTime(0,0,0 ) ));
102 event->setDtEnd( QDateTime(fromString( attList[18]+"000000", false ).date(),QTime(0,0,0 ))); 102 event->setDtEnd( QDateTime(fromString( attList[18]+"T000000", false ).date(),QTime(0,0,0 )));
103 event->setFloats( true ); 103 event->setFloats( true );
104 } else { 104 } else {
105 event->setFloats( false ); 105 event->setFloats( false );
106 event->setDtStart( fromString( attList[5] ) ); 106 event->setDtStart( fromString( attList[5] ) );
107 event->setDtEnd( fromString( attList[6] )); 107 event->setDtEnd( fromString( attList[6] ));
108 } 108 }
@@ -186,13 +186,13 @@ class SharpParser : public QObject
186 } 186 }
187 187
188 mCalendar->addEvent( event); 188 mCalendar->addEvent( event);
189 } else if ( qName == "Todo" ) { 189 } else if ( qName == "Todo" ) {
190 Todo *todo; 190 Todo *todo;
191 191
192 todo = existingCalendar->todo( "Sharp_DTM", attList[0].toInt() ); 192 todo = existingCalendar->todo( "Sharp_DTM", attList[0] );
193 if (todo ) 193 if (todo )
194 todo = (Todo*)todo->clone(); 194 todo = (Todo*)todo->clone();
195 else 195 else
196 todo = new Todo; 196 todo = new Todo;
197 197
198//CARDID,CATEGORY,ETDY,LTDY,FNDY,MARK,PRTY,TITL,MEM1 198//CARDID,CATEGORY,ETDY,LTDY,FNDY,MARK,PRTY,TITL,MEM1
@@ -355,13 +355,13 @@ ulong SharpFormat::getCsum( const QStringList & attList)
355 } 355 }
356 } 356 }
357 return cSum; 357 return cSum;
358 358
359} 359}
360#include <stdlib.h> 360#include <stdlib.h>
361#define DEBUGMODE false 361#define DEBUGMODE true
362bool SharpFormat::load( Calendar *calendar, Calendar *existngCal ) 362bool SharpFormat::load( Calendar *calendar, Calendar *existngCal )
363{ 363{
364 364
365 365
366 bool debug = DEBUGMODE; 366 bool debug = DEBUGMODE;
367 //debug = true; 367 //debug = true;