summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt4
-rw-r--r--libkcal/sharpformat.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 1fd5364..1c5e83b 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,138 +1,140 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.1.9 ************ 3********** VERSION 2.1.9 ************
4 4
5KO/Pi: 5KO/Pi:
6Fixed some problems of the new search options in the search dialog. 6Fixed some problems of the new search options in the search dialog.
7Fixed some problems in the new resource config options. 7Fixed some problems in the new resource config options.
8Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page. 8Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page.
9Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown: 9Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown:
10Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup. 10Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup.
11
12Fixed a problem in recurrence range in syncing with DTM.
11 13
12 14
13PwM/Pi: 15PwM/Pi:
14Added "sec" to the timeout config settings to make it clear the timeout values are seconds. 16Added "sec" to the timeout config settings to make it clear the timeout values are seconds.
15 17
16********** VERSION 2.1.8 ************ 18********** VERSION 2.1.8 ************
17 19
18KO/Pi: 20KO/Pi:
19Added info about the completion state of a todo in the ListView/Searchdialog. 21Added info about the completion state of a todo in the ListView/Searchdialog.
20If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well. 22If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well.
21Fixed some updating problems when changing the filter. 23Fixed some updating problems when changing the filter.
22 24
23KA/Pi: 25KA/Pi:
24In the addressee selection dialog now the formatted name is shown, if not empty. 26In the addressee selection dialog now the formatted name is shown, if not empty.
25Added a column "category" to the addressee selection dialog to make it possible to sort addressees after category. 27Added a column "category" to the addressee selection dialog to make it possible to sort addressees after category.
26Now in the addressee selection dialog a selected contact is remove with a single click from the selected list. 28Now in the addressee selection dialog a selected contact is remove with a single click from the selected list.
27 29
28Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored. 30Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored.
29Fixed the sorting for size in the file selector on the Z. 31Fixed the sorting for size in the file selector on the Z.
30 32
31Changed the color selection dialog on the Zaurus to a more user friendly version. 33Changed the color selection dialog on the Zaurus to a more user friendly version.
32 34
33********** VERSION 2.1.7 ************ 35********** VERSION 2.1.7 ************
34 36
35KO/Pi: 37KO/Pi:
36Fixed several problems in the new Resource handling. 38Fixed several problems in the new Resource handling.
37Added more options to the search dialog. 39Added more options to the search dialog.
38Fixed a problem in the Month view. 40Fixed a problem in the Month view.
39Added more options to the dialog when setting a todo to stopped. 41Added more options to the dialog when setting a todo to stopped.
40 42
41Fixed two small problems in KO/Pi Alarm applet. 43Fixed two small problems in KO/Pi Alarm applet.
42 44
43********** VERSION 2.1.6 ************ 45********** VERSION 2.1.6 ************
44 46
45This release is for testing only. 47This release is for testing only.
46 48
47KO/Pi: 49KO/Pi:
48Added to the list view (the list view is used in search dialog as well) the possibility to print it. 50Added to the list view (the list view is used in search dialog as well) the possibility to print it.
49Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view. 51Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view.
50Added to the list view the possibility to add all subtodos of selected todos to an export/beam. 52Added to the list view the possibility to add all subtodos of selected todos to an export/beam.
51Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout. 53Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout.
52Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus. 54Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus.
53Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly. 55Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly.
54 56
55Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars. 57Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars.
56In the sync profile config it is still missing to specify a particular calendar to sync with this profile. That setting will be added later. 58In the sync profile config it is still missing to specify a particular calendar to sync with this profile. That setting will be added later.
57Now on every sync the set of calendars is synced which are enabled in the resource view. 59Now on every sync the set of calendars is synced which are enabled in the resource view.
58 60
59A calendar is enabled in the resource view if the "eye" column is checked. 61A calendar is enabled in the resource view if the "eye" column is checked.
60You can set a calendar to be the default for new items( "+" column ). 62You can set a calendar to be the default for new items( "+" column ).
61You can tell KO/Pi to ignore all alarm of a calendar ( "bell" column ) and you can set it readonly. 63You can tell KO/Pi to ignore all alarm of a calendar ( "bell" column ) and you can set it readonly.
62To find out how to add a new calendar and how to remove a calendar is left as an exercise to the reader ... 64To find out how to add a new calendar and how to remove a calendar is left as an exercise to the reader ...
63 65
64 66
65********** VERSION 2.1.5 ************ 67********** VERSION 2.1.5 ************
66 68
67This is the new stable version. 69This is the new stable version.
68Bugfix: 70Bugfix:
69Fixed a problem with agenda popup on the desktop in KO/Pi. 71Fixed a problem with agenda popup on the desktop in KO/Pi.
70Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization. 72Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization.
71Added config option to not display completed todos in agenda view. 73Added config option to not display completed todos in agenda view.
72Addressee view is now using the formatted name, if defined. 74Addressee view is now using the formatted name, if defined.
73That makes it possible to display "lastname, firstname" in that view now. 75That makes it possible to display "lastname, firstname" in that view now.
74To set the formatted name for all contacts, please use menu: 76To set the formatted name for all contacts, please use menu:
75Edit->Change->Set formatted name. 77Edit->Change->Set formatted name.
76Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows. 78Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows.
77 79
78********** VERSION 2.1.4 ************ 80********** VERSION 2.1.4 ************
79 81
80Fixed two more bugs in the KA/Pi CSV import dialog: 82Fixed two more bugs in the KA/Pi CSV import dialog:
81Made it possible to read multi-line fields and import it to the "Note" field. 83Made it possible to read multi-line fields and import it to the "Note" field.
82Fixed a problem in mapping custom fields, whatever a custem field is... 84Fixed a problem in mapping custom fields, whatever a custem field is...
83 85
84********** VERSION 2.1.3 ************ 86********** VERSION 2.1.3 ************
85 87
86Changed the menu structure of the alarm applet: 88Changed the menu structure of the alarm applet:
87Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List". 89Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List".
88 90
89Fixed several problems in the KA/Pi CSV import dialog: 91Fixed several problems in the KA/Pi CSV import dialog:
90Added "Category", made codec configureable and made it possible to map many fields to the "Note" field. 92Added "Category", made codec configureable and made it possible to map many fields to the "Note" field.
91 93
92 94
93********** VERSION 2.1.2 ************ 95********** VERSION 2.1.2 ************
94 96
95Fixed a problem closing the alarm dialog on Zaurus with "OK" button. 97Fixed a problem closing the alarm dialog on Zaurus with "OK" button.
96 98
97Fixed a problem when importing data from Outlook with mutiple categories set. 99Fixed a problem when importing data from Outlook with mutiple categories set.
98 100
99Changed display of days in datenavigator: 101Changed display of days in datenavigator:
100Birthdays are now blue, not dark green. 102Birthdays are now blue, not dark green.
101When todo view is shown, no birtdays are shown and days with due todos are shown blue. 103When todo view is shown, no birtdays are shown and days with due todos are shown blue.
102When journal view is shown, only holidays are shown and days with journals are blue. 104When journal view is shown, only holidays are shown and days with journals are blue.
103 105
104Added Backup options to global config: 106Added Backup options to global config:
105You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ). 107You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ).
106It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again. 108It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again.
107The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups. 109The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups.
108 110
109********** VERSION 2.1.1 ************ 111********** VERSION 2.1.1 ************
110 112
111Stable release 2.1.1! 113Stable release 2.1.1!
112 114
113KO/Pi: 115KO/Pi:
114Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display. 116Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display.
115 117
116********** VERSION 2.1.0 ************ 118********** VERSION 2.1.0 ************
117 119
118Stable release 2.1.0! 120Stable release 2.1.0!
119 121
120Summary of changes/fixes compared to version 2.0.6: 122Summary of changes/fixes compared to version 2.0.6:
121 123
122Many bugs of version 2.0.6 fixed. 124Many bugs of version 2.0.6 fixed.
123Most of them were small bugs, but some of them were important. 125Most of them were small bugs, but some of them were important.
124It is recommended to use version 2.1.0 and not version 2.0.6. 126It is recommended to use version 2.1.0 and not version 2.0.6.
125 127
126Important changes: 128Important changes:
127 129
128Added recurring todos to KO/Pi. 130Added recurring todos to KO/Pi.
129 131
130Added global application font settings (for all KDE-Pim/Pi apps) to the general settings. 132Added global application font settings (for all KDE-Pim/Pi apps) to the general settings.
131 133
132Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. 134Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more.
133 135
134Datenavigator can now display many months. Very useful on the desktop. 136Datenavigator can now display many months. Very useful on the desktop.
135 137
136KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements. 138KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements.
137 139
138Made alarm sound working on Linux desktop. 140Made alarm sound working on Linux desktop.
diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp
index c2ee2c9..9b757f7 100644
--- a/libkcal/sharpformat.cpp
+++ b/libkcal/sharpformat.cpp
@@ -698,257 +698,257 @@ QString SharpFormat::dtToString( const QDateTime& dti, bool useTZ )
698 return datestr + timestr; 698 return datestr + timestr;
699} 699}
700QString SharpFormat::getEventString( Event* event ) 700QString SharpFormat::getEventString( Event* event )
701{ 701{
702 QStringList list; 702 QStringList list;
703 list.append( event->getID("Sharp_DTM") ); 703 list.append( event->getID("Sharp_DTM") );
704 list.append( event->categories().join(",") ); 704 list.append( event->categories().join(",") );
705 if ( !event->summary().isEmpty() ) 705 if ( !event->summary().isEmpty() )
706 list.append( event->summary() ); 706 list.append( event->summary() );
707 else 707 else
708 list.append("" ); 708 list.append("" );
709 if ( !event->location().isEmpty() ) 709 if ( !event->location().isEmpty() )
710 list.append( event->location() ); 710 list.append( event->location() );
711 else 711 else
712 list.append("" ); 712 list.append("" );
713 if ( !event->description().isEmpty() ) 713 if ( !event->description().isEmpty() )
714 list.append( event->description() ); 714 list.append( event->description() );
715 else 715 else
716 list.append( "" ); 716 list.append( "" );
717 if ( event->doesFloat () ) { 717 if ( event->doesFloat () ) {
718 list.append( dtToString( QDateTime(event->dtStart().date(), QTime(0,0,0)), false )); 718 list.append( dtToString( QDateTime(event->dtStart().date(), QTime(0,0,0)), false ));
719 list.append( dtToString( QDateTime(event->dtEnd().date(),QTime(23,59,59)), false )); //6 719 list.append( dtToString( QDateTime(event->dtEnd().date(),QTime(23,59,59)), false )); //6
720 list.append( "1" ); 720 list.append( "1" );
721 721
722 } 722 }
723 else { 723 else {
724 list.append( dtToString( event->dtStart()) ); 724 list.append( dtToString( event->dtStart()) );
725 list.append( dtToString( event->dtEnd()) ); //6 725 list.append( dtToString( event->dtEnd()) ); //6
726 list.append( "0" ); 726 list.append( "0" );
727 } 727 }
728 bool noAlarm = true; 728 bool noAlarm = true;
729 if ( event->alarms().count() > 0 ) { 729 if ( event->alarms().count() > 0 ) {
730 Alarm * al = event->alarms().first(); 730 Alarm * al = event->alarms().first();
731 if ( al->enabled() ) { 731 if ( al->enabled() ) {
732 noAlarm = false; 732 noAlarm = false;
733 list.append( "0" ); // yes, 0 == alarm 733 list.append( "0" ); // yes, 0 == alarm
734 list.append( QString::number( al->startOffset().asSeconds()/(-60) ) ); 734 list.append( QString::number( al->startOffset().asSeconds()/(-60) ) );
735 if ( al->type() == Alarm::Audio ) 735 if ( al->type() == Alarm::Audio )
736 list.append( "1" ); // type audio 736 list.append( "1" ); // type audio
737 else 737 else
738 list.append( "0" ); // type silent 738 list.append( "0" ); // type silent
739 } 739 }
740 } 740 }
741 if ( noAlarm ) { 741 if ( noAlarm ) {
742 list.append( "1" ); // yes, 1 == no alarm 742 list.append( "1" ); // yes, 1 == no alarm
743 list.append( "0" ); // no alarm offset 743 list.append( "0" ); // no alarm offset
744 list.append( "1" ); // type 744 list.append( "1" ); // type
745 } 745 }
746 // next is: 11 746 // next is: 11
747 // next is: 11-16 are recurrence 747 // next is: 11-16 are recurrence
748 Recurrence* rec = event->recurrence(); 748 Recurrence* rec = event->recurrence();
749 749
750 bool writeEndDate = false; 750 bool writeEndDate = false;
751 switch ( rec->doesRecur() ) 751 switch ( rec->doesRecur() )
752 { 752 {
753 case Recurrence::rDaily: // 0 753 case Recurrence::rDaily: // 0
754 list.append( "0" ); 754 list.append( "0" );
755 list.append( QString::number( rec->frequency() ));//12 755 list.append( QString::number( rec->frequency() ));//12
756 list.append( "0" ); 756 list.append( "0" );
757 list.append( "0" ); 757 list.append( "0" );
758 writeEndDate = true; 758 writeEndDate = true;
759 break; 759 break;
760 case Recurrence::rWeekly:// 1 760 case Recurrence::rWeekly:// 1
761 list.append( "1" ); 761 list.append( "1" );
762 list.append( QString::number( rec->frequency()) );//12 762 list.append( QString::number( rec->frequency()) );//12
763 list.append( "0" ); 763 list.append( "0" );
764 { 764 {
765 int days = 0; 765 int days = 0;
766 QBitArray weekDays = rec->days(); 766 QBitArray weekDays = rec->days();
767 int i; 767 int i;
768 for( i = 1; i <= 7; ++i ) { 768 for( i = 1; i <= 7; ++i ) {
769 if ( weekDays[i-1] ) { 769 if ( weekDays[i-1] ) {
770 days += 1 << (i-1); 770 days += 1 << (i-1);
771 } 771 }
772 } 772 }
773 list.append( QString::number( days ) ); 773 list.append( QString::number( days ) );
774 } 774 }
775 //pending weekdays 775 //pending weekdays
776 writeEndDate = true; 776 writeEndDate = true;
777 777
778 break; 778 break;
779 case Recurrence::rMonthlyPos:// 2 779 case Recurrence::rMonthlyPos:// 2
780 list.append( "2" ); 780 list.append( "2" );
781 list.append( QString::number( rec->frequency()) );//12 781 list.append( QString::number( rec->frequency()) );//12
782 782
783 writeEndDate = true; 783 writeEndDate = true;
784 { 784 {
785 int count = 1; 785 int count = 1;
786 QPtrList<Recurrence::rMonthPos> rmp; 786 QPtrList<Recurrence::rMonthPos> rmp;
787 rmp = rec->monthPositions(); 787 rmp = rec->monthPositions();
788 if ( rmp.first()->negative ) 788 if ( rmp.first()->negative )
789 count = 5 - rmp.first()->rPos - 1; 789 count = 5 - rmp.first()->rPos - 1;
790 else 790 else
791 count = rmp.first()->rPos - 1; 791 count = rmp.first()->rPos - 1;
792 list.append( QString::number( count ) ); 792 list.append( QString::number( count ) );
793 793
794 } 794 }
795 795
796 list.append( "0" ); 796 list.append( "0" );
797 break; 797 break;
798 case Recurrence::rMonthlyDay:// 3 798 case Recurrence::rMonthlyDay:// 3
799 list.append( "3" ); 799 list.append( "3" );
800 list.append( QString::number( rec->frequency()) );//12 800 list.append( QString::number( rec->frequency()) );//12
801 list.append( "0" ); 801 list.append( "0" );
802 list.append( "0" ); 802 list.append( "0" );
803 writeEndDate = true; 803 writeEndDate = true;
804 break; 804 break;
805 case Recurrence::rYearlyMonth://4 805 case Recurrence::rYearlyMonth://4
806 list.append( "4" ); 806 list.append( "4" );
807 list.append( QString::number( rec->frequency()) );//12 807 list.append( QString::number( rec->frequency()) );//12
808 list.append( "0" ); 808 list.append( "0" );
809 list.append( "0" ); 809 list.append( "0" );
810 writeEndDate = true; 810 writeEndDate = true;
811 break; 811 break;
812 812
813 default: 813 default:
814 list.append( "255" ); 814 list.append( "255" );
815 list.append( QString() ); 815 list.append( QString() );
816 list.append( "0" ); 816 list.append( "0" );
817 list.append( QString() ); 817 list.append( QString() );
818 list.append( "0" ); 818 list.append( "0" );
819 list.append( "20991231T000000" ); 819 list.append( "20991231T000000" );
820 break; 820 break;
821 } 821 }
822 if ( writeEndDate ) { 822 if ( writeEndDate ) {
823 823
824 if ( rec->endDate().isValid() ) { // 15 + 16 824 if ( rec->endDate().isValid() ) { // 15 + 16
825 list.append( "1" ); 825 list.append( "1" );
826 list.append( dtToString( rec->endDate()) ); 826 list.append( dtToString( rec->endDate(), false ) );
827 } else { 827 } else {
828 list.append( "0" ); 828 list.append( "0" );
829 list.append( "20991231T000000" ); 829 list.append( "20991231T000000" );
830 } 830 }
831 831
832 } 832 }
833 if ( event->doesFloat () ) { 833 if ( event->doesFloat () ) {
834 list.append( dtToString( event->dtStart(), false ).left( 8 )); 834 list.append( dtToString( event->dtStart(), false ).left( 8 ));
835 list.append( dtToString( event->dtEnd(), false ).left( 8 )); //6 835 list.append( dtToString( event->dtEnd(), false ).left( 8 )); //6
836 836
837 } 837 }
838 else { 838 else {
839 list.append( QString() ); 839 list.append( QString() );
840 list.append( QString() ); 840 list.append( QString() );
841 841
842 } 842 }
843 if (event->dtStart().date() == event->dtEnd().date() ) 843 if (event->dtStart().date() == event->dtEnd().date() )
844 list.append( "0" ); 844 list.append( "0" );
845 else 845 else
846 list.append( "1" ); 846 list.append( "1" );
847 847
848 848
849 for(QStringList::Iterator it=list.begin(); 849 for(QStringList::Iterator it=list.begin();
850 it!=list.end(); ++it){ 850 it!=list.end(); ++it){
851 QString& s = (*it); 851 QString& s = (*it);
852 s.replace(QRegExp("\""), "\"\""); 852 s.replace(QRegExp("\""), "\"\"");
853 if(s.contains(QRegExp("[,\"\r\n]")) || s.stripWhiteSpace() != s){ 853 if(s.contains(QRegExp("[,\"\r\n]")) || s.stripWhiteSpace() != s){
854 s.prepend('\"'); 854 s.prepend('\"');
855 s.append('\"'); 855 s.append('\"');
856 } else if(s.isEmpty() && !s.isNull()){ 856 } else if(s.isEmpty() && !s.isNull()){
857 s = "\"\""; 857 s = "\"\"";
858 } 858 }
859 } 859 }
860 return list.join(","); 860 return list.join(",");
861 861
862 862
863} 863}
864QString SharpFormat::getTodoString( Todo* todo ) 864QString SharpFormat::getTodoString( Todo* todo )
865{ 865{
866 QStringList list; 866 QStringList list;
867 list.append( todo->getID("Sharp_DTM") ); 867 list.append( todo->getID("Sharp_DTM") );
868 list.append( todo->categories().join(",") ); 868 list.append( todo->categories().join(",") );
869 869
870 if ( todo->hasStartDate() ) { 870 if ( todo->hasStartDate() ) {
871 list.append( dtToString( todo->dtStart()) ); 871 list.append( dtToString( todo->dtStart()) );
872 } else 872 } else
873 list.append( QString() ); 873 list.append( QString() );
874 874
875 if ( todo->hasDueDate() ) { 875 if ( todo->hasDueDate() ) {
876 QTime tim; 876 QTime tim;
877 if ( todo->doesFloat()) { 877 if ( todo->doesFloat()) {
878 list.append( dtToString( QDateTime(todo->dtDue().date(),QTime( 0,0,0 )), false)) ; 878 list.append( dtToString( QDateTime(todo->dtDue().date(),QTime( 0,0,0 )), false)) ;
879 } else { 879 } else {
880 list.append( dtToString(todo->dtDue() ) ); 880 list.append( dtToString(todo->dtDue() ) );
881 } 881 }
882 } else 882 } else
883 list.append( QString() ); 883 list.append( QString() );
884 884
885 if ( todo->isCompleted() ) { 885 if ( todo->isCompleted() ) {
886 list.append( dtToString( todo->completed()) ); 886 list.append( dtToString( todo->completed()) );
887 list.append( "0" ); // yes 0 == completed 887 list.append( "0" ); // yes 0 == completed
888 } else { 888 } else {
889 list.append( dtToString( todo->completed()) ); 889 list.append( dtToString( todo->completed()) );
890 list.append( "1" ); 890 list.append( "1" );
891 } 891 }
892 list.append( QString::number( todo->priority() )); 892 list.append( QString::number( todo->priority() ));
893 if( ! todo->summary().isEmpty() ) 893 if( ! todo->summary().isEmpty() )
894 list.append( todo->summary() ); 894 list.append( todo->summary() );
895 else 895 else
896 list.append( "" ); 896 list.append( "" );
897 if (! todo->description().isEmpty() ) 897 if (! todo->description().isEmpty() )
898 list.append( todo->description() ); 898 list.append( todo->description() );
899 else 899 else
900 list.append( "" ); 900 list.append( "" );
901 for(QStringList::Iterator it=list.begin(); 901 for(QStringList::Iterator it=list.begin();
902 it!=list.end(); ++it){ 902 it!=list.end(); ++it){
903 QString& s = (*it); 903 QString& s = (*it);
904 s.replace(QRegExp("\""), "\"\""); 904 s.replace(QRegExp("\""), "\"\"");
905 if(s.contains(QRegExp("[,\"\r\n]")) || s.stripWhiteSpace() != s){ 905 if(s.contains(QRegExp("[,\"\r\n]")) || s.stripWhiteSpace() != s){
906 s.prepend('\"'); 906 s.prepend('\"');
907 s.append('\"'); 907 s.append('\"');
908 } else if(s.isEmpty() && !s.isNull()){ 908 } else if(s.isEmpty() && !s.isNull()){
909 s = "\"\""; 909 s = "\"\"";
910 } 910 }
911 } 911 }
912 return list.join(","); 912 return list.join(",");
913} 913}
914QString SharpFormat::getPart( const QString & text, bool &ok, int &start ) 914QString SharpFormat::getPart( const QString & text, bool &ok, int &start )
915{ 915{
916 //qDebug("start %d ", start); 916 //qDebug("start %d ", start);
917 917
918 QString retval =""; 918 QString retval ="";
919 if ( text.at(start) == '"' ) { 919 if ( text.at(start) == '"' ) {
920 if ( text.mid( start,2) == "\"\"" && !( text.mid( start+2,1) == "\"")) { 920 if ( text.mid( start,2) == "\"\"" && !( text.mid( start+2,1) == "\"")) {
921 start = start +2; 921 start = start +2;
922 if ( text.mid( start,1) == "," ) { 922 if ( text.mid( start,1) == "," ) {
923 start += 1; 923 start += 1;
924 } 924 }
925 retval = ""; 925 retval = "";
926 if ( text.mid( start,1) == "\n" ) { 926 if ( text.mid( start,1) == "\n" ) {
927 start += 1; 927 start += 1;
928 ok = false; 928 ok = false;
929 } 929 }
930 return retval; 930 return retval;
931 } 931 }
932 int hk = start+1; 932 int hk = start+1;
933 hk = text.find ('"',hk); 933 hk = text.find ('"',hk);
934 while ( text.at(hk+1) == '"' ) 934 while ( text.at(hk+1) == '"' )
935 hk = text.find ('"',hk+2); 935 hk = text.find ('"',hk+2);
936 retval = text.mid( start+1, hk-start-1); 936 retval = text.mid( start+1, hk-start-1);
937 start = hk+1; 937 start = hk+1;
938 retval.replace( QRegExp("\"\""), "\""); 938 retval.replace( QRegExp("\"\""), "\"");
939 if ( text.mid( start,1) == "," ) { 939 if ( text.mid( start,1) == "," ) {
940 start += 1; 940 start += 1;
941 } 941 }
942 if ( text.mid( start,1) == "\n" ) { 942 if ( text.mid( start,1) == "\n" ) {
943 start += 1; 943 start += 1;
944 ok = false; 944 ok = false;
945 } 945 }
946 //qDebug("retval***%s*** ",retval.latin1() ); 946 //qDebug("retval***%s*** ",retval.latin1() );
947 return retval; 947 return retval;
948 948
949 } else { 949 } else {
950 int nl = text.find ("\n",start); 950 int nl = text.find ("\n",start);
951 int kom = text.find (',',start); 951 int kom = text.find (',',start);
952 if ( kom < nl ) { 952 if ( kom < nl ) {
953 // qDebug("kom < nl %d ", kom); 953 // qDebug("kom < nl %d ", kom);
954 retval = text.mid(start, kom-start); 954 retval = text.mid(start, kom-start);