summaryrefslogtreecommitdiffabout
path: root/libkcal/phoneformat.cpp
authorzautrix <zautrix>2004-08-09 18:02:44 (UTC)
committer zautrix <zautrix>2004-08-09 18:02:44 (UTC)
commit4f05a9fcbb9e54184aef93883886aaf865104463 (patch) (side-by-side diff)
treef5e94f7694b74dca3b11e1e74a94058a4526dafe /libkcal/phoneformat.cpp
parente1909ade2188e53feee65089d5f2882563876c58 (diff)
downloadkdepimpi-4f05a9fcbb9e54184aef93883886aaf865104463.zip
kdepimpi-4f05a9fcbb9e54184aef93883886aaf865104463.tar.gz
kdepimpi-4f05a9fcbb9e54184aef93883886aaf865104463.tar.bz2
more syncing
Diffstat (limited to 'libkcal/phoneformat.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/phoneformat.cpp60
1 files changed, 9 insertions, 51 deletions
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp
index 11c68c5..e6d4879 100644
--- a/libkcal/phoneformat.cpp
+++ b/libkcal/phoneformat.cpp
@@ -870,59 +870,17 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal)
}
void PhoneFormat::event2GSM( Event* ev, GSM_CalendarEntry*Note )
{
-
+ QString eText = vfconverter.eventToString( ev );
+ int pos = 0;
+ GSM_ToDoEntry dummy;
+ GSM_DecodeVCALENDAR_VTODO( (unsigned char*)eText.latin1(), &pos, Note , &dummy, Nokia_VCalendar, Nokia_VToDo );
}
-void PhoneFormat::todo2GSM( Todo* todo, GSM_ToDoEntry *gsm )
+void PhoneFormat::todo2GSM( Todo* todo, GSM_ToDoEntry *gsmTodo )
{
-#if 0
- QStringList list;
- list.append( QString::number( todo->zaurusId() ) );
- list.append( todo->categories().join(",") );
-
- if ( todo->hasStartDate() ) {
- list.append( dtToString( todo->dtStart()) );
- } else
- list.append( QString() );
-
- if ( todo->hasDueDate() ) {
- QTime tim;
- if ( todo->doesFloat()) {
- list.append( dtToString( QDateTime(todo->dtDue().date(),QTime( 0,0,0 )), false)) ;
- } else {
- list.append( dtToString(todo->dtDue() ) );
- }
- } else
- list.append( QString() );
-
- if ( todo->isCompleted() ) {
- list.append( dtToString( todo->completed()) );
- list.append( "0" ); // yes 0 == completed
- } else {
- list.append( dtToString( todo->completed()) );
- list.append( "1" );
- }
- list.append( QString::number( todo->priority() ));
- if( ! todo->summary().isEmpty() )
- list.append( todo->summary() );
- else
- list.append( "" );
- if (! todo->description().isEmpty() )
- list.append( todo->description() );
- else
- list.append( "" );
- for(QStringList::Iterator it=list.begin();
- it!=list.end(); ++it){
- QString& s = (*it);
- s.replace(QRegExp("\""), "\"\"");
- if(s.contains(QRegExp("[,\"\r\n]")) || s.stripWhiteSpace() != s){
- s.prepend('\"');
- s.append('\"');
- } else if(s.isEmpty() && !s.isNull()){
- s = "\"\"";
- }
- }
- return list.join(",");
-#endif
+ QString tText = vfconverter.todoToString( todo );
+ int pos = 0;
+ GSM_CalendarEntry dummy;
+ GSM_DecodeVCALENDAR_VTODO( (unsigned char*)tText.latin1(), &pos, &dummy, gsmTodo, Nokia_VCalendar, Nokia_VToDo );
}
void PhoneFormat::afterSave( Incidence* inc)
{