author | zautrix <zautrix> | 2004-10-22 16:36:13 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-22 16:36:13 (UTC) |
commit | 60be6d741f579b0f368ea9d0d4327abcadb44d07 (patch) (unidiff) | |
tree | 924fd9d2a541b66fc18f91e9264b5a3d66c4c969 | |
parent | 7afbe9769c1c6b3f7657c1cedcdc19a9447508ce (diff) | |
download | kdepimpi-60be6d741f579b0f368ea9d0d4327abcadb44d07.zip kdepimpi-60be6d741f579b0f368ea9d0d4327abcadb44d07.tar.gz kdepimpi-60be6d741f579b0f368ea9d0d4327abcadb44d07.tar.bz2 |
updated whats new
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 42 | ||||
-rw-r--r-- | kabc/vcard/VCardEntity.cpp | 2 |
2 files changed, 43 insertions, 1 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 2f88091..b9933ca 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,194 +1,236 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 1.9.9 ************ | ||
4 | |||
5 | KDE-Pim/Pi has a new Member! | ||
6 | It is called PWM/Pi (Passwordmanager/platform-independent) | ||
7 | and it is available for the Zaurus. | ||
8 | It is planned, that it will be available later for Windows. | ||
9 | (And for Linux, of course). | ||
10 | It is a port of the Passwordmanager of KDE. | ||
11 | It will need the MicroKDElibs to run. | ||
12 | |||
13 | Made loading of addressbooks in KA/Pi up to 7 times faster! | ||
14 | The bigger your addressbook file, the more starting speed | ||
15 | will you gain. (relatively) | ||
16 | |||
17 | The Qtopia addressbook connector is now platform independend | ||
18 | as well and should work on any platform for importing/exporting | ||
19 | Qtopia and Opie XML files. | ||
20 | |||
21 | Added a +30min feature to the timezone settings to make | ||
22 | KDE-Pim/Pi useable in Australia and other parts on the | ||
23 | world with strange timezones ;-) | ||
24 | |||
25 | German "Umlaute" should now be sorted correctly on the Z in KA/Pi. | ||
26 | |||
27 | It is now possible to disable the | ||
28 | "receive data via infrared" feature, such that syncing with | ||
29 | Outlook is now possible again with Kx/Pi runing. | ||
30 | Please disable it, before syncing Sharp DTM with Outlook. | ||
31 | For your convenience, the "receive data via infrared" feature | ||
32 | is disabled automatically, if you sync Kx/Pi with DTM. | ||
33 | You have to enable it again manually after syncing. | ||
34 | Enabling this feature makes it impossible to start the | ||
35 | Sharp DTM apps. If this feature is enabled, you will only get the | ||
36 | alarm notification from KO/Pi and not from the Sharp calendar. | ||
37 | This is very useful if you sync KO/Pi with Sharp DTM, | ||
38 | because after syncing you usually would get notified about | ||
39 | an alarm by KO/Pi and the Sharp Calendar. | ||
40 | |||
41 | |||
42 | Fixed the vcard export bug, wich had the version 1.9.8. | ||
43 | |||
44 | |||
3 | ********** VERSION 1.9.8 ************ | 45 | ********** VERSION 1.9.8 ************ |
4 | 46 | ||
5 | Fixed character decoding in OM/Pi. | 47 | Fixed character decoding in OM/Pi. |
6 | (e.g. German "Umlaute" were not displayed properly.) | 48 | (e.g. German "Umlaute" were not displayed properly.) |
7 | 49 | ||
8 | Made is possible to reparent todos in KO/Pi. | 50 | Made is possible to reparent todos in KO/Pi. |
9 | Use contextmenu or keys (look at Help-Keys + Colors) for that. | 51 | Use contextmenu or keys (look at Help-Keys + Colors) for that. |
10 | 52 | ||
11 | Added the missing Sync-Howto and WhatsNew to the packages. | 53 | Added the missing Sync-Howto and WhatsNew to the packages. |
12 | 54 | ||
13 | KO/Pi on Linux desktop can now sync with KDE desktop. | 55 | KO/Pi on Linux desktop can now sync with KDE desktop. |
14 | That means: When using KO/Pi on Linux desktop for syncing with | 56 | That means: When using KO/Pi on Linux desktop for syncing with |
15 | KDE desktop and the Zaurus, the Zaurus can be synced now | 57 | KDE desktop and the Zaurus, the Zaurus can be synced now |
16 | with all KDE-Calendar resources, not only with one local file. | 58 | with all KDE-Calendar resources, not only with one local file. |
17 | (That makes it possible to sync the Zaurus with the | 59 | (That makes it possible to sync the Zaurus with the |
18 | calendar data on a Kolab server) | 60 | calendar data on a Kolab server) |
19 | 61 | ||
20 | KA/Pi syncing with KDE desktop will be available in the next version. | 62 | KA/Pi syncing with KDE desktop will be available in the next version. |
21 | 63 | ||
22 | 64 | ||
23 | ********** VERSION 1.9.7 ************ | 65 | ********** VERSION 1.9.7 ************ |
24 | 66 | ||
25 | KO/Pi - KA/Pi on Windows: | 67 | KO/Pi - KA/Pi on Windows: |
26 | Now a directory can be defined by the user, where the | 68 | Now a directory can be defined by the user, where the |
27 | application/config data should be saved. | 69 | application/config data should be saved. |
28 | Define your desired path in the evironment variable | 70 | Define your desired path in the evironment variable |
29 | MICROKDEHOME | 71 | MICROKDEHOME |
30 | before starting KO/Pi or KA/Pi. | 72 | before starting KO/Pi or KA/Pi. |
31 | 73 | ||
32 | An easy Kx/Pi to Kx/Pi syncing is now possible | 74 | An easy Kx/Pi to Kx/Pi syncing is now possible |
33 | (it is called Pi-Sync) via network. | 75 | (it is called Pi-Sync) via network. |
34 | Please look at the Sync Howto. | 76 | Please look at the Sync Howto. |
35 | 77 | ||
36 | Exporting of calendar data and contacts to mobile phones is now possible. | 78 | Exporting of calendar data and contacts to mobile phones is now possible. |
37 | The SyncHowto is updated with information howto | 79 | The SyncHowto is updated with information howto |
38 | access/sync mobile phones. | 80 | access/sync mobile phones. |
39 | Please look at the Sync Howto. | 81 | Please look at the Sync Howto. |
40 | 82 | ||
41 | Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. | 83 | Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. |
42 | Please disable Fastload for the original contact/calendar applications | 84 | Please disable Fastload for the original contact/calendar applications |
43 | and close them. | 85 | and close them. |
44 | KO/Pi and KA/Pi must be running in order to receive the data. | 86 | KO/Pi and KA/Pi must be running in order to receive the data. |
45 | (KO/Pi and KA/Pi are always running if Fastload for them is enabled!) | 87 | (KO/Pi and KA/Pi are always running if Fastload for them is enabled!) |
46 | 88 | ||
47 | In the KA/Pi details view are now the preferred tel. numbers displayed on top | 89 | In the KA/Pi details view are now the preferred tel. numbers displayed on top |
48 | of the other data ( emails/tel.numbers/addresses) | 90 | of the other data ( emails/tel.numbers/addresses) |
49 | 91 | ||
50 | Fixed some syncing problems in KA/Pi. | 92 | Fixed some syncing problems in KA/Pi. |
51 | 93 | ||
52 | Added font settings for the KA/Pi details view. | 94 | Added font settings for the KA/Pi details view. |
53 | Added fields "children's name" and "gender" to KA/Pi. | 95 | Added fields "children's name" and "gender" to KA/Pi. |
54 | 96 | ||
55 | Made searching in KA/Pi better: | 97 | Made searching in KA/Pi better: |
56 | Now the first item in a view is selected after a search automatically and | 98 | Now the first item in a view is selected after a search automatically and |
57 | the views can be scrolled up/down when the search input field has the keyboard focus. | 99 | the views can be scrolled up/down when the search input field has the keyboard focus. |
58 | 100 | ||
59 | And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. | 101 | And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. |
60 | 102 | ||
61 | 103 | ||
62 | ********** VERSION 1.9.6 ************ | 104 | ********** VERSION 1.9.6 ************ |
63 | 105 | ||
64 | Changes in the external application communication on the Zaurus | 106 | Changes in the external application communication on the Zaurus |
65 | in order to use less RAM when the apps are running. | 107 | in order to use less RAM when the apps are running. |
66 | First syncing of addressbooks (KA/Pi) is possible. | 108 | First syncing of addressbooks (KA/Pi) is possible. |
67 | 109 | ||
68 | 110 | ||
69 | ********** VERSION 1.9.5a ************ | 111 | ********** VERSION 1.9.5a ************ |
70 | 112 | ||
71 | Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. | 113 | Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. |
72 | Fixed some small bugs. | 114 | Fixed some small bugs. |
73 | KA/Pi shows now the birthday in summary view. | 115 | KA/Pi shows now the birthday in summary view. |
74 | Now OM/Pi and KA/Pi are using the date format defined in KO/Pi | 116 | Now OM/Pi and KA/Pi are using the date format defined in KO/Pi |
75 | for displaying dates. | 117 | for displaying dates. |
76 | 118 | ||
77 | 119 | ||
78 | ********** VERSION 1.9.5 ************ | 120 | ********** VERSION 1.9.5 ************ |
79 | 121 | ||
80 | There is still no Addressbook syncing! | 122 | There is still no Addressbook syncing! |
81 | 123 | ||
82 | New in 1.9.5: | 124 | New in 1.9.5: |
83 | 125 | ||
84 | Many bugfixes. | 126 | Many bugfixes. |
85 | Better searching in KA/Pi. | 127 | Better searching in KA/Pi. |
86 | You can configure in KA/Pi if you want to search only after | 128 | You can configure in KA/Pi if you want to search only after |
87 | <return> key pressed. | 129 | <return> key pressed. |
88 | 130 | ||
89 | Better mail downloading in OM/Pi. | 131 | Better mail downloading in OM/Pi. |
90 | 132 | ||
91 | First experimental alpha version of sync of KO/Pi with mobile phones. | 133 | First experimental alpha version of sync of KO/Pi with mobile phones. |
92 | See gammu documentation for supported phones. | 134 | See gammu documentation for supported phones. |
93 | You need to install the package kammu_1.9.5_arm.ipk for sync of KO/Pi with mobile phones. kammu_1.9.5_arm.ipk needs libbluetooth and libsdp. | 135 | You need to install the package kammu_1.9.5_arm.ipk for sync of KO/Pi with mobile phones. kammu_1.9.5_arm.ipk needs libbluetooth and libsdp. |
94 | Quick hint how to use: | 136 | Quick hint how to use: |
95 | NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! | 137 | NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! |
96 | Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. | 138 | Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. |
97 | Create syncprofile - mobile device | 139 | Create syncprofile - mobile device |
98 | Remove entry for model. (Leave empty ). | 140 | Remove entry for model. (Leave empty ). |
99 | Enable infrared on Zaurus and your Phone. | 141 | Enable infrared on Zaurus and your Phone. |
100 | Sync. | 142 | Sync. |
101 | To get a more detailed log, start kopi from konsole. | 143 | To get a more detailed log, start kopi from konsole. |
102 | 144 | ||
103 | ********** VERSION 1.9.4 ************ | 145 | ********** VERSION 1.9.4 ************ |
104 | 146 | ||
105 | This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. | 147 | This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. |
106 | 148 | ||
107 | WARNING: | 149 | WARNING: |
108 | PLEASE BACKUP ALL YOUR DATA! | 150 | PLEASE BACKUP ALL YOUR DATA! |
109 | We have changed a lot and maybe there are some unknown problems. | 151 | We have changed a lot and maybe there are some unknown problems. |
110 | 152 | ||
111 | SYNC HANDLING HAS CHANGED! | 153 | SYNC HANDLING HAS CHANGED! |
112 | Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. | 154 | Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. |
113 | (This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). | 155 | (This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). |
114 | 156 | ||
115 | You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. | 157 | You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. |
116 | If you get the error: "Install only possible in main memory", just try it again to install it on SD card. That worked for me. And it was reported that rebooting Qtopia did help in this case as well. | 158 | If you get the error: "Install only possible in main memory", just try it again to install it on SD card. That worked for me. And it was reported that rebooting Qtopia did help in this case as well. |
117 | 159 | ||
118 | As programs are available: | 160 | As programs are available: |
119 | KO/Pi (korganizer ipk) - a calendar program. | 161 | KO/Pi (korganizer ipk) - a calendar program. |
120 | KA/Pi (kaddressbook ipk ) - an addressbook | 162 | KA/Pi (kaddressbook ipk ) - an addressbook |
121 | OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. | 163 | OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. |
122 | 164 | ||
123 | An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. | 165 | An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. |
124 | (If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) | 166 | (If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) |
125 | 167 | ||
126 | All the applications are installed in a "Pim" TAB. | 168 | All the applications are installed in a "Pim" TAB. |
127 | If this TAB is new on your system, you can get an icon in this TAB by installing pim_TAB_icon_1.9.4_arm.ipk | 169 | If this TAB is new on your system, you can get an icon in this TAB by installing pim_TAB_icon_1.9.4_arm.ipk |
128 | 170 | ||
129 | All the application are integrated. | 171 | All the application are integrated. |
130 | Such that you can choose in KO/Pi the attendees of a meeting from the addresses in KA/Pi. When you click in KA/Pi on the email address, OM/Pi is started to write the mail. | 172 | Such that you can choose in KO/Pi the attendees of a meeting from the addresses in KA/Pi. When you click in KA/Pi on the email address, OM/Pi is started to write the mail. |
131 | 173 | ||
132 | HINT: | 174 | HINT: |
133 | If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. | 175 | If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. |
134 | 176 | ||
135 | What's new? | 177 | What's new? |
136 | 178 | ||
137 | SYNC HANDLING HAS CHANGED! | 179 | SYNC HANDLING HAS CHANGED! |
138 | Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. | 180 | Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. |
139 | (This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). | 181 | (This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). |
140 | 182 | ||
141 | New in OM/Pi: | 183 | New in OM/Pi: |
142 | When copying(i.e. downloading mails) , you can specify, that only mails of a given size should be downloaded. Added mail copy possibility for selected mails. | 184 | When copying(i.e. downloading mails) , you can specify, that only mails of a given size should be downloaded. Added mail copy possibility for selected mails. |
143 | 185 | ||
144 | New in KO/Pi: | 186 | New in KO/Pi: |
145 | French is now available for KO/Pi. | 187 | French is now available for KO/Pi. |
146 | Choose menu:Actions - Configure:TAB locale | 188 | Choose menu:Actions - Configure:TAB locale |
147 | Syncing has changed. | 189 | Syncing has changed. |
148 | Phone sync available soon. | 190 | Phone sync available soon. |
149 | Not much changes, I cannot remember them ... | 191 | Not much changes, I cannot remember them ... |
150 | 192 | ||
151 | New in KA/Pi: | 193 | New in KA/Pi: |
152 | Beaming possible. | 194 | Beaming possible. |
153 | Sharp DTM readonly access possible( create a new DTM resource ); | 195 | Sharp DTM readonly access possible( create a new DTM resource ); |
154 | Better searching possible. | 196 | Better searching possible. |
155 | Search is performed only after pressing the return key. | 197 | Search is performed only after pressing the return key. |
156 | Use wildcard * to specify parts of a name. | 198 | Use wildcard * to specify parts of a name. |
157 | 199 | ||
158 | Better name/email selection dialog (called from KO/Pi or OM/Pi). In this dialog, now searching is possible. Like in KA/Pi, use return key and wildcard * . | 200 | Better name/email selection dialog (called from KO/Pi or OM/Pi). In this dialog, now searching is possible. Like in KA/Pi, use return key and wildcard * . |
159 | 201 | ||
160 | A big improvement is the new management of the contact access. | 202 | A big improvement is the new management of the contact access. |
161 | In version 1.9.3, every application was using their own addressbook access data. | 203 | In version 1.9.3, every application was using their own addressbook access data. |
162 | That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. | 204 | That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. |
163 | That was wasting of memory, if you had several hundreds of contacts. | 205 | That was wasting of memory, if you had several hundreds of contacts. |
164 | 206 | ||
165 | Now only KA/Pi accesses the addressbook. | 207 | Now only KA/Pi accesses the addressbook. |
166 | If KO/Pi or OM/Pi want to get some name/email data, they request KA/Pi to open the name/email selection dialog and send it back to them. | 208 | If KO/Pi or OM/Pi want to get some name/email data, they request KA/Pi to open the name/email selection dialog and send it back to them. |
167 | If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. | 209 | If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. |
168 | That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. | 210 | That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. |
169 | 211 | ||
170 | New in the KO/Pi alarm applet: | 212 | New in the KO/Pi alarm applet: |
171 | Configure your own timer popup menu! | 213 | Configure your own timer popup menu! |
172 | (Text and minutes for timer countdown) | 214 | (Text and minutes for timer countdown) |
173 | Just edit the file | 215 | Just edit the file |
174 | (yourhomedir)/.kopialarmtimerrc | 216 | (yourhomedir)/.kopialarmtimerrc |
175 | and start/stop a timer to get a new menu with the data of this file. | 217 | and start/stop a timer to get a new menu with the data of this file. |
176 | 218 | ||
177 | ********** VERSION 1.9.3 ************ | 219 | ********** VERSION 1.9.3 ************ |
178 | 1) | 220 | 1) |
179 | Now KO/Pi on Windows imports directly the calendar data of | 221 | Now KO/Pi on Windows imports directly the calendar data of |
180 | an installed Outlook. Should work with OL version >= 2000. | 222 | an installed Outlook. Should work with OL version >= 2000. |
181 | 223 | ||
182 | ********** VERSION 1.9.2 ************ | 224 | ********** VERSION 1.9.2 ************ |
183 | 1) | 225 | 1) |
184 | KDE-Pim/Pi has got a new member: | 226 | KDE-Pim/Pi has got a new member: |
185 | KmicroMail (KM/Pi) is a mail program, | 227 | KmicroMail (KM/Pi) is a mail program, |
186 | which can handle IMAP and POP mail access. | 228 | which can handle IMAP and POP mail access. |
187 | It is based on Opie-Mail v3. | 229 | It is based on Opie-Mail v3. |
188 | All dependencies to the Opie libraries ar removed, | 230 | All dependencies to the Opie libraries ar removed, |
189 | such that no additional Opie lib is needed. | 231 | such that no additional Opie lib is needed. |
190 | It is already integrated in KO/Pi and KA/Pi. | 232 | It is already integrated in KO/Pi and KA/Pi. |
191 | It it now available for the Zaurus,probably it | 233 | It it now available for the Zaurus,probably it |
192 | will be available for other platforms later. | 234 | will be available for other platforms later. |
193 | Hint: | 235 | Hint: |
194 | Create your own contact (name + email) | 236 | Create your own contact (name + email) |
diff --git a/kabc/vcard/VCardEntity.cpp b/kabc/vcard/VCardEntity.cpp index 81debf4..a2ff327 100644 --- a/kabc/vcard/VCardEntity.cpp +++ b/kabc/vcard/VCardEntity.cpp | |||
@@ -1,175 +1,175 @@ | |||
1 | /* | 1 | /* |
2 | libvcard - vCard parsing library for vCard version 3.0 | 2 | libvcard - vCard parsing library for vCard version 3.0 |
3 | 3 | ||
4 | Copyright (C) 1998 Rik Hemsley rik@kde.org | 4 | Copyright (C) 1998 Rik Hemsley rik@kde.org |
5 | 5 | ||
6 | Permission is hereby granted, free of charge, to any person obtaining a copy | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy |
7 | of this software and associated documentation files (the "Software"), to | 7 | of this software and associated documentation files (the "Software"), to |
8 | deal in the Software without restriction, including without limitation the | 8 | deal in the Software without restriction, including without limitation the |
9 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | 9 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
10 | sell copies of the Software, and to permit persons to whom the Software is | 10 | sell copies of the Software, and to permit persons to whom the Software is |
11 | furnished to do so, subject to the following conditions: | 11 | furnished to do so, subject to the following conditions: |
12 | 12 | ||
13 | The above copyright notice and this permission notice shall be included in | 13 | The above copyright notice and this permission notice shall be included in |
14 | all copies or substantial portions of the Software. | 14 | all copies or substantial portions of the Software. |
15 | 15 | ||
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
19 | AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | 19 | AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
20 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | 20 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qregexp.h> | 24 | #include <qregexp.h> |
25 | #include <qdatetime.h>; | 25 | #include <qdatetime.h> |
26 | 26 | ||
27 | #include <VCardDefines.h> | 27 | #include <VCardDefines.h> |
28 | #include <VCardVCardEntity.h> | 28 | #include <VCardVCardEntity.h> |
29 | 29 | ||
30 | using namespace VCARD; | 30 | using namespace VCARD; |
31 | 31 | ||
32 | VCardEntity::VCardEntity() | 32 | VCardEntity::VCardEntity() |
33 | :Entity() | 33 | :Entity() |
34 | { | 34 | { |
35 | cardList_.setAutoDelete( TRUE ); | 35 | cardList_.setAutoDelete( TRUE ); |
36 | } | 36 | } |
37 | 37 | ||
38 | VCardEntity::VCardEntity(const VCardEntity & x) | 38 | VCardEntity::VCardEntity(const VCardEntity & x) |
39 | :Entity(x) | 39 | :Entity(x) |
40 | { | 40 | { |
41 | cardList_.setAutoDelete( TRUE ); | 41 | cardList_.setAutoDelete( TRUE ); |
42 | } | 42 | } |
43 | 43 | ||
44 | VCardEntity::VCardEntity(const QCString & s) | 44 | VCardEntity::VCardEntity(const QCString & s) |
45 | :Entity(s) | 45 | :Entity(s) |
46 | { | 46 | { |
47 | cardList_.setAutoDelete( TRUE ); | 47 | cardList_.setAutoDelete( TRUE ); |
48 | } | 48 | } |
49 | 49 | ||
50 | VCardEntity & | 50 | VCardEntity & |
51 | VCardEntity::operator = (VCardEntity & x) | 51 | VCardEntity::operator = (VCardEntity & x) |
52 | { | 52 | { |
53 | if (*this == x) return *this; | 53 | if (*this == x) return *this; |
54 | 54 | ||
55 | Entity::operator = (x); | 55 | Entity::operator = (x); |
56 | return *this; | 56 | return *this; |
57 | } | 57 | } |
58 | 58 | ||
59 | VCardEntity & | 59 | VCardEntity & |
60 | VCardEntity::operator = (const QCString & s) | 60 | VCardEntity::operator = (const QCString & s) |
61 | { | 61 | { |
62 | Entity::operator = (s); | 62 | Entity::operator = (s); |
63 | return *this; | 63 | return *this; |
64 | } | 64 | } |
65 | 65 | ||
66 | bool | 66 | bool |
67 | VCardEntity::operator == (VCardEntity & x) | 67 | VCardEntity::operator == (VCardEntity & x) |
68 | { | 68 | { |
69 | x.parse(); | 69 | x.parse(); |
70 | return false; | 70 | return false; |
71 | } | 71 | } |
72 | 72 | ||
73 | VCardEntity::~VCardEntity() | 73 | VCardEntity::~VCardEntity() |
74 | { | 74 | { |
75 | } | 75 | } |
76 | 76 | ||
77 | void | 77 | void |
78 | VCardEntity::_parse() | 78 | VCardEntity::_parse() |
79 | { | 79 | { |
80 | #if 0 | 80 | #if 0 |
81 | QTime tim; | 81 | QTime tim; |
82 | tim.start(); | 82 | tim.start(); |
83 | int num = 0; | 83 | int num = 0; |
84 | // old code | 84 | // old code |
85 | vDebug("parse"); | 85 | vDebug("parse"); |
86 | QCString s(strRep_); | 86 | QCString s(strRep_); |
87 | 87 | ||
88 | int i = s.find(QRegExp("BEGIN:VCARD", false)); | 88 | int i = s.find(QRegExp("BEGIN:VCARD", false)); |
89 | 89 | ||
90 | while (i != -1) { | 90 | while (i != -1) { |
91 | 91 | ||
92 | i = s.find(QRegExp("BEGIN:VCARD", false), 11); | 92 | i = s.find(QRegExp("BEGIN:VCARD", false), 11); |
93 | 93 | ||
94 | QCString cardStr(s.left(i)); | 94 | QCString cardStr(s.left(i)); |
95 | 95 | ||
96 | VCard * v = new VCard(cardStr); | 96 | VCard * v = new VCard(cardStr); |
97 | 97 | ||
98 | cardList_.append(v); | 98 | cardList_.append(v); |
99 | 99 | ||
100 | v->parse(); | 100 | v->parse(); |
101 | 101 | ||
102 | s.remove(0, i); | 102 | s.remove(0, i); |
103 | } | 103 | } |
104 | 104 | ||
105 | #else | 105 | #else |
106 | // this code is up to 17 (!) times faster | 106 | // this code is up to 17 (!) times faster |
107 | int start = 0; | 107 | int start = 0; |
108 | QTime tim; | 108 | QTime tim; |
109 | tim.start(); | 109 | tim.start(); |
110 | int i = 11; | 110 | int i = 11; |
111 | int len = strRep_.length(); | 111 | int len = strRep_.length(); |
112 | int num = 0; | 112 | int num = 0; |
113 | while (i < len ) { | 113 | while (i < len ) { |
114 | while( i < len ) { | 114 | while( i < len ) { |
115 | int add = 1; | 115 | int add = 1; |
116 | if ( strRep_.at(i) == 'B' ) { | 116 | if ( strRep_.at(i) == 'B' ) { |
117 | if ( i+add < len && strRep_.at(i+add++) == 'E') | 117 | if ( i+add < len && strRep_.at(i+add++) == 'E') |
118 | if ( i+add < len && strRep_.at(i+add++) == 'G') | 118 | if ( i+add < len && strRep_.at(i+add++) == 'G') |
119 | if ( i+add < len && strRep_.at(i+add++) == 'I') | 119 | if ( i+add < len && strRep_.at(i+add++) == 'I') |
120 | if ( i+add < len && strRep_.at(i+add++) == 'N') | 120 | if ( i+add < len && strRep_.at(i+add++) == 'N') |
121 | if ( i+add < len && strRep_.at(i+add++) == ':') | 121 | if ( i+add < len && strRep_.at(i+add++) == ':') |
122 | if ( i+add < len && strRep_.at(i+add++) == 'V') | 122 | if ( i+add < len && strRep_.at(i+add++) == 'V') |
123 | if ( i+add < len && strRep_.at(i+add++) == 'C') | 123 | if ( i+add < len && strRep_.at(i+add++) == 'C') |
124 | if ( i+add < len && strRep_.at(i+add++) == 'A') | 124 | if ( i+add < len && strRep_.at(i+add++) == 'A') |
125 | if ( i+add < len && strRep_.at(i+add++) == 'R') | 125 | if ( i+add < len && strRep_.at(i+add++) == 'R') |
126 | if ( i+add < len && strRep_.at(i+add++) == 'D') | 126 | if ( i+add < len && strRep_.at(i+add++) == 'D') |
127 | if ( i+add < len && (strRep_.at(i+add) == '\r' || strRep_.at(i+add) == '\n' )) | 127 | if ( i+add < len && (strRep_.at(i+add) == '\r' || strRep_.at(i+add) == '\n' )) |
128 | break; | 128 | break; |
129 | } | 129 | } |
130 | ++i; | 130 | ++i; |
131 | } | 131 | } |
132 | if ( i <= len ) { | 132 | if ( i <= len ) { |
133 | ++num; | 133 | ++num; |
134 | char* dat = strRep_.data()+start; | 134 | char* dat = strRep_.data()+start; |
135 | VCard * v = new VCard( QCString ( dat,i-start ) ); | 135 | VCard * v = new VCard( QCString ( dat,i-start ) ); |
136 | start = i; | 136 | start = i; |
137 | cardList_.append(v); | 137 | cardList_.append(v); |
138 | v->parse(); | 138 | v->parse(); |
139 | } | 139 | } |
140 | i+= 11; | 140 | i+= 11; |
141 | } | 141 | } |
142 | #endif | 142 | #endif |
143 | //qDebug("***time %d found %d", tim.elapsed(), num); | 143 | //qDebug("***time %d found %d", tim.elapsed(), num); |
144 | } | 144 | } |
145 | 145 | ||
146 | void | 146 | void |
147 | VCardEntity::_assemble() | 147 | VCardEntity::_assemble() |
148 | { | 148 | { |
149 | VCardListIterator it(cardList_); | 149 | VCardListIterator it(cardList_); |
150 | 150 | ||
151 | for (; it.current(); ++it) | 151 | for (; it.current(); ++it) |
152 | strRep_ += it.current()->asString() + "\r\n"; // One CRLF for luck. | 152 | strRep_ += it.current()->asString() + "\r\n"; // One CRLF for luck. |
153 | } | 153 | } |
154 | 154 | ||
155 | VCardList & | 155 | VCardList & |
156 | VCardEntity::cardList() | 156 | VCardEntity::cardList() |
157 | { | 157 | { |
158 | parse(); | 158 | parse(); |
159 | return cardList_; | 159 | return cardList_; |
160 | } | 160 | } |
161 | 161 | ||
162 | void | 162 | void |
163 | VCardEntity::setCardList(const VCardList & l) | 163 | VCardEntity::setCardList(const VCardList & l) |
164 | { | 164 | { |
165 | parse(); | 165 | parse(); |
166 | //UScardList_ = l; | 166 | //UScardList_ = l; |
167 | VCardListIterator it(l); | 167 | VCardListIterator it(l); |
168 | 168 | ||
169 | for (; it.current(); ++it) { | 169 | for (; it.current(); ++it) { |
170 | VCard* v = new VCard(*it.current()); | 170 | VCard* v = new VCard(*it.current()); |
171 | cardList_.append(v); | 171 | cardList_.append(v); |
172 | } | 172 | } |
173 | 173 | ||
174 | } | 174 | } |
175 | 175 | ||