author | zautrix <zautrix> | 2004-10-15 14:26:07 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-15 14:26:07 (UTC) |
commit | 4f276d80bd977401d656851515474cc00c661e5b (patch) (unidiff) | |
tree | 0d3a747bef0431ef791b69876f5bda554f9ca83f /kabc | |
parent | c2fb960297c4b08980921c818a4d347057732390 (diff) | |
download | kdepimpi-4f276d80bd977401d656851515474cc00c661e5b.zip kdepimpi-4f276d80bd977401d656851515474cc00c661e5b.tar.gz kdepimpi-4f276d80bd977401d656851515474cc00c661e5b.tar.bz2 |
many phone and sync fixes
-rw-r--r-- | kabc/addressee.cpp | 1 | ||||
-rw-r--r-- | kabc/kabc.pro | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 2564894..40877ef 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp | |||
@@ -281,64 +281,65 @@ void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false) | |||
281 | if ( mData->additionalName ) mData->additionalName = ad.mData->additionalName; | 281 | if ( mData->additionalName ) mData->additionalName = ad.mData->additionalName; |
282 | if ( mData->prefix.isEmpty() ) mData->prefix = ad.mData->prefix; | 282 | if ( mData->prefix.isEmpty() ) mData->prefix = ad.mData->prefix; |
283 | if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix; | 283 | if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix; |
284 | if ( mData->nickName.isEmpty() ) mData->nickName = ad.mData->nickName; | 284 | if ( mData->nickName.isEmpty() ) mData->nickName = ad.mData->nickName; |
285 | if ( !mData->birthday.isValid() ) | 285 | if ( !mData->birthday.isValid() ) |
286 | if ( ad.mData->birthday.isValid()) | 286 | if ( ad.mData->birthday.isValid()) |
287 | mData->birthday = ad.mData->birthday; | 287 | mData->birthday = ad.mData->birthday; |
288 | if ( mData->mailer.isEmpty() ) mData->mailer = ad.mData->mailer; | 288 | if ( mData->mailer.isEmpty() ) mData->mailer = ad.mData->mailer; |
289 | if ( !mData->timeZone.isValid() ) mData->timeZone = ad.mData->timeZone; | 289 | if ( !mData->timeZone.isValid() ) mData->timeZone = ad.mData->timeZone; |
290 | if ( !mData->geo.isValid() ) mData->geo = ad.mData->geo; | 290 | if ( !mData->geo.isValid() ) mData->geo = ad.mData->geo; |
291 | if ( mData->title .isEmpty() ) mData->title = ad.mData->title ; | 291 | if ( mData->title .isEmpty() ) mData->title = ad.mData->title ; |
292 | if ( mData->role.isEmpty() ) mData->role = ad.mData->role ; | 292 | if ( mData->role.isEmpty() ) mData->role = ad.mData->role ; |
293 | if ( mData->organization.isEmpty() ) mData->organization = ad.mData->organization ; | 293 | if ( mData->organization.isEmpty() ) mData->organization = ad.mData->organization ; |
294 | if ( mData->note.isEmpty() ) mData->note = ad.mData->note ; | 294 | if ( mData->note.isEmpty() ) mData->note = ad.mData->note ; |
295 | if ( mData->productId.isEmpty() ) mData->productId = ad.mData->productId; | 295 | if ( mData->productId.isEmpty() ) mData->productId = ad.mData->productId; |
296 | if ( mData->sortString.isEmpty() ) mData->sortString = ad.mData->sortString; | 296 | if ( mData->sortString.isEmpty() ) mData->sortString = ad.mData->sortString; |
297 | if ( !mData->secrecy.isValid() ) mData->secrecy = ad.mData->secrecy; | 297 | if ( !mData->secrecy.isValid() ) mData->secrecy = ad.mData->secrecy; |
298 | if ( ( !mData->url.isValid() && ad.mData->url.isValid() ) ) mData->url = ad.mData->url ; | 298 | if ( ( !mData->url.isValid() && ad.mData->url.isValid() ) ) mData->url = ad.mData->url ; |
299 | QStringList t; | 299 | QStringList t; |
300 | QStringList tAD; | 300 | QStringList tAD; |
301 | uint iii; | 301 | uint iii; |
302 | 302 | ||
303 | // ********** phone numbers | 303 | // ********** phone numbers |
304 | PhoneNumber::List phoneAD = ad.phoneNumbers(); | 304 | PhoneNumber::List phoneAD = ad.phoneNumbers(); |
305 | PhoneNumber::List::Iterator phoneItAD; | 305 | PhoneNumber::List::Iterator phoneItAD; |
306 | for ( phoneItAD = phoneAD.begin(); phoneItAD != phoneAD.end(); ++phoneItAD ) { | 306 | for ( phoneItAD = phoneAD.begin(); phoneItAD != phoneAD.end(); ++phoneItAD ) { |
307 | bool found = false; | 307 | bool found = false; |
308 | PhoneNumber::List::Iterator it; | 308 | PhoneNumber::List::Iterator it; |
309 | for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { | 309 | for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { |
310 | if ( ( *phoneItAD ).contains( (*it) ) ) { | 310 | if ( ( *phoneItAD ).contains( (*it) ) ) { |
311 | found = true; | 311 | found = true; |
312 | (*it).setType( ( *phoneItAD ).type() ); | 312 | (*it).setType( ( *phoneItAD ).type() ); |
313 | (*it).setNumber( ( *phoneItAD ).number() ); | ||
313 | break; | 314 | break; |
314 | } | 315 | } |
315 | } | 316 | } |
316 | if ( isSubSet && ! found ) | 317 | if ( isSubSet && ! found ) |
317 | mData->phoneNumbers.append( *phoneItAD ); | 318 | mData->phoneNumbers.append( *phoneItAD ); |
318 | } | 319 | } |
319 | if ( isSubSet ) { | 320 | if ( isSubSet ) { |
320 | // ************* emails; | 321 | // ************* emails; |
321 | t = mData->emails; | 322 | t = mData->emails; |
322 | tAD = ad.mData->emails; | 323 | tAD = ad.mData->emails; |
323 | for ( iii = 0; iii < tAD.count(); ++iii) | 324 | for ( iii = 0; iii < tAD.count(); ++iii) |
324 | if ( !t.contains(tAD[iii] ) ) | 325 | if ( !t.contains(tAD[iii] ) ) |
325 | mData->emails.append( tAD[iii] ); | 326 | mData->emails.append( tAD[iii] ); |
326 | } | 327 | } |
327 | 328 | ||
328 | // ************* categories; | 329 | // ************* categories; |
329 | t = mData->categories; | 330 | t = mData->categories; |
330 | tAD = ad.mData->categories; | 331 | tAD = ad.mData->categories; |
331 | for ( iii = 0; iii < tAD.count(); ++iii) | 332 | for ( iii = 0; iii < tAD.count(); ++iii) |
332 | if ( !t.contains(tAD[iii] ) ) | 333 | if ( !t.contains(tAD[iii] ) ) |
333 | mData->categories.append( tAD[iii] ); | 334 | mData->categories.append( tAD[iii] ); |
334 | QStringList::ConstIterator it; | 335 | QStringList::ConstIterator it; |
335 | for( it = ad.mData->custom.begin(); it != ad.mData->custom.end(); ++it ) { | 336 | for( it = ad.mData->custom.begin(); it != ad.mData->custom.end(); ++it ) { |
336 | QString qualifiedName = (*it).left( (*it).find( ":" )); | 337 | QString qualifiedName = (*it).left( (*it).find( ":" )); |
337 | bool found = false; | 338 | bool found = false; |
338 | QStringList::ConstIterator itL; | 339 | QStringList::ConstIterator itL; |
339 | for( itL = mData->custom.begin(); itL != mData->custom.end(); ++itL ) { | 340 | for( itL = mData->custom.begin(); itL != mData->custom.end(); ++itL ) { |
340 | if ( (*itL).startsWith( qualifiedName ) ) { | 341 | if ( (*itL).startsWith( qualifiedName ) ) { |
341 | found = true; | 342 | found = true; |
342 | break; | 343 | break; |
343 | } | 344 | } |
344 | } | 345 | } |
diff --git a/kabc/kabc.pro b/kabc/kabc.pro index d690acc..17ebff8 100644 --- a/kabc/kabc.pro +++ b/kabc/kabc.pro | |||
@@ -19,65 +19,64 @@ MOC_DIR = moc/unix | |||
19 | } | 19 | } |
20 | win32: { | 20 | win32: { |
21 | DEFINES += _WIN32_ | 21 | DEFINES += _WIN32_ |
22 | OBJECTS_DIR = obj/win | 22 | OBJECTS_DIR = obj/win |
23 | MOC_DIR = moc/win | 23 | MOC_DIR = moc/win |
24 | } | 24 | } |
25 | INTERFACES = \ | 25 | INTERFACES = \ |
26 | 26 | ||
27 | 27 | ||
28 | HEADERS = \ | 28 | HEADERS = \ |
29 | resource.h \ | 29 | resource.h \ |
30 | stdaddressbook.h \ | 30 | stdaddressbook.h \ |
31 | agent.h \ | 31 | agent.h \ |
32 | geo.h \ | 32 | geo.h \ |
33 | key.h \ | 33 | key.h \ |
34 | field.h \ | 34 | field.h \ |
35 | plugin.h \ | 35 | plugin.h \ |
36 | address.h \ | 36 | address.h \ |
37 | addresseelist.h \ | 37 | addresseelist.h \ |
38 | addresseeview.h \ | 38 | addresseeview.h \ |
39 | formatfactory.h \ | 39 | formatfactory.h \ |
40 | formatplugin.h \ | 40 | formatplugin.h \ |
41 | phonenumber.h \ | 41 | phonenumber.h \ |
42 | distributionlist.h \ | 42 | distributionlist.h \ |
43 | distributionlistdialog.h \ | 43 | distributionlistdialog.h \ |
44 | distributionlisteditor.h \ | 44 | distributionlisteditor.h \ |
45 | vcardformatplugin.h \ | 45 | vcardformatplugin.h \ |
46 | formats/vcardformatplugin2.h \ | 46 | formats/vcardformatplugin2.h \ |
47 | picture.h \ | 47 | picture.h \ |
48 | secrecy.h \ | 48 | secrecy.h \ |
49 | sound.h \ | 49 | sound.h \ |
50 | addressbook.h \ | 50 | addressbook.h \ |
51 | syncprefwidget.h \ | ||
52 | timezone.h \ | 51 | timezone.h \ |
53 | tmpaddressbook.h \ | 52 | tmpaddressbook.h \ |
54 | addressee.h \ | 53 | addressee.h \ |
55 | addresseedialog.h \ | 54 | addresseedialog.h \ |
56 | vcardconverter.h \ | 55 | vcardconverter.h \ |
57 | vcard21parser.h \ | 56 | vcard21parser.h \ |
58 | vcardformatimpl.h \ | 57 | vcardformatimpl.h \ |
59 | plugins/file/resourcefile.h \ | 58 | plugins/file/resourcefile.h \ |
60 | plugins/file/resourcefileconfig.h \ | 59 | plugins/file/resourcefileconfig.h \ |
61 | plugins/dir/resourcedir.h \ | 60 | plugins/dir/resourcedir.h \ |
62 | plugins/dir/resourcedirconfig.h \ | 61 | plugins/dir/resourcedirconfig.h \ |
63 | vcardparser/vcardline.h \ | 62 | vcardparser/vcardline.h \ |
64 | vcardparser/vcard.h \ | 63 | vcardparser/vcard.h \ |
65 | vcardparser/vcardtool.h \ | 64 | vcardparser/vcardtool.h \ |
66 | vcardparser/vcardparser.h \ | 65 | vcardparser/vcardparser.h \ |
67 | vcard/include/VCardAdrParam.h \ | 66 | vcard/include/VCardAdrParam.h \ |
68 | vcard/include/VCardAdrValue.h \ | 67 | vcard/include/VCardAdrValue.h \ |
69 | vcard/include/VCardAgentParam.h \ | 68 | vcard/include/VCardAgentParam.h \ |
70 | vcard/include/VCardContentLine.h \ | 69 | vcard/include/VCardContentLine.h \ |
71 | vcard/include/VCardDateParam.h \ | 70 | vcard/include/VCardDateParam.h \ |
72 | vcard/include/VCardDateValue.h \ | 71 | vcard/include/VCardDateValue.h \ |
73 | vcard/include/VCardEmailParam.h \ | 72 | vcard/include/VCardEmailParam.h \ |
74 | vcard/include/VCardGeoValue.h \ | 73 | vcard/include/VCardGeoValue.h \ |
75 | vcard/include/VCardGroup.h \ | 74 | vcard/include/VCardGroup.h \ |
76 | vcard/include/VCardImageParam.h \ | 75 | vcard/include/VCardImageParam.h \ |
77 | vcard/include/VCardImageValue.h \ | 76 | vcard/include/VCardImageValue.h \ |
78 | vcard/include/VCardLangValue.h \ | 77 | vcard/include/VCardLangValue.h \ |
79 | vcard/include/VCardNValue.h \ | 78 | vcard/include/VCardNValue.h \ |
80 | vcard/include/VCardParam.h \ | 79 | vcard/include/VCardParam.h \ |
81 | vcard/include/VCardPhoneNumberValue.h \ | 80 | vcard/include/VCardPhoneNumberValue.h \ |
82 | vcard/include/VCardSourceParam.h \ | 81 | vcard/include/VCardSourceParam.h \ |
83 | vcard/include/VCardTelParam.h \ | 82 | vcard/include/VCardTelParam.h \ |
@@ -131,65 +130,64 @@ vcard/include/generated/UTCValue-generated.h \ | |||
131 | vcard/include/generated/ClassValue-generated.h \ | 130 | vcard/include/generated/ClassValue-generated.h \ |
132 | vcard/include/generated/FloatValue-generated.h \ | 131 | vcard/include/generated/FloatValue-generated.h \ |
133 | vcard/include/generated/TextListValue-generated.h | 132 | vcard/include/generated/TextListValue-generated.h |
134 | 133 | ||
135 | 134 | ||
136 | # plugins/ldap/resourceldap.h \ | 135 | # plugins/ldap/resourceldap.h \ |
137 | # plugins/ldap/resourceldapconfig.h \ | 136 | # plugins/ldap/resourceldapconfig.h \ |
138 | #formats/binary/binaryformat.h \ | 137 | #formats/binary/binaryformat.h \ |
139 | 138 | ||
140 | #vcard/include/VCardTextNSParam.h \ | 139 | #vcard/include/VCardTextNSParam.h \ |
141 | 140 | ||
142 | SOURCES = \ | 141 | SOURCES = \ |
143 | distributionlist.cpp \ | 142 | distributionlist.cpp \ |
144 | distributionlistdialog.cpp \ | 143 | distributionlistdialog.cpp \ |
145 | distributionlisteditor.cpp \ | 144 | distributionlisteditor.cpp \ |
146 | vcardformatplugin.cpp \ | 145 | vcardformatplugin.cpp \ |
147 | formats/vcardformatplugin2.cpp \ | 146 | formats/vcardformatplugin2.cpp \ |
148 | formatfactory.cpp \ | 147 | formatfactory.cpp \ |
149 | resource.cpp \ | 148 | resource.cpp \ |
150 | stdaddressbook.cpp \ | 149 | stdaddressbook.cpp \ |
151 | plugin.cpp \ | 150 | plugin.cpp \ |
152 | agent.cpp \ | 151 | agent.cpp \ |
153 | geo.cpp \ | 152 | geo.cpp \ |
154 | key.cpp \ | 153 | key.cpp \ |
155 | field.cpp \ | 154 | field.cpp \ |
156 | addresseeview.cpp \ | 155 | addresseeview.cpp \ |
157 | address.cpp \ | 156 | address.cpp \ |
158 | phonenumber.cpp \ | 157 | phonenumber.cpp \ |
159 | picture.cpp \ | 158 | picture.cpp \ |
160 | secrecy.cpp \ | 159 | secrecy.cpp \ |
161 | sound.cpp \ | 160 | sound.cpp \ |
162 | addressbook.cpp \ | 161 | addressbook.cpp \ |
163 | syncprefwidget.cpp \ | ||
164 | timezone.cpp \ | 162 | timezone.cpp \ |
165 | tmpaddressbook.cpp \ | 163 | tmpaddressbook.cpp \ |
166 | addressee.cpp \ | 164 | addressee.cpp \ |
167 | addresseelist.cpp \ | 165 | addresseelist.cpp \ |
168 | addresseedialog.cpp \ | 166 | addresseedialog.cpp \ |
169 | vcardconverter.cpp \ | 167 | vcardconverter.cpp \ |
170 | vcard21parser.cpp \ | 168 | vcard21parser.cpp \ |
171 | vcardformatimpl.cpp \ | 169 | vcardformatimpl.cpp \ |
172 | plugins/file/resourcefile.cpp \ | 170 | plugins/file/resourcefile.cpp \ |
173 | plugins/file/resourcefileconfig.cpp \ | 171 | plugins/file/resourcefileconfig.cpp \ |
174 | plugins/dir/resourcedir.cpp \ | 172 | plugins/dir/resourcedir.cpp \ |
175 | plugins/dir/resourcedirconfig.cpp \ | 173 | plugins/dir/resourcedirconfig.cpp \ |
176 | vcardparser/vcardline.cpp \ | 174 | vcardparser/vcardline.cpp \ |
177 | vcardparser/vcard.cpp \ | 175 | vcardparser/vcard.cpp \ |
178 | vcardparser/vcardtool.cpp \ | 176 | vcardparser/vcardtool.cpp \ |
179 | vcardparser/vcardparser.cpp \ | 177 | vcardparser/vcardparser.cpp \ |
180 | vcard/AdrParam.cpp \ | 178 | vcard/AdrParam.cpp \ |
181 | vcard/AdrValue.cpp \ | 179 | vcard/AdrValue.cpp \ |
182 | vcard/AgentParam.cpp \ | 180 | vcard/AgentParam.cpp \ |
183 | vcard/ContentLine.cpp \ | 181 | vcard/ContentLine.cpp \ |
184 | vcard/DateParam.cpp \ | 182 | vcard/DateParam.cpp \ |
185 | vcard/DateValue.cpp \ | 183 | vcard/DateValue.cpp \ |
186 | vcard/EmailParam.cpp \ | 184 | vcard/EmailParam.cpp \ |
187 | vcard/Entity.cpp \ | 185 | vcard/Entity.cpp \ |
188 | vcard/Enum.cpp \ | 186 | vcard/Enum.cpp \ |
189 | vcard/GeoValue.cpp \ | 187 | vcard/GeoValue.cpp \ |
190 | vcard/ImageParam.cpp \ | 188 | vcard/ImageParam.cpp \ |
191 | vcard/ImageValue.cpp \ | 189 | vcard/ImageValue.cpp \ |
192 | vcard/LangValue.cpp \ | 190 | vcard/LangValue.cpp \ |
193 | vcard/NValue.cpp \ | 191 | vcard/NValue.cpp \ |
194 | vcard/Param.cpp \ | 192 | vcard/Param.cpp \ |
195 | vcard/PhoneNumberValue.cpp \ | 193 | vcard/PhoneNumberValue.cpp \ |