summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt3
-rw-r--r--libkcal/icalformatimpl.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 52590d8..21cee6e 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,285 +1,288 @@
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.17 ************ 3********** VERSION 2.1.17 ************
4 4
5KO/Pi: 5KO/Pi:
6Added option to display times in What's Next View on two lines. 6Added option to display times in What's Next View on two lines.
7(Useful for display on the Zaurus with 240x320 screen) 7(Useful for display on the Zaurus with 240x320 screen)
8Removed "Allday" for allday events of one day duration in What's Next View. 8Removed "Allday" for allday events of one day duration in What's Next View.
9Added date range for allday events of more than one day duration in What's Next View. 9Added date range for allday events of more than one day duration in What's Next View.
10Fixed two problems in the data importing from Outlook: 10Fixed two problems in the data importing from Outlook:
11 Fixed the duplicated import if the summary, location or description had whitespaces at the end. 11 Fixed the duplicated import if the summary, location or description had whitespaces at the end.
12 Fixed a problem importing certain recurrence rules. 12 Fixed a problem importing certain recurrence rules.
13 13
14A journal in an ics file may have no dtStart value (as files from KNotes, which stores its notes in an ics journal file).
15If now a journal has no dtStart value the dtStart value is set to the created value of the journal when loading the file. That makes it possible to view and edit "notes" from KNotes. Simply add another Resource in KO/Pi which is a copy of the ics file from KNotes. You will find the "notes" in KO/Pi as a journal entry on the date you created it.
16
14********** VERSION 2.1.16 ************ 17********** VERSION 2.1.16 ************
15 18
16Fixed a problem with the menu bar in KO/Pi and using the "Menu" hardware key on the Zaurus. 19Fixed a problem with the menu bar in KO/Pi and using the "Menu" hardware key on the Zaurus.
17Added columns for datetime in todo view: Last modified, created and last modified subtodo 20Added columns for datetime in todo view: Last modified, created and last modified subtodo
18Fixed a bug in agenda view displaying recurring multiday events which are longer than two days. 21Fixed a bug in agenda view displaying recurring multiday events which are longer than two days.
19Made conflict detection up to 4 times faster. 22Made conflict detection up to 4 times faster.
20 23
21********** VERSION 2.1.15 ************ 24********** VERSION 2.1.15 ************
22 25
23Fixed two layout problems on the Z: 26Fixed two layout problems on the Z:
24Made the with of the newly added buttons on the Quick-Todo smaller. 27Made the with of the newly added buttons on the Quick-Todo smaller.
25Made listweek layout in 2 columns on the Z760 in portait screen and full menubar visible. 28Made listweek layout in 2 columns on the Z760 in portait screen and full menubar visible.
26 29
27 30
28********** VERSION 2.1.14 ************ 31********** VERSION 2.1.14 ************
29 32
30Added some buttons to the KO/Pi Quick-todo line to make it possible to quickly access some todo view layout settings like display all flat/open/close and hide/show running/done. 33Added some buttons to the KO/Pi Quick-todo line to make it possible to quickly access some todo view layout settings like display all flat/open/close and hide/show running/done.
31Added a button to add a subtodo quickly. 34Added a button to add a subtodo quickly.
32 35
33Added a possibility to search for conflicting events. (In the Action menu. Keyboard shortcut "q", shift+q or ctrl +q ). 36Added a possibility to search for conflicting events. (In the Action menu. Keyboard shortcut "q", shift+q or ctrl +q ).
34Added an option to change the layout of the list week to column mode. 37Added an option to change the layout of the list week to column mode.
35 38
36Fixed some usability problems in pi-sync mode by adding some progress information about file transfer. 39Fixed some usability problems in pi-sync mode by adding some progress information about file transfer.
37 40
38Fixed pi-sync problems with the new multi calendar feature. 41Fixed pi-sync problems with the new multi calendar feature.
39Now pi-sync behaviour should be: 42Now pi-sync behaviour should be:
401) Local sends file request ( as usual ) 431) Local sends file request ( as usual )
412) Remote sends file which contains data of all enabled ( the calendar where the "eye" column is checked ) calendars. 442) Remote sends file which contains data of all enabled ( the calendar where the "eye" column is checked ) calendars.
423) Local syncs with data, adds new entries to default calendar and sends file back ( as usual ). 453) Local syncs with data, adds new entries to default calendar and sends file back ( as usual ).
43 If the data which local receives contains entries which are on disabled calendars on local this entries are updated and not added as duplicates to the default calendar. 46 If the data which local receives contains entries which are on disabled calendars on local this entries are updated and not added as duplicates to the default calendar.
444) Remote updates the data and adds new entries to default calendar. Readonly entries are not changed on remote. 474) Remote updates the data and adds new entries to default calendar. Readonly entries are not changed on remote.
45 If the data which remote receives contains entries which are on disabled calendars on remote this entries are updated and not added as duplicates to the default calendar. 48 If the data which remote receives contains entries which are on disabled calendars on remote this entries are updated and not added as duplicates to the default calendar.
46 49
47Summary: 50Summary:
48No new item ( new created after the last sync ) in a disabled calendar is propagated to the sync partner. Readonly items are synced and added/changed on the sync partner if it is not readonly on the sync partner. 51No new item ( new created after the last sync ) in a disabled calendar is propagated to the sync partner. Readonly items are synced and added/changed on the sync partner if it is not readonly on the sync partner.
49If you have different calendars on remote and local and some of them disabled you may get some "strange" bahaviour. 52If you have different calendars on remote and local and some of them disabled you may get some "strange" bahaviour.
50Well, the syncing has become quite complicated ... you should have no problems if you enable all calendars. 53Well, the syncing has become quite complicated ... you should have no problems if you enable all calendars.
51 54
52********** VERSION 2.1.13 ************ 55********** VERSION 2.1.13 ************
53 56
54Fixed a problem in KA/Pi search. 57Fixed a problem in KA/Pi search.
55Fixed some minor problems in KO/Pi. 58Fixed some minor problems in KO/Pi.
56Added calendar selection possibility to the todo view popup and to the event/todo/journal editor. 59Added calendar selection possibility to the todo view popup and to the event/todo/journal editor.
57 60
58Fixed memory usage problems in KA/Pi: 61Fixed memory usage problems in KA/Pi:
59When loading data KA/Pi did load the file data twice. 62When loading data KA/Pi did load the file data twice.
60Example: 63Example:
61 A 600k file did consume 1200k memory during loading process. 64 A 600k file did consume 1200k memory during loading process.
62 This is fixed, it does now consume only 600k during loading process. 65 This is fixed, it does now consume only 600k during loading process.
63When saving data KA/Pi did consume a lot of memory for the data parsing during the save process. 66When saving data KA/Pi did consume a lot of memory for the data parsing during the save process.
64This is fixed. 67This is fixed.
65Example: 68Example:
66 Before saving a 600k file KA/Pi did consume 21.7 Meg of Ram. 69 Before saving a 600k file KA/Pi did consume 21.7 Meg of Ram.
67 When saving KA/Pi did consume 28.6 Meg of Ram. That causes a crash on the Zaurus because there was no memeory left in the system. 70 When saving KA/Pi did consume 28.6 Meg of Ram. That causes a crash on the Zaurus because there was no memeory left in the system.
68 Now KA/Pi is consuming on saving the same data 22.0 Meg of Ram during the save process. 71 Now KA/Pi is consuming on saving the same data 22.0 Meg of Ram during the save process.
69Note: The memory usage of KA/Pi after the data is loaded/saved has not changed. 72Note: The memory usage of KA/Pi after the data is loaded/saved has not changed.
70The saving of data may be a bit slower now. 73The saving of data may be a bit slower now.
71 74
72Fixed memory usage problems in KO/Pi: 75Fixed memory usage problems in KO/Pi:
73When KO/Pi did save the data to file, it did not release the used buffers after saving. 76When KO/Pi did save the data to file, it did not release the used buffers after saving.
74The used buffer was released after saving the next time, but there was new buffer space allocated again on that save operation. 77The used buffer was released after saving the next time, but there was new buffer space allocated again on that save operation.
75This is fixed. 78This is fixed.
76Example: 79Example:
77 When saving a 400k file KO/Pi do now use 400k less memory now. 80 When saving a 400k file KO/Pi do now use 400k less memory now.
78 81
79Optimized memory usage in KO/Pi Agenda view: 82Optimized memory usage in KO/Pi Agenda view:
80KO/Pi is storing some paint information in extra buffers for faster repainting of the agenda view. 83KO/Pi is storing some paint information in extra buffers for faster repainting of the agenda view.
81These buffers were not made smaller (i.e. downsized) because of performance reasons. 84These buffers were not made smaller (i.e. downsized) because of performance reasons.
82The handling of these buffers are now much smarter: 85The handling of these buffers are now much smarter:
83Two (of six) buffers are removed completely. 86Two (of six) buffers are removed completely.
84The remaing four buffers are now downsized after not using the agenda view for 45 seconds. 87The remaing four buffers are now downsized after not using the agenda view for 45 seconds.
85Such that the memory usage of KO/Pi is smaller now in general ( because 2 buffers are removed) and is much smaller when not using the agenda view. That is very important when using fastload for KO/Pi. 88Such that the memory usage of KO/Pi is smaller now in general ( because 2 buffers are removed) and is much smaller when not using the agenda view. That is very important when using fastload for KO/Pi.
86 89
87Worst case example ( for a maximum size agenda content): 90Worst case example ( for a maximum size agenda content):
88 When resizing the agenda content to a large scale, KO/Pi did use 17Meg of mem ( and did not use less memory until it was stopped). Now KO/Pi is using on the same operation only 14.3 Meg of mem and after 45 seconds not using the agenda view it uses only 9.4 Meg of mem. 91 When resizing the agenda content to a large scale, KO/Pi did use 17Meg of mem ( and did not use less memory until it was stopped). Now KO/Pi is using on the same operation only 14.3 Meg of mem and after 45 seconds not using the agenda view it uses only 9.4 Meg of mem.
89 92
90When switching to an unused Agenda view now KO/Pi is upizing the buffers again. This takes less than a second. Such that switching to Agenda view (after not using it for more than 45 seconds) is now a bit slower. 93When switching to an unused Agenda view now KO/Pi is upizing the buffers again. This takes less than a second. Such that switching to Agenda view (after not using it for more than 45 seconds) is now a bit slower.
91 94
92Summary: 95Summary:
93Many memory wasting problems of KA/Pi and KO/Pi fixed such that it is better to use on the Zaurus. 96Many memory wasting problems of KA/Pi and KO/Pi fixed such that it is better to use on the Zaurus.
94 97
95********** VERSION 2.1.12 ************ 98********** VERSION 2.1.12 ************
96 99
97KO/Pi: 100KO/Pi:
98Many small usability fixes, e.g. rearranged the popup menus such that they are better to use on the Zaurus. 101Many small usability fixes, e.g. rearranged the popup menus such that they are better to use on the Zaurus.
99Fixed a problem with the month view when file was saved but KO/Pi was not the active window. 102Fixed a problem with the month view when file was saved but KO/Pi was not the active window.
100Fixed some problems in the resource config dialog (e.g. added a warning if you set all calendars to read-only). 103Fixed some problems in the resource config dialog (e.g. added a warning if you set all calendars to read-only).
101Fixed some other small problems. 104Fixed some other small problems.
102 105
103********** VERSION 2.1.11 ************ 106********** VERSION 2.1.11 ************
104 107
105KO/Pi: 108KO/Pi:
106Because we can have many calendars now in KO/Pi we can have more than one journal entry per day. 109Because we can have many calendars now in KO/Pi we can have more than one journal entry per day.
107Added features to handle (and add ) more than one journal entry per day. 110Added features to handle (and add ) more than one journal entry per day.
108Added option for a journal title. 111Added option for a journal title.
109 112
110Added info about the calendar, the item belongs to, to the event/todo/journal viewer. 113Added info about the calendar, the item belongs to, to the event/todo/journal viewer.
111Fixed a problem of the alarm of completed recurring todos. 114Fixed a problem of the alarm of completed recurring todos.
112Added to the event/todo editor to set quickly the category of an item. 115Added to the event/todo editor to set quickly the category of an item.
113 116
114 117
115Fixed some problems when calling KO/Pi or KA/Pi from the alarm applet. 118Fixed some problems when calling KO/Pi or KA/Pi from the alarm applet.
116 119
117Added KA/Pi multi sync to the multi sync called from the alarm applet. 120Added KA/Pi multi sync to the multi sync called from the alarm applet.
118 121
119********** VERSION 2.1.10 ************ 122********** VERSION 2.1.10 ************
120 123
121KO/Pi: 124KO/Pi:
122Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file. 125Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file.
123When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted. 126When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted.
124Fixed a bug in searching for a small timerange, i.e. one day. 127Fixed a bug in searching for a small timerange, i.e. one day.
125 128
126KA/Pi: 129KA/Pi:
127Fixed two problems in csv export. 130Fixed two problems in csv export.
128Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi. 131Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi.
129 132
130********** VERSION 2.1.9 ************ 133********** VERSION 2.1.9 ************
131 134
132KO/Pi: 135KO/Pi:
133Fixed some problems of the new search options in the search dialog. 136Fixed some problems of the new search options in the search dialog.
134Fixed some problems in the new resource config options. 137Fixed some problems in the new resource config options.
135Changed 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. 138Changed 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.
136Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown: 139Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown:
137Now 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. 140Now 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.
138 141
139Fixed a problem in recurrence range in syncing with DTM. 142Fixed a problem in recurrence range in syncing with DTM.
140 143
141KA/Pi: 144KA/Pi:
142Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...) 145Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...)
143 146
144PwM/Pi: 147PwM/Pi:
145Added "sec" to the timeout config settings to make it clear the timeout values are seconds. 148Added "sec" to the timeout config settings to make it clear the timeout values are seconds.
146 149
147********** VERSION 2.1.8 ************ 150********** VERSION 2.1.8 ************
148 151
149KO/Pi: 152KO/Pi:
150Added info about the completion state of a todo in the ListView/Searchdialog. 153Added info about the completion state of a todo in the ListView/Searchdialog.
151If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well. 154If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well.
152Fixed some updating problems when changing the filter. 155Fixed some updating problems when changing the filter.
153 156
154KA/Pi: 157KA/Pi:
155In the addressee selection dialog now the formatted name is shown, if not empty. 158In the addressee selection dialog now the formatted name is shown, if not empty.
156Added a column "category" to the addressee selection dialog to make it possible to sort addressees after category. 159Added a column "category" to the addressee selection dialog to make it possible to sort addressees after category.
157Now in the addressee selection dialog a selected contact is remove with a single click from the selected list. 160Now in the addressee selection dialog a selected contact is remove with a single click from the selected list.
158 161
159Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored. 162Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored.
160Fixed the sorting for size in the file selector on the Z. 163Fixed the sorting for size in the file selector on the Z.
161 164
162Changed the color selection dialog on the Zaurus to a more user friendly version. 165Changed the color selection dialog on the Zaurus to a more user friendly version.
163 166
164********** VERSION 2.1.7 ************ 167********** VERSION 2.1.7 ************
165 168
166KO/Pi: 169KO/Pi:
167Fixed several problems in the new Resource handling. 170Fixed several problems in the new Resource handling.
168Added more options to the search dialog. 171Added more options to the search dialog.
169Fixed a problem in the Month view. 172Fixed a problem in the Month view.
170Added more options to the dialog when setting a todo to stopped. 173Added more options to the dialog when setting a todo to stopped.
171 174
172Fixed two small problems in KO/Pi Alarm applet. 175Fixed two small problems in KO/Pi Alarm applet.
173 176
174********** VERSION 2.1.6 ************ 177********** VERSION 2.1.6 ************
175 178
176This release is for testing only. 179This release is for testing only.
177 180
178KO/Pi: 181KO/Pi:
179Added to the list view (the list view is used in search dialog as well) the possibility to print it. 182Added to the list view (the list view is used in search dialog as well) the possibility to print it.
180Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view. 183Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view.
181Added to the list view the possibility to add all subtodos of selected todos to an export/beam. 184Added to the list view the possibility to add all subtodos of selected todos to an export/beam.
182Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout. 185Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout.
183Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus. 186Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus.
184Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly. 187Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly.
185 188
186Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars. 189Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars.
187In the sync profile config it is still missing to specify a particular calendar to sync with this profile. That setting will be added later. 190In the sync profile config it is still missing to specify a particular calendar to sync with this profile. That setting will be added later.
188Now on every sync the set of calendars is synced which are enabled in the resource view. 191Now on every sync the set of calendars is synced which are enabled in the resource view.
189 192
190A calendar is enabled in the resource view if the "eye" column is checked. 193A calendar is enabled in the resource view if the "eye" column is checked.
191You can set a calendar to be the default for new items( "+" column ). 194You can set a calendar to be the default for new items( "+" column ).
192You can tell KO/Pi to ignore all alarm of a calendar ( "bell" column ) and you can set it readonly. 195You can tell KO/Pi to ignore all alarm of a calendar ( "bell" column ) and you can set it readonly.
193To find out how to add a new calendar and how to remove a calendar is left as an exercise to the reader ... 196To find out how to add a new calendar and how to remove a calendar is left as an exercise to the reader ...
194 197
195 198
196********** VERSION 2.1.5 ************ 199********** VERSION 2.1.5 ************
197 200
198This is the new stable version. 201This is the new stable version.
199Bugfix: 202Bugfix:
200Fixed a problem with agenda popup on the desktop in KO/Pi. 203Fixed a problem with agenda popup on the desktop in KO/Pi.
201Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization. 204Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization.
202Added config option to not display completed todos in agenda view. 205Added config option to not display completed todos in agenda view.
203Addressee view is now using the formatted name, if defined. 206Addressee view is now using the formatted name, if defined.
204That makes it possible to display "lastname, firstname" in that view now. 207That makes it possible to display "lastname, firstname" in that view now.
205To set the formatted name for all contacts, please use menu: 208To set the formatted name for all contacts, please use menu:
206Edit->Change->Set formatted name. 209Edit->Change->Set formatted name.
207Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows. 210Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows.
208 211
209********** VERSION 2.1.4 ************ 212********** VERSION 2.1.4 ************
210 213
211Fixed two more bugs in the KA/Pi CSV import dialog: 214Fixed two more bugs in the KA/Pi CSV import dialog:
212Made it possible to read multi-line fields and import it to the "Note" field. 215Made it possible to read multi-line fields and import it to the "Note" field.
213Fixed a problem in mapping custom fields, whatever a custem field is... 216Fixed a problem in mapping custom fields, whatever a custem field is...
214 217
215********** VERSION 2.1.3 ************ 218********** VERSION 2.1.3 ************
216 219
217Changed the menu structure of the alarm applet: 220Changed the menu structure of the alarm applet:
218Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List". 221Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List".
219 222
220Fixed several problems in the KA/Pi CSV import dialog: 223Fixed several problems in the KA/Pi CSV import dialog:
221Added "Category", made codec configureable and made it possible to map many fields to the "Note" field. 224Added "Category", made codec configureable and made it possible to map many fields to the "Note" field.
222 225
223 226
224********** VERSION 2.1.2 ************ 227********** VERSION 2.1.2 ************
225 228
226Fixed a problem closing the alarm dialog on Zaurus with "OK" button. 229Fixed a problem closing the alarm dialog on Zaurus with "OK" button.
227 230
228Fixed a problem when importing data from Outlook with mutiple categories set. 231Fixed a problem when importing data from Outlook with mutiple categories set.
229 232
230Changed display of days in datenavigator: 233Changed display of days in datenavigator:
231Birthdays are now blue, not dark green. 234Birthdays are now blue, not dark green.
232When todo view is shown, no birtdays are shown and days with due todos are shown blue. 235When todo view is shown, no birtdays are shown and days with due todos are shown blue.
233When journal view is shown, only holidays are shown and days with journals are blue. 236When journal view is shown, only holidays are shown and days with journals are blue.
234 237
235Added Backup options to global config: 238Added Backup options to global config:
236You 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 ). 239You 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 ).
237It 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. 240It 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.
238The 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. 241The 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.
239 242
240********** VERSION 2.1.1 ************ 243********** VERSION 2.1.1 ************
241 244
242Stable release 2.1.1! 245Stable release 2.1.1!
243 246
244KO/Pi: 247KO/Pi:
245Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display. 248Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display.
246 249
247********** VERSION 2.1.0 ************ 250********** VERSION 2.1.0 ************
248 251
249Stable release 2.1.0! 252Stable release 2.1.0!
250 253
251Summary of changes/fixes compared to version 2.0.6: 254Summary of changes/fixes compared to version 2.0.6:
252 255
253Many bugs of version 2.0.6 fixed. 256Many bugs of version 2.0.6 fixed.
254Most of them were small bugs, but some of them were important. 257Most of them were small bugs, but some of them were important.
255It is recommended to use version 2.1.0 and not version 2.0.6. 258It is recommended to use version 2.1.0 and not version 2.0.6.
256 259
257Important changes: 260Important changes:
258 261
259Added recurring todos to KO/Pi. 262Added recurring todos to KO/Pi.
260 263
261Added global application font settings (for all KDE-Pim/Pi apps) to the general settings. 264Added global application font settings (for all KDE-Pim/Pi apps) to the general settings.
262 265
263Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. 266Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more.
264 267
265Datenavigator can now display many months. Very useful on the desktop. 268Datenavigator can now display many months. Very useful on the desktop.
266 269
267KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements. 270KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements.
268 271
269Made alarm sound working on Linux desktop. 272Made alarm sound working on Linux desktop.
270 273
271Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details. 274Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details.
272 275
273Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details. 276Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details.
274 277
275Many other usebility enhancements. 278Many other usebility enhancements.
276Special thanks to Ben for his suggestions! 279Special thanks to Ben for his suggestions!
277 280
278You can find the complete changelog 281You can find the complete changelog
279from version 1.7.7 to 2.1.0 282from version 1.7.7 to 2.1.0
280in the source package or on 283in the source package or on
281 284
282http://www.pi-sync.net/html/changelog.html 285http://www.pi-sync.net/html/changelog.html
283 286
284 287
285 288
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp
index 3e28714..4794bc9 100644
--- a/libkcal/icalformatimpl.cpp
+++ b/libkcal/icalformatimpl.cpp
@@ -642,768 +642,771 @@ icalproperty *ICalFormatImpl::writeRecurrenceRule(Recurrence *recur)
642 642
643 tmpDays = recur->yearNums(); 643 tmpDays = recur->yearNums();
644 for (tmpDay = tmpDays.first(); 644 for (tmpDay = tmpDays.first();
645 tmpDay; 645 tmpDay;
646 tmpDay = tmpDays.next()) { 646 tmpDay = tmpDays.next()) {
647 r.by_year_day[index++] = *tmpDay; 647 r.by_year_day[index++] = *tmpDay;
648 } 648 }
649// r.by_year_day[index] = ICAL_RECURRENCE_ARRAY_MAX; 649// r.by_year_day[index] = ICAL_RECURRENCE_ARRAY_MAX;
650 break; 650 break;
651 default: 651 default:
652 r.freq = ICAL_NO_RECURRENCE; 652 r.freq = ICAL_NO_RECURRENCE;
653 kdDebug(5800) << "ICalFormatImpl::writeRecurrence(): no recurrence" << endl; 653 kdDebug(5800) << "ICalFormatImpl::writeRecurrence(): no recurrence" << endl;
654 break; 654 break;
655 } 655 }
656 656
657 r.interval = recur->frequency(); 657 r.interval = recur->frequency();
658 658
659 if (recur->duration() > 0) { 659 if (recur->duration() > 0) {
660 r.count = recur->duration(); 660 r.count = recur->duration();
661 } else if (recur->duration() == -1) { 661 } else if (recur->duration() == -1) {
662 r.count = 0; 662 r.count = 0;
663 } else { 663 } else {
664 if (datetime) 664 if (datetime)
665 r.until = writeICalDateTime(recur->endDateTime()); 665 r.until = writeICalDateTime(recur->endDateTime());
666 else 666 else
667 r.until = writeICalDate(recur->endDate()); 667 r.until = writeICalDate(recur->endDate());
668 } 668 }
669 669
670// Debug output 670// Debug output
671#if 0 671#if 0
672 const char *str = icalrecurrencetype_as_string(&r); 672 const char *str = icalrecurrencetype_as_string(&r);
673 if (str) { 673 if (str) {
674 kdDebug(5800) << " String: " << str << endl; 674 kdDebug(5800) << " String: " << str << endl;
675 } else { 675 } else {
676 kdDebug(5800) << " No String" << endl; 676 kdDebug(5800) << " No String" << endl;
677 } 677 }
678#endif 678#endif
679 679
680 return icalproperty_new_rrule(r); 680 return icalproperty_new_rrule(r);
681} 681}
682 682
683icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm) 683icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm)
684{ 684{
685 icalcomponent *a = icalcomponent_new(ICAL_VALARM_COMPONENT); 685 icalcomponent *a = icalcomponent_new(ICAL_VALARM_COMPONENT);
686 686
687 icalproperty_action action; 687 icalproperty_action action;
688 icalattach *attach = 0; 688 icalattach *attach = 0;
689 689
690 switch (alarm->type()) { 690 switch (alarm->type()) {
691 case Alarm::Procedure: 691 case Alarm::Procedure:
692 action = ICAL_ACTION_PROCEDURE; 692 action = ICAL_ACTION_PROCEDURE;
693 attach = icalattach_new_from_url( QFile::encodeName(alarm->programFile()).data() ); 693 attach = icalattach_new_from_url( QFile::encodeName(alarm->programFile()).data() );
694 icalcomponent_add_property(a,icalproperty_new_attach(attach)); 694 icalcomponent_add_property(a,icalproperty_new_attach(attach));
695 if (!alarm->programArguments().isEmpty()) { 695 if (!alarm->programArguments().isEmpty()) {
696 icalcomponent_add_property(a,icalproperty_new_description(alarm->programArguments().utf8())); 696 icalcomponent_add_property(a,icalproperty_new_description(alarm->programArguments().utf8()));
697 } 697 }
698 icalattach_unref( attach ); 698 icalattach_unref( attach );
699 break; 699 break;
700 case Alarm::Audio: 700 case Alarm::Audio:
701 action = ICAL_ACTION_AUDIO; 701 action = ICAL_ACTION_AUDIO;
702 if (!alarm->audioFile().isEmpty()) { 702 if (!alarm->audioFile().isEmpty()) {
703 attach = icalattach_new_from_url(QFile::encodeName( alarm->audioFile() ).data()); 703 attach = icalattach_new_from_url(QFile::encodeName( alarm->audioFile() ).data());
704 icalcomponent_add_property(a,icalproperty_new_attach(attach)); 704 icalcomponent_add_property(a,icalproperty_new_attach(attach));
705 icalattach_unref( attach ); 705 icalattach_unref( attach );
706 } 706 }
707 break; 707 break;
708 case Alarm::Email: { 708 case Alarm::Email: {
709 action = ICAL_ACTION_EMAIL; 709 action = ICAL_ACTION_EMAIL;
710 QValueList<Person> addresses = alarm->mailAddresses(); 710 QValueList<Person> addresses = alarm->mailAddresses();
711 for (QValueList<Person>::Iterator ad = addresses.begin(); ad != addresses.end(); ++ad) { 711 for (QValueList<Person>::Iterator ad = addresses.begin(); ad != addresses.end(); ++ad) {
712 icalproperty *p = icalproperty_new_attendee("MAILTO:" + (*ad).email().utf8()); 712 icalproperty *p = icalproperty_new_attendee("MAILTO:" + (*ad).email().utf8());
713 if (!(*ad).name().isEmpty()) { 713 if (!(*ad).name().isEmpty()) {
714 icalproperty_add_parameter(p,icalparameter_new_cn((*ad).name().utf8())); 714 icalproperty_add_parameter(p,icalparameter_new_cn((*ad).name().utf8()));
715 } 715 }
716 icalcomponent_add_property(a,p); 716 icalcomponent_add_property(a,p);
717 } 717 }
718 icalcomponent_add_property(a,icalproperty_new_summary(alarm->mailSubject().utf8())); 718 icalcomponent_add_property(a,icalproperty_new_summary(alarm->mailSubject().utf8()));
719 icalcomponent_add_property(a,icalproperty_new_description(alarm->text().utf8())); 719 icalcomponent_add_property(a,icalproperty_new_description(alarm->text().utf8()));
720 QStringList attachments = alarm->mailAttachments(); 720 QStringList attachments = alarm->mailAttachments();
721 if (attachments.count() > 0) { 721 if (attachments.count() > 0) {
722 for (QStringList::Iterator at = attachments.begin(); at != attachments.end(); ++at) { 722 for (QStringList::Iterator at = attachments.begin(); at != attachments.end(); ++at) {
723 attach = icalattach_new_from_url(QFile::encodeName( *at ).data()); 723 attach = icalattach_new_from_url(QFile::encodeName( *at ).data());
724 icalcomponent_add_property(a,icalproperty_new_attach(attach)); 724 icalcomponent_add_property(a,icalproperty_new_attach(attach));
725 icalattach_unref( attach ); 725 icalattach_unref( attach );
726 } 726 }
727 } 727 }
728 break; 728 break;
729 } 729 }
730 case Alarm::Display: 730 case Alarm::Display:
731 action = ICAL_ACTION_DISPLAY; 731 action = ICAL_ACTION_DISPLAY;
732 icalcomponent_add_property(a,icalproperty_new_description(alarm->text().utf8())); 732 icalcomponent_add_property(a,icalproperty_new_description(alarm->text().utf8()));
733 break; 733 break;
734 case Alarm::Invalid: 734 case Alarm::Invalid:
735 default: 735 default:
736 kdDebug(5800) << "Unknown type of alarm" << endl; 736 kdDebug(5800) << "Unknown type of alarm" << endl;
737 action = ICAL_ACTION_NONE; 737 action = ICAL_ACTION_NONE;
738 break; 738 break;
739 } 739 }
740 icalcomponent_add_property(a,icalproperty_new_action(action)); 740 icalcomponent_add_property(a,icalproperty_new_action(action));
741 741
742 // Trigger time 742 // Trigger time
743 icaltriggertype trigger; 743 icaltriggertype trigger;
744 if ( alarm->hasTime() ) { 744 if ( alarm->hasTime() ) {
745 trigger.time = writeICalDateTime(alarm->time()); 745 trigger.time = writeICalDateTime(alarm->time());
746 trigger.duration = icaldurationtype_null_duration(); 746 trigger.duration = icaldurationtype_null_duration();
747 } else { 747 } else {
748 trigger.time = icaltime_null_time(); 748 trigger.time = icaltime_null_time();
749 Duration offset; 749 Duration offset;
750 if ( alarm->hasStartOffset() ) 750 if ( alarm->hasStartOffset() )
751 offset = alarm->startOffset(); 751 offset = alarm->startOffset();
752 else 752 else
753 offset = alarm->endOffset(); 753 offset = alarm->endOffset();
754 trigger.duration = icaldurationtype_from_int( offset.asSeconds() ); 754 trigger.duration = icaldurationtype_from_int( offset.asSeconds() );
755 } 755 }
756 icalproperty *p = icalproperty_new_trigger(trigger); 756 icalproperty *p = icalproperty_new_trigger(trigger);
757 if ( alarm->hasEndOffset() ) 757 if ( alarm->hasEndOffset() )
758 icalproperty_add_parameter(p,icalparameter_new_related(ICAL_RELATED_END)); 758 icalproperty_add_parameter(p,icalparameter_new_related(ICAL_RELATED_END));
759 icalcomponent_add_property(a,p); 759 icalcomponent_add_property(a,p);
760 760
761 // Repeat count and duration 761 // Repeat count and duration
762 if (alarm->repeatCount()) { 762 if (alarm->repeatCount()) {
763 icalcomponent_add_property(a,icalproperty_new_repeat(alarm->repeatCount())); 763 icalcomponent_add_property(a,icalproperty_new_repeat(alarm->repeatCount()));
764 icalcomponent_add_property(a,icalproperty_new_duration( 764 icalcomponent_add_property(a,icalproperty_new_duration(
765 icaldurationtype_from_int(alarm->snoozeTime()*60))); 765 icaldurationtype_from_int(alarm->snoozeTime()*60)));
766 } 766 }
767 767
768 // Custom properties 768 // Custom properties
769 QMap<QCString, QString> custom = alarm->customProperties(); 769 QMap<QCString, QString> custom = alarm->customProperties();
770 for (QMap<QCString, QString>::Iterator c = custom.begin(); c != custom.end(); ++c) { 770 for (QMap<QCString, QString>::Iterator c = custom.begin(); c != custom.end(); ++c) {
771 icalproperty *p = icalproperty_new_x(c.data().utf8()); 771 icalproperty *p = icalproperty_new_x(c.data().utf8());
772 icalproperty_set_x_name(p,c.key()); 772 icalproperty_set_x_name(p,c.key());
773 icalcomponent_add_property(a,p); 773 icalcomponent_add_property(a,p);
774 } 774 }
775 775
776 return a; 776 return a;
777} 777}
778 778
779Todo *ICalFormatImpl::readTodo(icalcomponent *vtodo) 779Todo *ICalFormatImpl::readTodo(icalcomponent *vtodo)
780{ 780{
781 Todo *todo = new Todo; 781 Todo *todo = new Todo;
782 782
783 readIncidence(vtodo,todo); 783 readIncidence(vtodo,todo);
784 784
785 icalproperty *p = icalcomponent_get_first_property(vtodo,ICAL_ANY_PROPERTY); 785 icalproperty *p = icalcomponent_get_first_property(vtodo,ICAL_ANY_PROPERTY);
786 786
787// int intvalue; 787// int intvalue;
788 icaltimetype icaltime; 788 icaltimetype icaltime;
789 789
790 QStringList categories; 790 QStringList categories;
791 791
792 while (p) { 792 while (p) {
793 icalproperty_kind kind = icalproperty_isa(p); 793 icalproperty_kind kind = icalproperty_isa(p);
794 switch (kind) { 794 switch (kind) {
795 795
796 case ICAL_DUE_PROPERTY: // due date 796 case ICAL_DUE_PROPERTY: // due date
797 icaltime = icalproperty_get_due(p); 797 icaltime = icalproperty_get_due(p);
798 if (icaltime.is_date) { 798 if (icaltime.is_date) {
799 todo->setDtDue(QDateTime(readICalDate(icaltime),QTime(0,0,0))); 799 todo->setDtDue(QDateTime(readICalDate(icaltime),QTime(0,0,0)));
800 todo->setFloats(true); 800 todo->setFloats(true);
801 801
802 } else { 802 } else {
803 todo->setDtDue(readICalDateTime(icaltime)); 803 todo->setDtDue(readICalDateTime(icaltime));
804 todo->setFloats(false); 804 todo->setFloats(false);
805 } 805 }
806 todo->setHasDueDate(true); 806 todo->setHasDueDate(true);
807 break; 807 break;
808 808
809 case ICAL_COMPLETED_PROPERTY: // completion date 809 case ICAL_COMPLETED_PROPERTY: // completion date
810 icaltime = icalproperty_get_completed(p); 810 icaltime = icalproperty_get_completed(p);
811 todo->setCompleted(readICalDateTime(icaltime)); 811 todo->setCompleted(readICalDateTime(icaltime));
812 break; 812 break;
813 813
814 case ICAL_PERCENTCOMPLETE_PROPERTY: // Percent completed 814 case ICAL_PERCENTCOMPLETE_PROPERTY: // Percent completed
815 todo->setPercentComplete(icalproperty_get_percentcomplete(p)); 815 todo->setPercentComplete(icalproperty_get_percentcomplete(p));
816 break; 816 break;
817 817
818 case ICAL_RELATEDTO_PROPERTY: // related todo (parent) 818 case ICAL_RELATEDTO_PROPERTY: // related todo (parent)
819 todo->setRelatedToUid(QString::fromUtf8(icalproperty_get_relatedto(p))); 819 todo->setRelatedToUid(QString::fromUtf8(icalproperty_get_relatedto(p)));
820 mTodosRelate.append(todo); 820 mTodosRelate.append(todo);
821 break; 821 break;
822 822
823 case ICAL_DTSTART_PROPERTY: 823 case ICAL_DTSTART_PROPERTY:
824 // Flag that todo has start date. Value is read in by readIncidence(). 824 // Flag that todo has start date. Value is read in by readIncidence().
825 todo->setHasStartDate(true); 825 todo->setHasStartDate(true);
826 break; 826 break;
827 827
828 default: 828 default:
829// kdDebug(5800) << "ICALFormat::readTodo(): Unknown property: " << kind 829// kdDebug(5800) << "ICALFormat::readTodo(): Unknown property: " << kind
830// << endl; 830// << endl;
831 break; 831 break;
832 } 832 }
833 833
834 p = icalcomponent_get_next_property(vtodo,ICAL_ANY_PROPERTY); 834 p = icalcomponent_get_next_property(vtodo,ICAL_ANY_PROPERTY);
835 } 835 }
836 836
837 return todo; 837 return todo;
838} 838}
839 839
840Event *ICalFormatImpl::readEvent(icalcomponent *vevent) 840Event *ICalFormatImpl::readEvent(icalcomponent *vevent)
841{ 841{
842 Event *event = new Event; 842 Event *event = new Event;
843 event->setFloats(false); 843 event->setFloats(false);
844 844
845 readIncidence(vevent,event); 845 readIncidence(vevent,event);
846 846
847 icalproperty *p = icalcomponent_get_first_property(vevent,ICAL_ANY_PROPERTY); 847 icalproperty *p = icalcomponent_get_first_property(vevent,ICAL_ANY_PROPERTY);
848 848
849// int intvalue; 849// int intvalue;
850 icaltimetype icaltime; 850 icaltimetype icaltime;
851 851
852 QStringList categories; 852 QStringList categories;
853 QString transparency; 853 QString transparency;
854 854
855 while (p) { 855 while (p) {
856 icalproperty_kind kind = icalproperty_isa(p); 856 icalproperty_kind kind = icalproperty_isa(p);
857 switch (kind) { 857 switch (kind) {
858 858
859 case ICAL_DTEND_PROPERTY: // start date and time 859 case ICAL_DTEND_PROPERTY: // start date and time
860 icaltime = icalproperty_get_dtend(p); 860 icaltime = icalproperty_get_dtend(p);
861 if (icaltime.is_date) { 861 if (icaltime.is_date) {
862 event->setFloats( true ); 862 event->setFloats( true );
863 // End date is non-inclusive 863 // End date is non-inclusive
864 QDate endDate = readICalDate( icaltime ).addDays( -1 ); 864 QDate endDate = readICalDate( icaltime ).addDays( -1 );
865 mCompat->fixFloatingEnd( endDate ); 865 mCompat->fixFloatingEnd( endDate );
866 if ( endDate < event->dtStart().date() ) { 866 if ( endDate < event->dtStart().date() ) {
867 endDate = event->dtStart().date(); 867 endDate = event->dtStart().date();
868 } 868 }
869 event->setDtEnd( QDateTime( endDate, QTime( 0, 0, 0 ) ) ); 869 event->setDtEnd( QDateTime( endDate, QTime( 0, 0, 0 ) ) );
870 } else { 870 } else {
871 event->setDtEnd(readICalDateTime(icaltime)); 871 event->setDtEnd(readICalDateTime(icaltime));
872 } 872 }
873 break; 873 break;
874 874
875// TODO: 875// TODO:
876 // at this point, there should be at least a start or end time. 876 // at this point, there should be at least a start or end time.
877 // fix up for events that take up no time but have a time associated 877 // fix up for events that take up no time but have a time associated
878#if 0 878#if 0
879 if (!(vo = isAPropertyOf(vevent, VCDTstartProp))) 879 if (!(vo = isAPropertyOf(vevent, VCDTstartProp)))
880 anEvent->setDtStart(anEvent->dtEnd()); 880 anEvent->setDtStart(anEvent->dtEnd());
881 if (!(vo = isAPropertyOf(vevent, VCDTendProp))) 881 if (!(vo = isAPropertyOf(vevent, VCDTendProp)))
882 anEvent->setDtEnd(anEvent->dtStart()); 882 anEvent->setDtEnd(anEvent->dtStart());
883#endif 883#endif
884 884
885// TODO: exdates 885// TODO: exdates
886#if 0 886#if 0
887 // recurrence exceptions 887 // recurrence exceptions
888 if ((vo = isAPropertyOf(vevent, VCExDateProp)) != 0) { 888 if ((vo = isAPropertyOf(vevent, VCExDateProp)) != 0) {
889 anEvent->setExDates(s = fakeCString(vObjectUStringZValue(vo))); 889 anEvent->setExDates(s = fakeCString(vObjectUStringZValue(vo)));
890 deleteStr(s); 890 deleteStr(s);
891 } 891 }
892#endif 892#endif
893 893
894#if 0 894#if 0
895 // secrecy 895 // secrecy
896 if ((vo = isAPropertyOf(vevent, VCClassProp)) != 0) { 896 if ((vo = isAPropertyOf(vevent, VCClassProp)) != 0) {
897 anEvent->setSecrecy(s = fakeCString(vObjectUStringZValue(vo))); 897 anEvent->setSecrecy(s = fakeCString(vObjectUStringZValue(vo)));
898 deleteStr(s); 898 deleteStr(s);
899 } 899 }
900 else 900 else
901 anEvent->setSecrecy("PUBLIC"); 901 anEvent->setSecrecy("PUBLIC");
902 902
903 // attachments 903 // attachments
904 tmpStrList.clear(); 904 tmpStrList.clear();
905 initPropIterator(&voi, vevent); 905 initPropIterator(&voi, vevent);
906 while (moreIteration(&voi)) { 906 while (moreIteration(&voi)) {
907 vo = nextVObject(&voi); 907 vo = nextVObject(&voi);
908 if (strcmp(vObjectName(vo), VCAttachProp) == 0) { 908 if (strcmp(vObjectName(vo), VCAttachProp) == 0) {
909 tmpStrList.append(s = fakeCString(vObjectUStringZValue(vo))); 909 tmpStrList.append(s = fakeCString(vObjectUStringZValue(vo)));
910 deleteStr(s); 910 deleteStr(s);
911 } 911 }
912 } 912 }
913 anEvent->setAttachments(tmpStrList); 913 anEvent->setAttachments(tmpStrList);
914 914
915 // resources 915 // resources
916 if ((vo = isAPropertyOf(vevent, VCResourcesProp)) != 0) { 916 if ((vo = isAPropertyOf(vevent, VCResourcesProp)) != 0) {
917 QString resources = (s = fakeCString(vObjectUStringZValue(vo))); 917 QString resources = (s = fakeCString(vObjectUStringZValue(vo)));
918 deleteStr(s); 918 deleteStr(s);
919 tmpStrList.clear(); 919 tmpStrList.clear();
920 index1 = 0; 920 index1 = 0;
921 index2 = 0; 921 index2 = 0;
922 QString resource; 922 QString resource;
923 while ((index2 = resources.find(';', index1)) != -1) { 923 while ((index2 = resources.find(';', index1)) != -1) {
924 resource = resources.mid(index1, (index2 - index1)); 924 resource = resources.mid(index1, (index2 - index1));
925 tmpStrList.append(resource); 925 tmpStrList.append(resource);
926 index1 = index2; 926 index1 = index2;
927 } 927 }
928 anEvent->setResources(tmpStrList); 928 anEvent->setResources(tmpStrList);
929 } 929 }
930#endif 930#endif
931 931
932 case ICAL_RELATEDTO_PROPERTY: // releated event (parent) 932 case ICAL_RELATEDTO_PROPERTY: // releated event (parent)
933 event->setRelatedToUid(QString::fromUtf8(icalproperty_get_relatedto(p))); 933 event->setRelatedToUid(QString::fromUtf8(icalproperty_get_relatedto(p)));
934 mEventsRelate.append(event); 934 mEventsRelate.append(event);
935 break; 935 break;
936 936
937 case ICAL_TRANSP_PROPERTY: // Transparency 937 case ICAL_TRANSP_PROPERTY: // Transparency
938 if(icalproperty_get_transp(p) == ICAL_TRANSP_TRANSPARENT ) 938 if(icalproperty_get_transp(p) == ICAL_TRANSP_TRANSPARENT )
939 event->setTransparency( Event::Transparent ); 939 event->setTransparency( Event::Transparent );
940 else 940 else
941 event->setTransparency( Event::Opaque ); 941 event->setTransparency( Event::Opaque );
942 break; 942 break;
943 943
944 default: 944 default:
945// kdDebug(5800) << "ICALFormat::readEvent(): Unknown property: " << kind 945// kdDebug(5800) << "ICALFormat::readEvent(): Unknown property: " << kind
946// << endl; 946// << endl;
947 break; 947 break;
948 } 948 }
949 949
950 p = icalcomponent_get_next_property(vevent,ICAL_ANY_PROPERTY); 950 p = icalcomponent_get_next_property(vevent,ICAL_ANY_PROPERTY);
951 } 951 }
952 952
953 QString msade = event->nonKDECustomProperty("X-MICROSOFT-CDO-ALLDAYEVENT"); 953 QString msade = event->nonKDECustomProperty("X-MICROSOFT-CDO-ALLDAYEVENT");
954 if (!msade.isNull()) { 954 if (!msade.isNull()) {
955 bool floats = (msade == QString::fromLatin1("TRUE")); 955 bool floats = (msade == QString::fromLatin1("TRUE"));
956 kdDebug(5800) << "ICALFormat::readEvent(): all day event: " << floats << endl; 956 kdDebug(5800) << "ICALFormat::readEvent(): all day event: " << floats << endl;
957 event->setFloats(floats); 957 event->setFloats(floats);
958 if (floats) { 958 if (floats) {
959 QDateTime endDate = event->dtEnd(); 959 QDateTime endDate = event->dtEnd();
960 event->setDtEnd(endDate.addDays(-1)); 960 event->setDtEnd(endDate.addDays(-1));
961 } 961 }
962 } 962 }
963 963
964 // some stupid vCal exporters ignore the standard and use Description 964 // some stupid vCal exporters ignore the standard and use Description
965 // instead of Summary for the default field. Correct for this. 965 // instead of Summary for the default field. Correct for this.
966 if (event->summary().isEmpty() && 966 if (event->summary().isEmpty() &&
967 !(event->description().isEmpty())) { 967 !(event->description().isEmpty())) {
968 QString tmpStr = event->description().simplifyWhiteSpace(); 968 QString tmpStr = event->description().simplifyWhiteSpace();
969 event->setDescription(""); 969 event->setDescription("");
970 event->setSummary(tmpStr); 970 event->setSummary(tmpStr);
971 } 971 }
972 972
973 return event; 973 return event;
974} 974}
975 975
976FreeBusy *ICalFormatImpl::readFreeBusy(icalcomponent *vfreebusy) 976FreeBusy *ICalFormatImpl::readFreeBusy(icalcomponent *vfreebusy)
977{ 977{
978 FreeBusy *freebusy = new FreeBusy; 978 FreeBusy *freebusy = new FreeBusy;
979 979
980 readIncidenceBase(vfreebusy,freebusy); 980 readIncidenceBase(vfreebusy,freebusy);
981 981
982 icalproperty *p = icalcomponent_get_first_property(vfreebusy,ICAL_ANY_PROPERTY); 982 icalproperty *p = icalcomponent_get_first_property(vfreebusy,ICAL_ANY_PROPERTY);
983 983
984 icaltimetype icaltime; 984 icaltimetype icaltime;
985 icalperiodtype icalperiod; 985 icalperiodtype icalperiod;
986 QDateTime period_start, period_end; 986 QDateTime period_start, period_end;
987 987
988 while (p) { 988 while (p) {
989 icalproperty_kind kind = icalproperty_isa(p); 989 icalproperty_kind kind = icalproperty_isa(p);
990 switch (kind) { 990 switch (kind) {
991 991
992 case ICAL_DTSTART_PROPERTY: // start date and time 992 case ICAL_DTSTART_PROPERTY: // start date and time
993 icaltime = icalproperty_get_dtstart(p); 993 icaltime = icalproperty_get_dtstart(p);
994 freebusy->setDtStart(readICalDateTime(icaltime)); 994 freebusy->setDtStart(readICalDateTime(icaltime));
995 break; 995 break;
996 996
997 case ICAL_DTEND_PROPERTY: // start End Date and Time 997 case ICAL_DTEND_PROPERTY: // start End Date and Time
998 icaltime = icalproperty_get_dtend(p); 998 icaltime = icalproperty_get_dtend(p);
999 freebusy->setDtEnd(readICalDateTime(icaltime)); 999 freebusy->setDtEnd(readICalDateTime(icaltime));
1000 break; 1000 break;
1001 1001
1002 case ICAL_FREEBUSY_PROPERTY: //Any FreeBusy Times 1002 case ICAL_FREEBUSY_PROPERTY: //Any FreeBusy Times
1003 icalperiod = icalproperty_get_freebusy(p); 1003 icalperiod = icalproperty_get_freebusy(p);
1004 period_start = readICalDateTime(icalperiod.start); 1004 period_start = readICalDateTime(icalperiod.start);
1005 period_end = readICalDateTime(icalperiod.end); 1005 period_end = readICalDateTime(icalperiod.end);
1006 freebusy->addPeriod(period_start, period_end); 1006 freebusy->addPeriod(period_start, period_end);
1007 break; 1007 break;
1008 1008
1009 default: 1009 default:
1010 kdDebug(5800) << "ICALFormat::readIncidence(): Unknown property: " << kind 1010 kdDebug(5800) << "ICALFormat::readIncidence(): Unknown property: " << kind
1011 << endl; 1011 << endl;
1012 break; 1012 break;
1013 } 1013 }
1014 p = icalcomponent_get_next_property(vfreebusy,ICAL_ANY_PROPERTY); 1014 p = icalcomponent_get_next_property(vfreebusy,ICAL_ANY_PROPERTY);
1015 } 1015 }
1016 1016
1017 return freebusy; 1017 return freebusy;
1018} 1018}
1019 1019
1020Journal *ICalFormatImpl::readJournal(icalcomponent *vjournal) 1020Journal *ICalFormatImpl::readJournal(icalcomponent *vjournal)
1021{ 1021{
1022 Journal *journal = new Journal; 1022 Journal *journal = new Journal;
1023 1023
1024 readIncidence(vjournal,journal); 1024 readIncidence(vjournal,journal);
1025 1025
1026 if ( !journal->dtStart().isValid() && journal->created().isValid() ) {
1027 journal->setDtStart( journal->created() );
1028 }
1026 return journal; 1029 return journal;
1027} 1030}
1028 1031
1029Attendee *ICalFormatImpl::readAttendee(icalproperty *attendee) 1032Attendee *ICalFormatImpl::readAttendee(icalproperty *attendee)
1030{ 1033{
1031 icalparameter *p = 0; 1034 icalparameter *p = 0;
1032 1035
1033 QString email = QString::fromUtf8(icalproperty_get_attendee(attendee)); 1036 QString email = QString::fromUtf8(icalproperty_get_attendee(attendee));
1034 1037
1035 QString name; 1038 QString name;
1036 QString uid = QString::null; 1039 QString uid = QString::null;
1037 p = icalproperty_get_first_parameter(attendee,ICAL_CN_PARAMETER); 1040 p = icalproperty_get_first_parameter(attendee,ICAL_CN_PARAMETER);
1038 if (p) { 1041 if (p) {
1039 name = QString::fromUtf8(icalparameter_get_cn(p)); 1042 name = QString::fromUtf8(icalparameter_get_cn(p));
1040 } else { 1043 } else {
1041 } 1044 }
1042 1045
1043 bool rsvp=false; 1046 bool rsvp=false;
1044 p = icalproperty_get_first_parameter(attendee,ICAL_RSVP_PARAMETER); 1047 p = icalproperty_get_first_parameter(attendee,ICAL_RSVP_PARAMETER);
1045 if (p) { 1048 if (p) {
1046 icalparameter_rsvp rsvpParameter = icalparameter_get_rsvp(p); 1049 icalparameter_rsvp rsvpParameter = icalparameter_get_rsvp(p);
1047 if (rsvpParameter == ICAL_RSVP_TRUE) rsvp = true; 1050 if (rsvpParameter == ICAL_RSVP_TRUE) rsvp = true;
1048 } 1051 }
1049 1052
1050 Attendee::PartStat status = Attendee::NeedsAction; 1053 Attendee::PartStat status = Attendee::NeedsAction;
1051 p = icalproperty_get_first_parameter(attendee,ICAL_PARTSTAT_PARAMETER); 1054 p = icalproperty_get_first_parameter(attendee,ICAL_PARTSTAT_PARAMETER);
1052 if (p) { 1055 if (p) {
1053 icalparameter_partstat partStatParameter = icalparameter_get_partstat(p); 1056 icalparameter_partstat partStatParameter = icalparameter_get_partstat(p);
1054 switch(partStatParameter) { 1057 switch(partStatParameter) {
1055 default: 1058 default:
1056 case ICAL_PARTSTAT_NEEDSACTION: 1059 case ICAL_PARTSTAT_NEEDSACTION:
1057 status = Attendee::NeedsAction; 1060 status = Attendee::NeedsAction;
1058 break; 1061 break;
1059 case ICAL_PARTSTAT_ACCEPTED: 1062 case ICAL_PARTSTAT_ACCEPTED:
1060 status = Attendee::Accepted; 1063 status = Attendee::Accepted;
1061 break; 1064 break;
1062 case ICAL_PARTSTAT_DECLINED: 1065 case ICAL_PARTSTAT_DECLINED:
1063 status = Attendee::Declined; 1066 status = Attendee::Declined;
1064 break; 1067 break;
1065 case ICAL_PARTSTAT_TENTATIVE: 1068 case ICAL_PARTSTAT_TENTATIVE:
1066 status = Attendee::Tentative; 1069 status = Attendee::Tentative;
1067 break; 1070 break;
1068 case ICAL_PARTSTAT_DELEGATED: 1071 case ICAL_PARTSTAT_DELEGATED:
1069 status = Attendee::Delegated; 1072 status = Attendee::Delegated;
1070 break; 1073 break;
1071 case ICAL_PARTSTAT_COMPLETED: 1074 case ICAL_PARTSTAT_COMPLETED:
1072 status = Attendee::Completed; 1075 status = Attendee::Completed;
1073 break; 1076 break;
1074 case ICAL_PARTSTAT_INPROCESS: 1077 case ICAL_PARTSTAT_INPROCESS:
1075 status = Attendee::InProcess; 1078 status = Attendee::InProcess;
1076 break; 1079 break;
1077 } 1080 }
1078 } 1081 }
1079 1082
1080 Attendee::Role role = Attendee::ReqParticipant; 1083 Attendee::Role role = Attendee::ReqParticipant;
1081 p = icalproperty_get_first_parameter(attendee,ICAL_ROLE_PARAMETER); 1084 p = icalproperty_get_first_parameter(attendee,ICAL_ROLE_PARAMETER);
1082 if (p) { 1085 if (p) {
1083 icalparameter_role roleParameter = icalparameter_get_role(p); 1086 icalparameter_role roleParameter = icalparameter_get_role(p);
1084 switch(roleParameter) { 1087 switch(roleParameter) {
1085 case ICAL_ROLE_CHAIR: 1088 case ICAL_ROLE_CHAIR:
1086 role = Attendee::Chair; 1089 role = Attendee::Chair;
1087 break; 1090 break;
1088 default: 1091 default:
1089 case ICAL_ROLE_REQPARTICIPANT: 1092 case ICAL_ROLE_REQPARTICIPANT:
1090 role = Attendee::ReqParticipant; 1093 role = Attendee::ReqParticipant;
1091 break; 1094 break;
1092 case ICAL_ROLE_OPTPARTICIPANT: 1095 case ICAL_ROLE_OPTPARTICIPANT:
1093 role = Attendee::OptParticipant; 1096 role = Attendee::OptParticipant;
1094 break; 1097 break;
1095 case ICAL_ROLE_NONPARTICIPANT: 1098 case ICAL_ROLE_NONPARTICIPANT:
1096 role = Attendee::NonParticipant; 1099 role = Attendee::NonParticipant;
1097 break; 1100 break;
1098 } 1101 }
1099 } 1102 }
1100 1103
1101 p = icalproperty_get_first_parameter(attendee,ICAL_X_PARAMETER); 1104 p = icalproperty_get_first_parameter(attendee,ICAL_X_PARAMETER);
1102 uid = icalparameter_get_xvalue(p); 1105 uid = icalparameter_get_xvalue(p);
1103 // This should be added, but there seems to be a libical bug here. 1106 // This should be added, but there seems to be a libical bug here.
1104 /*while (p) { 1107 /*while (p) {
1105 // if (icalparameter_get_xname(p) == "X-UID") { 1108 // if (icalparameter_get_xname(p) == "X-UID") {
1106 uid = icalparameter_get_xvalue(p); 1109 uid = icalparameter_get_xvalue(p);
1107 p = icalproperty_get_next_parameter(attendee,ICAL_X_PARAMETER); 1110 p = icalproperty_get_next_parameter(attendee,ICAL_X_PARAMETER);
1108 } */ 1111 } */
1109 1112
1110 return new Attendee( name, email, rsvp, status, role, uid ); 1113 return new Attendee( name, email, rsvp, status, role, uid );
1111} 1114}
1112 1115
1113Attachment *ICalFormatImpl::readAttachment(icalproperty *attach) 1116Attachment *ICalFormatImpl::readAttachment(icalproperty *attach)
1114{ 1117{
1115 icalattach *a = icalproperty_get_attach(attach); 1118 icalattach *a = icalproperty_get_attach(attach);
1116 icalparameter_value v = ICAL_VALUE_NONE; 1119 icalparameter_value v = ICAL_VALUE_NONE;
1117 icalparameter_encoding e = ICAL_ENCODING_NONE; 1120 icalparameter_encoding e = ICAL_ENCODING_NONE;
1118 1121
1119 Attachment *attachment = 0; 1122 Attachment *attachment = 0;
1120 /* 1123 /*
1121 icalparameter *vp = icalproperty_get_first_parameter(attach, ICAL_VALUE_PARAMETER); 1124 icalparameter *vp = icalproperty_get_first_parameter(attach, ICAL_VALUE_PARAMETER);
1122 if (vp) 1125 if (vp)
1123 v = icalparameter_get_value(vp); 1126 v = icalparameter_get_value(vp);
1124 1127
1125 icalparameter *ep = icalproperty_get_first_parameter(attach, ICAL_ENCODING_PARAMETER); 1128 icalparameter *ep = icalproperty_get_first_parameter(attach, ICAL_ENCODING_PARAMETER);
1126 if (ep) 1129 if (ep)
1127 e = icalparameter_get_encoding(ep); 1130 e = icalparameter_get_encoding(ep);
1128 */ 1131 */
1129 int isurl = icalattach_get_is_url (a); 1132 int isurl = icalattach_get_is_url (a);
1130 if (isurl == 0) 1133 if (isurl == 0)
1131 attachment = new Attachment((const char*)icalattach_get_data(a)); 1134 attachment = new Attachment((const char*)icalattach_get_data(a));
1132 else { 1135 else {
1133 attachment = new Attachment(QString(icalattach_get_url(a))); 1136 attachment = new Attachment(QString(icalattach_get_url(a)));
1134 } 1137 }
1135 1138
1136 icalparameter *p = icalproperty_get_first_parameter(attach, ICAL_FMTTYPE_PARAMETER); 1139 icalparameter *p = icalproperty_get_first_parameter(attach, ICAL_FMTTYPE_PARAMETER);
1137 if (p) 1140 if (p)
1138 attachment->setMimeType(QString(icalparameter_get_fmttype(p))); 1141 attachment->setMimeType(QString(icalparameter_get_fmttype(p)));
1139 1142
1140 return attachment; 1143 return attachment;
1141} 1144}
1142#include <qtextcodec.h> 1145#include <qtextcodec.h>
1143void ICalFormatImpl::readIncidence(icalcomponent *parent,Incidence *incidence) 1146void ICalFormatImpl::readIncidence(icalcomponent *parent,Incidence *incidence)
1144{ 1147{
1145 readIncidenceBase(parent,incidence); 1148 readIncidenceBase(parent,incidence);
1146 1149
1147 icalproperty *p = icalcomponent_get_first_property(parent,ICAL_ANY_PROPERTY); 1150 icalproperty *p = icalcomponent_get_first_property(parent,ICAL_ANY_PROPERTY);
1148 bool readrec = false; 1151 bool readrec = false;
1149 const char *text; 1152 const char *text;
1150 int intvalue; 1153 int intvalue;
1151 icaltimetype icaltime; 1154 icaltimetype icaltime;
1152 icaldurationtype icalduration; 1155 icaldurationtype icalduration;
1153 struct icalrecurrencetype rectype; 1156 struct icalrecurrencetype rectype;
1154 QStringList categories; 1157 QStringList categories;
1155 1158
1156 while (p) { 1159 while (p) {
1157 icalproperty_kind kind = icalproperty_isa(p); 1160 icalproperty_kind kind = icalproperty_isa(p);
1158 switch (kind) { 1161 switch (kind) {
1159 1162
1160 case ICAL_CREATED_PROPERTY: 1163 case ICAL_CREATED_PROPERTY:
1161 icaltime = icalproperty_get_created(p); 1164 icaltime = icalproperty_get_created(p);
1162 incidence->setCreated(readICalDateTime(icaltime)); 1165 incidence->setCreated(readICalDateTime(icaltime));
1163 break; 1166 break;
1164 1167
1165 case ICAL_SEQUENCE_PROPERTY: // sequence 1168 case ICAL_SEQUENCE_PROPERTY: // sequence
1166 intvalue = icalproperty_get_sequence(p); 1169 intvalue = icalproperty_get_sequence(p);
1167 incidence->setRevision(intvalue); 1170 incidence->setRevision(intvalue);
1168 break; 1171 break;
1169 1172
1170 case ICAL_LASTMODIFIED_PROPERTY: // last modification date 1173 case ICAL_LASTMODIFIED_PROPERTY: // last modification date
1171 icaltime = icalproperty_get_lastmodified(p); 1174 icaltime = icalproperty_get_lastmodified(p);
1172 incidence->setLastModified(readICalDateTime(icaltime)); 1175 incidence->setLastModified(readICalDateTime(icaltime));
1173 break; 1176 break;
1174 1177
1175 case ICAL_DTSTART_PROPERTY: // start date and time 1178 case ICAL_DTSTART_PROPERTY: // start date and time
1176 icaltime = icalproperty_get_dtstart(p); 1179 icaltime = icalproperty_get_dtstart(p);
1177 if (icaltime.is_date) { 1180 if (icaltime.is_date) {
1178 incidence->setDtStart(QDateTime(readICalDate(icaltime),QTime(0,0,0))); 1181 incidence->setDtStart(QDateTime(readICalDate(icaltime),QTime(0,0,0)));
1179 incidence->setFloats(true); 1182 incidence->setFloats(true);
1180 } else { 1183 } else {
1181 incidence->setDtStart(readICalDateTime(icaltime)); 1184 incidence->setDtStart(readICalDateTime(icaltime));
1182 } 1185 }
1183 break; 1186 break;
1184 1187
1185 case ICAL_DURATION_PROPERTY: // start date and time 1188 case ICAL_DURATION_PROPERTY: // start date and time
1186 icalduration = icalproperty_get_duration(p); 1189 icalduration = icalproperty_get_duration(p);
1187 incidence->setDuration(readICalDuration(icalduration)); 1190 incidence->setDuration(readICalDuration(icalduration));
1188 break; 1191 break;
1189 1192
1190 case ICAL_DESCRIPTION_PROPERTY: // description 1193 case ICAL_DESCRIPTION_PROPERTY: // description
1191 text = icalproperty_get_description(p); 1194 text = icalproperty_get_description(p);
1192 incidence->setDescription(QString::fromUtf8(text)); 1195 incidence->setDescription(QString::fromUtf8(text));
1193 break; 1196 break;
1194 1197
1195 case ICAL_SUMMARY_PROPERTY: // summary 1198 case ICAL_SUMMARY_PROPERTY: // summary
1196 { 1199 {
1197 text = icalproperty_get_summary(p); 1200 text = icalproperty_get_summary(p);
1198 incidence->setSummary(QString::fromUtf8(text)); 1201 incidence->setSummary(QString::fromUtf8(text));
1199 } 1202 }
1200 break; 1203 break;
1201 case ICAL_STATUS_PROPERTY: // summary 1204 case ICAL_STATUS_PROPERTY: // summary
1202 { 1205 {
1203 if ( ICAL_STATUS_CANCELLED == icalproperty_get_status(p) ) 1206 if ( ICAL_STATUS_CANCELLED == icalproperty_get_status(p) )
1204 incidence->setCancelled( true ); 1207 incidence->setCancelled( true );
1205 } 1208 }
1206 break; 1209 break;
1207 1210
1208 case ICAL_LOCATION_PROPERTY: // location 1211 case ICAL_LOCATION_PROPERTY: // location
1209 text = icalproperty_get_location(p); 1212 text = icalproperty_get_location(p);
1210 incidence->setLocation(QString::fromUtf8(text)); 1213 incidence->setLocation(QString::fromUtf8(text));
1211 break; 1214 break;
1212 1215
1213 case ICAL_RECURRENCEID_PROPERTY: 1216 case ICAL_RECURRENCEID_PROPERTY:
1214 icaltime = icalproperty_get_recurrenceid(p); 1217 icaltime = icalproperty_get_recurrenceid(p);
1215 incidence->setRecurrenceID( readICalDateTime(icaltime) ); 1218 incidence->setRecurrenceID( readICalDateTime(icaltime) );
1216 //qDebug(" RecurrenceID %s",incidence->recurrenceID().toString().latin1() ); 1219 //qDebug(" RecurrenceID %s",incidence->recurrenceID().toString().latin1() );
1217 break; 1220 break;
1218#if 0 1221#if 0
1219 // status 1222 // status
1220 if ((vo = isAPropertyOf(vincidence, VCStatusProp)) != 0) { 1223 if ((vo = isAPropertyOf(vincidence, VCStatusProp)) != 0) {
1221 incidence->setStatus(s = fakeCString(vObjectUStringZValue(vo))); 1224 incidence->setStatus(s = fakeCString(vObjectUStringZValue(vo)));
1222 deleteStr(s); 1225 deleteStr(s);
1223 } 1226 }
1224 else 1227 else
1225 incidence->setStatus("NEEDS ACTION"); 1228 incidence->setStatus("NEEDS ACTION");
1226#endif 1229#endif
1227 1230
1228 case ICAL_PRIORITY_PROPERTY: // priority 1231 case ICAL_PRIORITY_PROPERTY: // priority
1229 intvalue = icalproperty_get_priority(p); 1232 intvalue = icalproperty_get_priority(p);
1230 incidence->setPriority(intvalue); 1233 incidence->setPriority(intvalue);
1231 break; 1234 break;
1232 1235
1233 case ICAL_CATEGORIES_PROPERTY: // categories 1236 case ICAL_CATEGORIES_PROPERTY: // categories
1234 text = icalproperty_get_categories(p); 1237 text = icalproperty_get_categories(p);
1235 categories.append(QString::fromUtf8(text)); 1238 categories.append(QString::fromUtf8(text));
1236 break; 1239 break;
1237 //******************************************* 1240 //*******************************************
1238 case ICAL_RRULE_PROPERTY: 1241 case ICAL_RRULE_PROPERTY:
1239 // we do need (maybe )start datetime of incidence for recurrence 1242 // we do need (maybe )start datetime of incidence for recurrence
1240 // such that we can read recurrence only after we read incidence completely 1243 // such that we can read recurrence only after we read incidence completely
1241 readrec = true; 1244 readrec = true;
1242 rectype = icalproperty_get_rrule(p); 1245 rectype = icalproperty_get_rrule(p);
1243 break; 1246 break;
1244 1247
1245 case ICAL_EXDATE_PROPERTY: 1248 case ICAL_EXDATE_PROPERTY:
1246 icaltime = icalproperty_get_exdate(p); 1249 icaltime = icalproperty_get_exdate(p);
1247 incidence->addExDate(readICalDate(icaltime)); 1250 incidence->addExDate(readICalDate(icaltime));
1248 break; 1251 break;
1249 1252
1250 case ICAL_CLASS_PROPERTY: { 1253 case ICAL_CLASS_PROPERTY: {
1251 int inttext = icalproperty_get_class(p); 1254 int inttext = icalproperty_get_class(p);
1252 if (inttext == ICAL_CLASS_PUBLIC ) { 1255 if (inttext == ICAL_CLASS_PUBLIC ) {
1253 incidence->setSecrecy(Incidence::SecrecyPublic); 1256 incidence->setSecrecy(Incidence::SecrecyPublic);
1254 } else if (inttext == ICAL_CLASS_CONFIDENTIAL ) { 1257 } else if (inttext == ICAL_CLASS_CONFIDENTIAL ) {
1255 incidence->setSecrecy(Incidence::SecrecyConfidential); 1258 incidence->setSecrecy(Incidence::SecrecyConfidential);
1256 } else { 1259 } else {
1257 incidence->setSecrecy(Incidence::SecrecyPrivate); 1260 incidence->setSecrecy(Incidence::SecrecyPrivate);
1258 } 1261 }
1259 } 1262 }
1260 break; 1263 break;
1261 1264
1262 case ICAL_ATTACH_PROPERTY: // attachments 1265 case ICAL_ATTACH_PROPERTY: // attachments
1263 incidence->addAttachment(readAttachment(p)); 1266 incidence->addAttachment(readAttachment(p));
1264 break; 1267 break;
1265 1268
1266 default: 1269 default:
1267// kdDebug(5800) << "ICALFormat::readIncidence(): Unknown property: " << kind 1270// kdDebug(5800) << "ICALFormat::readIncidence(): Unknown property: " << kind
1268// << endl; 1271// << endl;
1269 break; 1272 break;
1270 } 1273 }
1271 1274
1272 p = icalcomponent_get_next_property(parent,ICAL_ANY_PROPERTY); 1275 p = icalcomponent_get_next_property(parent,ICAL_ANY_PROPERTY);
1273 } 1276 }
1274 if ( readrec ) { 1277 if ( readrec ) {
1275 readRecurrenceRule(rectype,incidence); 1278 readRecurrenceRule(rectype,incidence);
1276 } 1279 }
1277 // kpilot stuff 1280 // kpilot stuff
1278// TODO: move this application-specific code to kpilot 1281// TODO: move this application-specific code to kpilot
1279 QString kp = incidence->nonKDECustomProperty("X-PILOTID"); 1282 QString kp = incidence->nonKDECustomProperty("X-PILOTID");
1280 if (!kp.isNull()) { 1283 if (!kp.isNull()) {
1281 incidence->setPilotId(kp.toInt()); 1284 incidence->setPilotId(kp.toInt());
1282 } 1285 }
1283 kp = incidence->nonKDECustomProperty("X-PILOTSTAT"); 1286 kp = incidence->nonKDECustomProperty("X-PILOTSTAT");
1284 if (!kp.isNull()) { 1287 if (!kp.isNull()) {
1285 incidence->setSyncStatus(kp.toInt()); 1288 incidence->setSyncStatus(kp.toInt());
1286 } 1289 }
1287 1290
1288 1291
1289 kp = incidence->nonKDECustomProperty("X-KOPIEXTID"); 1292 kp = incidence->nonKDECustomProperty("X-KOPIEXTID");
1290 if (!kp.isNull()) { 1293 if (!kp.isNull()) {
1291 incidence->setIDStr(kp); 1294 incidence->setIDStr(kp);
1292 } 1295 }
1293 1296
1294 // Cancel backwards compatibility mode for subsequent changes by the application 1297 // Cancel backwards compatibility mode for subsequent changes by the application
1295 incidence->recurrence()->setCompatVersion(); 1298 incidence->recurrence()->setCompatVersion();
1296 1299
1297 // add categories 1300 // add categories
1298 incidence->setCategories(categories); 1301 incidence->setCategories(categories);
1299 1302
1300 // iterate through all alarms 1303 // iterate through all alarms
1301 for (icalcomponent *alarm = icalcomponent_get_first_component(parent,ICAL_VALARM_COMPONENT); 1304 for (icalcomponent *alarm = icalcomponent_get_first_component(parent,ICAL_VALARM_COMPONENT);
1302 alarm; 1305 alarm;
1303 alarm = icalcomponent_get_next_component(parent,ICAL_VALARM_COMPONENT)) { 1306 alarm = icalcomponent_get_next_component(parent,ICAL_VALARM_COMPONENT)) {
1304 readAlarm(alarm,incidence); 1307 readAlarm(alarm,incidence);
1305 } 1308 }
1306} 1309}
1307 1310
1308void ICalFormatImpl::readIncidenceBase(icalcomponent *parent,IncidenceBase *incidenceBase) 1311void ICalFormatImpl::readIncidenceBase(icalcomponent *parent,IncidenceBase *incidenceBase)
1309{ 1312{
1310 icalproperty *p = icalcomponent_get_first_property(parent,ICAL_ANY_PROPERTY); 1313 icalproperty *p = icalcomponent_get_first_property(parent,ICAL_ANY_PROPERTY);
1311 1314
1312 while (p) { 1315 while (p) {
1313 icalproperty_kind kind = icalproperty_isa(p); 1316 icalproperty_kind kind = icalproperty_isa(p);
1314 switch (kind) { 1317 switch (kind) {
1315 1318
1316 case ICAL_UID_PROPERTY: // unique id 1319 case ICAL_UID_PROPERTY: // unique id
1317 incidenceBase->setUid(QString::fromUtf8(icalproperty_get_uid(p))); 1320 incidenceBase->setUid(QString::fromUtf8(icalproperty_get_uid(p)));
1318 break; 1321 break;
1319 1322
1320 case ICAL_ORGANIZER_PROPERTY: // organizer 1323 case ICAL_ORGANIZER_PROPERTY: // organizer
1321 incidenceBase->setOrganizer(QString::fromUtf8(icalproperty_get_organizer(p))); 1324 incidenceBase->setOrganizer(QString::fromUtf8(icalproperty_get_organizer(p)));
1322 break; 1325 break;
1323 1326
1324 case ICAL_ATTENDEE_PROPERTY: // attendee 1327 case ICAL_ATTENDEE_PROPERTY: // attendee
1325 incidenceBase->addAttendee(readAttendee(p)); 1328 incidenceBase->addAttendee(readAttendee(p));
1326 break; 1329 break;
1327 1330
1328 default: 1331 default:
1329 break; 1332 break;
1330 } 1333 }
1331 1334
1332 p = icalcomponent_get_next_property(parent,ICAL_ANY_PROPERTY); 1335 p = icalcomponent_get_next_property(parent,ICAL_ANY_PROPERTY);
1333 } 1336 }
1334 1337
1335 // custom properties 1338 // custom properties
1336 readCustomProperties(parent, incidenceBase); 1339 readCustomProperties(parent, incidenceBase);
1337} 1340}
1338 1341
1339void ICalFormatImpl::readCustomProperties(icalcomponent *parent,CustomProperties *properties) 1342void ICalFormatImpl::readCustomProperties(icalcomponent *parent,CustomProperties *properties)
1340{ 1343{
1341 QMap<QCString, QString> customProperties; 1344 QMap<QCString, QString> customProperties;
1342 1345
1343 icalproperty *p = icalcomponent_get_first_property(parent,ICAL_X_PROPERTY); 1346 icalproperty *p = icalcomponent_get_first_property(parent,ICAL_X_PROPERTY);
1344 1347
1345 while (p) { 1348 while (p) {
1346 QString value = QString::fromUtf8(icalproperty_get_x(p)); 1349 QString value = QString::fromUtf8(icalproperty_get_x(p));
1347 customProperties[icalproperty_get_x_name(p)] = value; 1350 customProperties[icalproperty_get_x_name(p)] = value;
1348 //qDebug("ICalFormatImpl::readCustomProperties %s %s",value.latin1(), icalproperty_get_x_name(p) ); 1351 //qDebug("ICalFormatImpl::readCustomProperties %s %s",value.latin1(), icalproperty_get_x_name(p) );
1349 1352
1350 p = icalcomponent_get_next_property(parent,ICAL_X_PROPERTY); 1353 p = icalcomponent_get_next_property(parent,ICAL_X_PROPERTY);
1351 } 1354 }
1352 1355
1353 properties->setCustomProperties(customProperties); 1356 properties->setCustomProperties(customProperties);
1354} 1357}
1355 1358
1356void ICalFormatImpl::readRecurrenceRule(struct icalrecurrencetype rrule,Incidence *incidence) 1359void ICalFormatImpl::readRecurrenceRule(struct icalrecurrencetype rrule,Incidence *incidence)
1357{ 1360{
1358// kdDebug(5800) << "Read recurrence for " << incidence->summary() << endl; 1361// kdDebug(5800) << "Read recurrence for " << incidence->summary() << endl;
1359 1362
1360 Recurrence *recur = incidence->recurrence(); 1363 Recurrence *recur = incidence->recurrence();
1361 recur->setCompatVersion(mCalendarVersion); 1364 recur->setCompatVersion(mCalendarVersion);
1362 recur->unsetRecurs(); 1365 recur->unsetRecurs();
1363 1366
1364 struct icalrecurrencetype r = rrule; 1367 struct icalrecurrencetype r = rrule;
1365 1368
1366 dumpIcalRecurrence(r); 1369 dumpIcalRecurrence(r);
1367 readRecurrence( r, recur, incidence); 1370 readRecurrence( r, recur, incidence);
1368} 1371}
1369 1372
1370void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype &r, Recurrence* recur, Incidence *incidence) 1373void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype &r, Recurrence* recur, Incidence *incidence)
1371{ 1374{
1372 int wkst; 1375 int wkst;
1373 int index = 0; 1376 int index = 0;
1374 short day = 0; 1377 short day = 0;
1375 QBitArray qba(7); 1378 QBitArray qba(7);
1376 int frequ = r.freq; 1379 int frequ = r.freq;
1377 int interv = r.interval; 1380 int interv = r.interval;
1378 // preprocessing for odd recurrence definitions 1381 // preprocessing for odd recurrence definitions
1379 1382
1380 if ( r.freq == ICAL_MONTHLY_RECURRENCE ) { 1383 if ( r.freq == ICAL_MONTHLY_RECURRENCE ) {
1381 if ( r.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX) { 1384 if ( r.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX) {
1382 interv = 12; 1385 interv = 12;
1383 } 1386 }
1384 } 1387 }
1385 if ( r.freq == ICAL_YEARLY_RECURRENCE ) { 1388 if ( r.freq == ICAL_YEARLY_RECURRENCE ) {
1386 if ( r.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX && r.by_day[0] != ICAL_RECURRENCE_ARRAY_MAX ) { 1389 if ( r.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX && r.by_day[0] != ICAL_RECURRENCE_ARRAY_MAX ) {
1387 frequ = ICAL_MONTHLY_RECURRENCE; 1390 frequ = ICAL_MONTHLY_RECURRENCE;
1388 interv = 12* r.interval; 1391 interv = 12* r.interval;
1389 } 1392 }
1390 } 1393 }
1391 1394
1392 switch (frequ) { 1395 switch (frequ) {
1393 case ICAL_MINUTELY_RECURRENCE: 1396 case ICAL_MINUTELY_RECURRENCE:
1394 if (!icaltime_is_null_time(r.until)) { 1397 if (!icaltime_is_null_time(r.until)) {
1395 recur->setMinutely(interv,readICalDateTime(r.until)); 1398 recur->setMinutely(interv,readICalDateTime(r.until));
1396 } else { 1399 } else {
1397 if (r.count == 0) 1400 if (r.count == 0)
1398 recur->setMinutely(interv,-1); 1401 recur->setMinutely(interv,-1);
1399 else 1402 else
1400 recur->setMinutely(interv,r.count); 1403 recur->setMinutely(interv,r.count);
1401 } 1404 }
1402 break; 1405 break;
1403 case ICAL_HOURLY_RECURRENCE: 1406 case ICAL_HOURLY_RECURRENCE:
1404 if (!icaltime_is_null_time(r.until)) { 1407 if (!icaltime_is_null_time(r.until)) {
1405 recur->setHourly(interv,readICalDateTime(r.until)); 1408 recur->setHourly(interv,readICalDateTime(r.until));
1406 } else { 1409 } else {
1407 if (r.count == 0) 1410 if (r.count == 0)
1408 recur->setHourly(interv,-1); 1411 recur->setHourly(interv,-1);
1409 else 1412 else