summaryrefslogtreecommitdiff
path: root/libopie/todovcalresource.cpp
Unidiff
Diffstat (limited to 'libopie/todovcalresource.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie/todovcalresource.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/libopie/todovcalresource.cpp b/libopie/todovcalresource.cpp
index 75f2197..80f8c60 100644
--- a/libopie/todovcalresource.cpp
+++ b/libopie/todovcalresource.cpp
@@ -41,38 +41,43 @@ static VObject *vobjByEvent( const ToDoEvent &event )
41 if( task == 0 ) 41 if( task == 0 )
42 return 0l; 42 return 0l;
43 if( event.hasDate() ) 43 if( event.hasDate() )
44 addPropValue( task, VCDueProp, TimeConversion::toISO8601( event.date() ) ); 44 addPropValue( task, VCDueProp, TimeConversion::toISO8601( event.date() ) );
45 45
46 if( event.isCompleted() ) 46 if( event.isCompleted() )
47 addPropValue( task, VCStatusProp, "COMPLETED"); 47 addPropValue( task, VCStatusProp, "COMPLETED");
48 48
49 QString string = QString::number(event.priority() ); 49 QString string = QString::number(event.priority() );
50 addPropValue( task, VCPriorityProp, string.local8Bit() ); 50 addPropValue( task, VCPriorityProp, string.local8Bit() );
51 addPropValue( task, VCCategoriesProp, event.allCategories().join(";").local8Bit() ); 51 addPropValue( task, VCCategoriesProp, event.allCategories().join(";").local8Bit() );
52 addPropValue( task, VCDescriptionProp, event.description().local8Bit() ); 52 addPropValue( task, VCDescriptionProp, event.description().local8Bit() );
53 addPropValue( task, VCSummaryProp, event.description().left(15).local8Bit() ); 53 addPropValue( task, VCSummaryProp, event.summary().left(15).local8Bit() );
54 return task; 54 return task;
55}; 55};
56 56
57static ToDoEvent eventByVObj( VObject *obj ){ 57static ToDoEvent eventByVObj( VObject *obj ){
58 ToDoEvent event; 58 ToDoEvent event;
59 VObject *ob; 59 VObject *ob;
60 QCString name; 60 QCString name;
61 // no uid, attendees, ... and no fun 61 // no uid, attendees, ... and no fun
62 // description 62 // description
63 if( ( ob = isAPropertyOf( obj, VCDescriptionProp )) != 0 ){ 63 if( ( ob = isAPropertyOf( obj, VCDescriptionProp )) != 0 ){
64 name = vObjectStringZValue( ob ); 64 name = vObjectStringZValue( ob );
65 event.setDescription( name ); 65 event.setDescription( name );
66 } 66 }
67 // summary
68 if ( ( ob = isAPropertyOf( obj, VCSummaryProp ) ) != 0 ) {
69 name = vObjectStringZValue( ob );
70 event.setSummary( name );
71 }
67 // completed 72 // completed
68 if( ( ob = isAPropertyOf( obj, VCStatusProp )) != 0 ){ 73 if( ( ob = isAPropertyOf( obj, VCStatusProp )) != 0 ){
69 name = vObjectStringZValue( ob ); 74 name = vObjectStringZValue( ob );
70 if( name == "COMPLETED" ){ 75 if( name == "COMPLETED" ){
71 event.setCompleted( true ); 76 event.setCompleted( true );
72 }else{ 77 }else{
73 event.setCompleted( false ); 78 event.setCompleted( false );
74 } 79 }
75 }else 80 }else
76 event.setCompleted( false ); 81 event.setCompleted( false );
77 // priority 82 // priority
78 if ((ob = isAPropertyOf(obj, VCPriorityProp))) { 83 if ((ob = isAPropertyOf(obj, VCPriorityProp))) {