summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/phoneformat.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp
index c97b43d..238b0ef 100644
--- a/libkcal/phoneformat.cpp
+++ b/libkcal/phoneformat.cpp
@@ -178,35 +178,36 @@ public:
178 else { 178 else {
179 alarm = new Alarm( todo ); 179 alarm = new Alarm( todo );
180 todo->addAlarm( alarm ); 180 todo->addAlarm( alarm );
181 } 181 }
182 alarm->setType( Alarm::Audio ); 182 alarm->setType( Alarm::Audio );
183 alarm->setEnabled( true ); 183 alarm->setEnabled( true );
184 int alarmOffset = alarmDt.secsTo( todo->dtStart() ); 184 int alarmOffset = alarmDt.secsTo( todo->dtStart() );
185 alarm->setStartOffset( alarmOffset ); 185 alarm->setStartOffset( alarmOffset );
186 alarmString = QString::number( alarmOffset ); 186 alarmString = QString::number( alarmOffset );
187 } 187 }
188 // csum ***************************************** 188 // csum *****************************************
189 QStringList attList; 189 QStringList attList;
190 uint cSum; 190 uint cSum;
191 if ( todo->hasDueDate() ) 191 if ( todo->hasDueDate() )
192 attList << dtToString ( todo->dtDue() ); 192 attList << dtToString ( todo->dtDue() );
193 attList << QString::number( id ); 193 attList << QString::number( id );
194 attList << todo->summary(); 194 attList << todo->summary();
195 attList << completedString; 195 attList << completedString;
196 attList << alarmString; 196 attList << QString::number( todo->priority() );
197 attList << alarmString;
197 attList << todo->categoriesStr(); 198 attList << todo->categoriesStr();
198 attList << todo->secrecyStr(); 199 attList << todo->secrecyStr();
199 cSum = PhoneFormat::getCsum(attList ); 200 cSum = PhoneFormat::getCsum(attList );
200 todo->setCsum( mProfileName, QString::number( cSum )); 201 todo->setCsum( mProfileName, QString::number( cSum ));
201 mCalendar->addTodo( todo); 202 mCalendar->addTodo( todo);
202 203
203 return true; 204 return true;
204 } 205 }
205 bool readEvent( Calendar *existingCalendar, GSM_CalendarEntry*Note) 206 bool readEvent( Calendar *existingCalendar, GSM_CalendarEntry*Note)
206 { 207 {
207 208
208 int id = Note->Location; 209 int id = Note->Location;
209 Event *event; 210 Event *event;
210 event = existingCalendar->event( mProfileName ,QString::number( id ) ); 211 event = existingCalendar->event( mProfileName ,QString::number( id ) );
211 if ( event ) 212 if ( event )
212 event = (Event*)event->clone(); 213 event = (Event*)event->clone();
@@ -661,33 +662,33 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal ,QString profi
661 GSM_CalendarEntrynote; 662 GSM_CalendarEntrynote;
662 bool refresh= true; 663 bool refresh= true;
663 Phone=s.Phone.Functions; 664 Phone=s.Phone.Functions;
664 bool gshutdown = false; 665 bool gshutdown = false;
665 PhoneParser handler( calendar, profileName ); 666 PhoneParser handler( calendar, profileName );
666 int ccc = 0; 667 int ccc = 0;
667 while (!gshutdown && ccc++ < 10 ) { 668 while (!gshutdown && ccc++ < 10 ) {
668 669
669 qDebug("readEvent %d ", ccc); 670 qDebug("readEvent %d ", ccc);
670 error=Phone->GetNextCalendar(&s,&note,refresh); 671 error=Phone->GetNextCalendar(&s,&note,refresh);
671 if (error == ERR_EMPTY) break; 672 if (error == ERR_EMPTY) break;
672 handler.readEvent( existingCal, &note ); 673 handler.readEvent( existingCal, &note );
673 } 674 }
674 675
675 bool start = true; 676 bool start = true;
676 GSM_ToDoEntry ToDo; 677 GSM_ToDoEntry ToDo;
677 int ccc = 0; 678 ccc = 0;
678 while (!gshutdown) { 679 while (!gshutdown) {
679 error = Phone->GetNextToDo(&s, &ToDo, start); 680 error = Phone->GetNextToDo(&s, &ToDo, start);
680 if (error == ERR_EMPTY) break; 681 if (error == ERR_EMPTY) break;
681 start = false; 682 start = false;
682 qDebug("readTodo %d ", ++ccc); 683 qDebug("readTodo %d ", ++ccc);
683 handler.readTodo( existingCal, &ToDo, &s); 684 handler.readTodo( existingCal, &ToDo, &s);
684 685
685 } 686 }
686 687
687 error=GSM_TerminateConnection(&s); 688 error=GSM_TerminateConnection(&s);
688 689
689 return true; 690 return true;
690} 691}
691 692
692bool PhoneFormat::save( Calendar *calendar) 693bool PhoneFormat::save( Calendar *calendar)
693{ 694{