summaryrefslogtreecommitdiffabout
Side-by-side diff
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
@@ -170,51 +170,52 @@ public:
}
}
QString alarmString = "";
// strange 0 semms to mean: alarm enabled
if ( alarm ) {
Alarm *alarm;
if ( todo->alarms().count() > 0 )
alarm = todo->alarms().first();
else {
alarm = new Alarm( todo );
todo->addAlarm( alarm );
}
alarm->setType( Alarm::Audio );
alarm->setEnabled( true );
int alarmOffset = alarmDt.secsTo( todo->dtStart() );
alarm->setStartOffset( alarmOffset );
alarmString = QString::number( alarmOffset );
}
// csum *****************************************
QStringList attList;
uint cSum;
if ( todo->hasDueDate() )
attList << dtToString ( todo->dtDue() );
attList << QString::number( id );
- attList << todo->summary();
+ attList << todo->summary();
attList << completedString;
- attList << alarmString;
+ attList << QString::number( todo->priority() );
+ attList << alarmString;
attList << todo->categoriesStr();
attList << todo->secrecyStr();
cSum = PhoneFormat::getCsum(attList );
todo->setCsum( mProfileName, QString::number( cSum ));
mCalendar->addTodo( todo);
return true;
}
bool readEvent( Calendar *existingCalendar, GSM_CalendarEntry* Note)
{
int id = Note->Location;
Event *event;
event = existingCalendar->event( mProfileName ,QString::number( id ) );
if ( event )
event = (Event*)event->clone();
else
event = new Event;
event->setID( mProfileName,QString::number( id ) );
event->setTempSyncStat(SYNC_TEMPSTATE_NEW_EXTERNAL );
int i = 0;
bool repeating = false;
@@ -653,49 +654,49 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal ,QString profi
}
int error=GSM_InitConnection(&s,3);
qDebug(" init %d %d", error, ERR_NONE);
if ( error != ERR_NONE )
return false;
// fromString2Cal( calendar, existngCal, &s, "Event" );
GSM_Phone_Functions *Phone;
GSM_CalendarEntry note;
bool refresh = true;
Phone=s.Phone.Functions;
bool gshutdown = false;
PhoneParser handler( calendar, profileName );
int ccc = 0;
while (!gshutdown && ccc++ < 10 ) {
qDebug("readEvent %d ", ccc);
error=Phone->GetNextCalendar(&s,&note,refresh);
if (error == ERR_EMPTY) break;
handler.readEvent( existingCal, &note );
}
bool start = true;
GSM_ToDoEntry ToDo;
- int ccc = 0;
+ ccc = 0;
while (!gshutdown) {
error = Phone->GetNextToDo(&s, &ToDo, start);
if (error == ERR_EMPTY) break;
start = false;
qDebug("readTodo %d ", ++ccc);
handler.readTodo( existingCal, &ToDo, &s);
}
error=GSM_TerminateConnection(&s);
return true;
}
bool PhoneFormat::save( Calendar *calendar)
{
#if 0
QLabel status ( i18n("Processing/adding events ..."), 0 );
int w = status.sizeHint().width()+20 ;
if ( w < 200 ) w = 200;
int h = status.sizeHint().height()+20 ;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
status.setCaption(i18n("Writing DTM Data") );