summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2005-04-19 15:19:29 (UTC)
committer zautrix <zautrix>2005-04-19 15:19:29 (UTC)
commitb36bdf88fbf3cc78e4bf072b5eb3ec16bd8ec235 (patch) (unidiff)
treec1d6a10633c0b57f68c6d5e10e1f427b96dee0c5 /kaddressbook
parentda4130c979ec1ea278183ef7697777cb4d1f5101 (diff)
downloadkdepimpi-b36bdf88fbf3cc78e4bf072b5eb3ec16bd8ec235.zip
kdepimpi-b36bdf88fbf3cc78e4bf072b5eb3ec16bd8ec235.tar.gz
kdepimpi-b36bdf88fbf3cc78e4bf072b5eb3ec16bd8ec235.tar.bz2
fix
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kaimportoldialog.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/kaddressbook/kaimportoldialog.cpp b/kaddressbook/kaimportoldialog.cpp
index 848d8af..7bb8bd8 100644
--- a/kaddressbook/kaimportoldialog.cpp
+++ b/kaddressbook/kaimportoldialog.cpp
@@ -220,192 +220,193 @@ void KAImportOLdialog::readContactData( DWORD folder )
220 folderItems = mf.GetItems(); 220 folderItems = mf.GetItems();
221 QProgressBar bar( folderItems.GetCount(),0 ); 221 QProgressBar bar( folderItems.GetCount(),0 );
222 bar.setCaption (i18n("Importing - close to abort!") ); 222 bar.setCaption (i18n("Importing - close to abort!") );
223 int h = bar.sizeHint().height() ; 223 int h = bar.sizeHint().height() ;
224 int w = 300; 224 int w = 300;
225 int dw = QApplication::desktop()->width(); 225 int dw = QApplication::desktop()->width();
226 int dh = QApplication::desktop()->height(); 226 int dh = QApplication::desktop()->height();
227 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 227 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
228 bar.show(); 228 bar.show();
229 for(i=1; i <= folderItems.GetCount(); ++i) 229 for(i=1; i <= folderItems.GetCount(); ++i)
230 { 230 {
231 qApp->processEvents(); 231 qApp->processEvents();
232 if ( ! bar.isVisible() ) 232 if ( ! bar.isVisible() )
233 return ; 233 return ;
234 bar.setProgress( i ); 234 bar.setProgress( i );
235 indx = (long)i; 235 indx = (long)i;
236 itm = folderItems.Item(indx.Detach()); 236 itm = folderItems.Item(indx.Detach());
237 _ContactItem * pItem = (_ContactItem *)&itm; 237 _ContactItem * pItem = (_ContactItem *)&itm;
238 ol2kapiContact( pItem ); 238 ol2kapiContact( pItem );
239 itm->Release(); 239 itm->Release();
240 } 240 }
241} 241}
242void KAImportOLdialog::slotOk() 242void KAImportOLdialog::slotOk()
243{ 243{
244 QDialog::accept(); 244 QDialog::accept();
245} 245}
246 246
247void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) 247void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem )
248{ 248{
249 KABC::Addressee addressee; 249 KABC::Addressee addressee;
250 250
251 addressee.setUid( QString::fromUcs2(aItem->GetEntryID().GetBuffer())); 251 addressee.setUid( QString::fromUcs2(aItem->GetEntryID().GetBuffer()));
252 //GetLastModificationTime() 252 //GetLastModificationTime()
253 //addressee.setName( const QString &name ); 253 //addressee.setName( const QString &name );
254 //addressee.setFormattedName( const QString &formattedName ); 254 //addressee.setFormattedName( const QString &formattedName );
255 addressee.setFamilyName( QString::fromUcs2(aItem->GetLastName().GetBuffer()) ); 255 addressee.setFamilyName( QString::fromUcs2(aItem->GetLastName().GetBuffer()) );
256 addressee.setGivenName( QString::fromUcs2(aItem->GetFirstName().GetBuffer()) ); 256 addressee.setGivenName( QString::fromUcs2(aItem->GetFirstName().GetBuffer()) );
257 addressee.setAdditionalName( QString::fromUcs2(aItem->GetMiddleName().GetBuffer()) ); 257 addressee.setAdditionalName( QString::fromUcs2(aItem->GetMiddleName().GetBuffer()) );
258 addressee.setPrefix(QString::fromUcs2(aItem->GetTitle().GetBuffer()) ); 258 addressee.setPrefix(QString::fromUcs2(aItem->GetTitle().GetBuffer()) );
259 addressee.setSuffix( QString::fromUcs2(aItem->GetSuffix().GetBuffer()) ); 259 addressee.setSuffix( QString::fromUcs2(aItem->GetSuffix().GetBuffer()) );
260 addressee.setNickName( QString::fromUcs2(aItem->GetNickName().GetBuffer()) ); 260 addressee.setNickName( QString::fromUcs2(aItem->GetNickName().GetBuffer()) );
261 QDateTime dtb = mDdate2Qdtr(aItem->GetBirthday()); 261 QDateTime dtb = mDdate2Qdtr(aItem->GetBirthday());
262 if ( dtb.isValid() ) 262 if ( dtb.isValid() )
263 addressee.setBirthday( mDdate2Qdtr(aItem->GetBirthday())); 263 addressee.setBirthday( mDdate2Qdtr(aItem->GetBirthday()));
264 264
265 //QString::fromUcs2(aItem->.GetBuffer()) 265 //QString::fromUcs2(aItem->.GetBuffer())
266 //addressee.setMailer( const QString &mailer ); 266 //addressee.setMailer( const QString &mailer );
267 //addressee.setTimeZone( const TimeZone &timeZone ); 267 //addressee.setTimeZone( const TimeZone &timeZone );
268 //addressee.setGeo( const Geo &geo ); 268 //addressee.setGeo( const Geo &geo );
269 //addressee.setTitle( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) );// titel is the prefix 269 //addressee.setTitle( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) );// titel is the prefix
270 addressee.setRole( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) ); 270 addressee.setRole( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) );
271 addressee.setOrganization( QString::fromUcs2(aItem->GetCompanyName().GetBuffer()).replace( QRegExp("\\r"), "") ); 271 addressee.setOrganization( QString::fromUcs2(aItem->GetCompanyName().GetBuffer()).replace( QRegExp("\\r"), "") );
272 QString notesStr = QString::fromUcs2(aItem->GetBody().GetBuffer()); 272 QString notesStr = QString::fromUcs2(aItem->GetBody().GetBuffer());
273 notesStr.replace( QRegExp("\\r"), ""); 273 notesStr.replace( QRegExp("\\r"), "");
274 274
275 addressee.setProductId( QString::fromUcs2(aItem->GetCustomerID().GetBuffer()) ); 275 addressee.setProductId( QString::fromUcs2(aItem->GetCustomerID().GetBuffer()) );
276 //addressee.setRevision( const QDateTime &revision ); 276 //addressee.setRevision( const QDateTime &revision );
277 // addressee.setSortString( const QString &sortString ); 277 // addressee.setSortString( const QString &sortString );
278 addressee.setUrl( QString::fromUcs2(aItem->GetWebPage().GetBuffer()) ); 278 addressee.setUrl( QString::fromUcs2(aItem->GetWebPage().GetBuffer()) );
279 279
280 QString tempS; 280 QString tempS;
281 tempS = QString::fromUcs2(aItem->GetNetMeetingAlias().GetBuffer())+" AT SERVER: " +QString::fromUcs2(aItem->GetNetMeetingServer().GetBuffer()); 281 tempS = QString::fromUcs2(aItem->GetNetMeetingAlias().GetBuffer())+" AT SERVER: " +QString::fromUcs2(aItem->GetNetMeetingServer().GetBuffer());
282 if ( tempS.length() > 12 ) 282 if ( tempS.length() > 12 )
283 addressee.insertCustom( "KADDRESSBOOK", "X-IMAddress", tempS ); 283 addressee.insertCustom( "KADDRESSBOOK", "X-IMAddress", tempS );
284 tempS = QString::fromUcs2(aItem->GetSpouse().GetBuffer()); 284 tempS = QString::fromUcs2(aItem->GetSpouse().GetBuffer());
285 if ( !tempS.isEmpty() ) 285 if ( !tempS.isEmpty() )
286 addressee.insertCustom( "KADDRESSBOOK", "X-SpousesName", tempS ); 286 addressee.insertCustom( "KADDRESSBOOK", "X-SpousesName", tempS );
287 tempS = QString::fromUcs2(aItem->GetManagerName().GetBuffer()); 287 tempS = QString::fromUcs2(aItem->GetManagerName().GetBuffer());
288 if ( !tempS.isEmpty() ) 288 if ( !tempS.isEmpty() )
289 addressee.insertCustom( "KADDRESSBOOK", "X-ManagersName", tempS ); 289 addressee.insertCustom( "KADDRESSBOOK", "X-ManagersName", tempS );
290 tempS = QString::fromUcs2(aItem->GetAssistantName().GetBuffer()); 290 tempS = QString::fromUcs2(aItem->GetAssistantName().GetBuffer());
291 if ( !tempS.isEmpty() ) 291 if ( !tempS.isEmpty() )
292 addressee.insertCustom( "KADDRESSBOOK", "X-AssistantsName", tempS ); 292 addressee.insertCustom( "KADDRESSBOOK", "X-AssistantsName", tempS );
293 tempS = QString::fromUcs2(aItem->GetDepartment().GetBuffer()); 293 tempS = QString::fromUcs2(aItem->GetDepartment().GetBuffer());
294 if ( !tempS.isEmpty() ) 294 if ( !tempS.isEmpty() )
295 addressee.insertCustom( "KADDRESSBOOK", "X-Department", tempS ); 295 addressee.insertCustom( "KADDRESSBOOK", "X-Department", tempS );
296 tempS = QString::fromUcs2(aItem->GetOfficeLocation().GetBuffer()).replace( QRegExp("\\r"), ""); 296 tempS = QString::fromUcs2(aItem->GetOfficeLocation().GetBuffer()).replace( QRegExp("\\r"), "");
297 if ( !tempS.isEmpty() ) 297 if ( !tempS.isEmpty() )
298 addressee.insertCustom( "KADDRESSBOOK", "X-Office",tempS ); 298 addressee.insertCustom( "KADDRESSBOOK", "X-Office",tempS );
299 tempS = QString::fromUcs2(aItem->GetProfession().GetBuffer()); 299 tempS = QString::fromUcs2(aItem->GetProfession().GetBuffer());
300 if ( !tempS.isEmpty() ) 300 if ( !tempS.isEmpty() )
301 addressee.insertCustom( "KADDRESSBOOK", "X-Profession", tempS ); 301 addressee.insertCustom( "KADDRESSBOOK", "X-Profession", tempS );
302 dtb = mDdate2Qdtr(aItem->GetAnniversary()); 302 dtb = mDdate2Qdtr(aItem->GetAnniversary());
303 if (dtb.isValid() ) { 303 if (dtb.isValid() ) {
304 QString dt = KGlobal::locale()->formatDate( dtb.date() , true, KLocale::ISODate); 304 QString dt = KGlobal::locale()->formatDate( dtb.date() , true, KLocale::ISODate);
305 addressee.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt); 305 addressee.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt);
306 } 306 }
307 int sec = aItem->GetSensitivity() ; 307 int sec = aItem->GetSensitivity() ;
308 if ( sec > 1 )// mapping pers -> private 308 if ( sec > 1 )// mapping pers -> private
309 --sec; 309 --sec;
310 addressee.setSecrecy( sec ); 310 addressee.setSecrecy( sec );
311 //addressee.setLogo( const Picture &logo ); 311 //addressee.setLogo( const Picture &logo );
312 //addressee.setPhoto( const Picture &photo ); 312 //addressee.setPhoto( const Picture &photo );
313 //addressee.setSound( const Sound &sound ); 313 //addressee.setSound( const Sound &sound );
314 //addressee.setAgent( const Agent &agent ); 314 //addressee.setAgent( const Agent &agent );
315 QString cat = QString::fromUcs2( aItem->GetCategories().GetBuffer()).replace( QRegExp("\\r"), ""); 315 QString cat = QString::fromUcs2( aItem->GetCategories().GetBuffer()).replace( QRegExp("\\r"), "");
316 cat = cat.replace( QRegExp("; "), ";");
316 addressee.setCategories( QStringList::split( ";", cat )); 317 addressee.setCategories( QStringList::split( ";", cat ));
317 318
318 QString phoneS; 319 QString phoneS;
319 320
320 phoneS = QString::fromUcs2( aItem->GetAssistantTelephoneNumber().GetBuffer()); 321 phoneS = QString::fromUcs2( aItem->GetAssistantTelephoneNumber().GetBuffer());
321 if ( ! phoneS.isEmpty()) 322 if ( ! phoneS.isEmpty())
322 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work + KABC::PhoneNumber::Voice ) ); 323 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work + KABC::PhoneNumber::Voice ) );
323 phoneS = QString::fromUcs2( aItem->GetBusinessTelephoneNumber().GetBuffer()); 324 phoneS = QString::fromUcs2( aItem->GetBusinessTelephoneNumber().GetBuffer());
324 if ( ! phoneS.isEmpty()) 325 if ( ! phoneS.isEmpty())
325 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work ) ); 326 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work ) );
326 phoneS = QString::fromUcs2( aItem->GetBusiness2TelephoneNumber().GetBuffer()); 327 phoneS = QString::fromUcs2( aItem->GetBusiness2TelephoneNumber().GetBuffer());
327 if ( ! phoneS.isEmpty()) 328 if ( ! phoneS.isEmpty())
328 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work ) ); 329 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work ) );
329 phoneS = QString::fromUcs2( aItem->GetBusinessFaxNumber().GetBuffer()); 330 phoneS = QString::fromUcs2( aItem->GetBusinessFaxNumber().GetBuffer());
330 if ( ! phoneS.isEmpty()) 331 if ( ! phoneS.isEmpty())
331 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work + KABC::PhoneNumber::Fax ) ); 332 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work + KABC::PhoneNumber::Fax ) );
332 phoneS = QString::fromUcs2( aItem->GetCarTelephoneNumber().GetBuffer()); 333 phoneS = QString::fromUcs2( aItem->GetCarTelephoneNumber().GetBuffer());
333 if ( ! phoneS.isEmpty()) 334 if ( ! phoneS.isEmpty())
334 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Car ) ); 335 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Car ) );
335 phoneS = QString::fromUcs2( aItem->GetHomeTelephoneNumber().GetBuffer()); 336 phoneS = QString::fromUcs2( aItem->GetHomeTelephoneNumber().GetBuffer());
336 if ( ! phoneS.isEmpty()) 337 if ( ! phoneS.isEmpty())
337 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Home ) ); 338 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Home ) );
338 phoneS = QString::fromUcs2( aItem->GetHome2TelephoneNumber().GetBuffer()); 339 phoneS = QString::fromUcs2( aItem->GetHome2TelephoneNumber().GetBuffer());
339 if ( ! phoneS.isEmpty()) 340 if ( ! phoneS.isEmpty())
340 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Home ) ); 341 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Home ) );
341 phoneS = QString::fromUcs2( aItem->GetHomeFaxNumber().GetBuffer()); 342 phoneS = QString::fromUcs2( aItem->GetHomeFaxNumber().GetBuffer());
342 if ( ! phoneS.isEmpty()) 343 if ( ! phoneS.isEmpty())
343 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Home + KABC::PhoneNumber::Fax ) ); 344 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Home + KABC::PhoneNumber::Fax ) );
344 phoneS = QString::fromUcs2( aItem->GetISDNNumber().GetBuffer()); 345 phoneS = QString::fromUcs2( aItem->GetISDNNumber().GetBuffer());
345 if ( ! phoneS.isEmpty()) 346 if ( ! phoneS.isEmpty())
346 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Isdn ) ); 347 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Isdn ) );
347 phoneS = QString::fromUcs2( aItem->GetMobileTelephoneNumber().GetBuffer()); 348 phoneS = QString::fromUcs2( aItem->GetMobileTelephoneNumber().GetBuffer());
348 if ( ! phoneS.isEmpty()) 349 if ( ! phoneS.isEmpty())
349 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Cell ) ); 350 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Cell ) );
350 phoneS = QString::fromUcs2( aItem->GetOtherFaxNumber().GetBuffer()); 351 phoneS = QString::fromUcs2( aItem->GetOtherFaxNumber().GetBuffer());
351 if ( ! phoneS.isEmpty()) 352 if ( ! phoneS.isEmpty())
352 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Fax ) ); 353 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Fax ) );
353 phoneS = QString::fromUcs2( aItem->GetOtherTelephoneNumber().GetBuffer()); 354 phoneS = QString::fromUcs2( aItem->GetOtherTelephoneNumber().GetBuffer());
354 if ( ! phoneS.isEmpty()) 355 if ( ! phoneS.isEmpty())
355 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Voice ) ); 356 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Voice ) );
356 phoneS = QString::fromUcs2( aItem->GetPagerNumber().GetBuffer()); 357 phoneS = QString::fromUcs2( aItem->GetPagerNumber().GetBuffer());
357 if ( ! phoneS.isEmpty()) 358 if ( ! phoneS.isEmpty())
358 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Pager ) ); 359 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Pager ) );
359 phoneS = QString::fromUcs2( aItem->GetPrimaryTelephoneNumber().GetBuffer()); 360 phoneS = QString::fromUcs2( aItem->GetPrimaryTelephoneNumber().GetBuffer());
360 if ( ! phoneS.isEmpty()) 361 if ( ! phoneS.isEmpty())
361 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Pref ) ); 362 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Pref ) );
362 phoneS = QString::fromUcs2( aItem->GetTTYTDDTelephoneNumber().GetBuffer()); 363 phoneS = QString::fromUcs2( aItem->GetTTYTDDTelephoneNumber().GetBuffer());
363 if ( ! phoneS.isEmpty()) 364 if ( ! phoneS.isEmpty())
364 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Modem ) ); 365 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Modem ) );
365 phoneS = QString::fromUcs2( aItem->GetTelexNumber().GetBuffer()); 366 phoneS = QString::fromUcs2( aItem->GetTelexNumber().GetBuffer());
366 if ( ! phoneS.isEmpty()) 367 if ( ! phoneS.isEmpty())
367 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Fax + KABC::PhoneNumber::Bbs ) ); 368 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Fax + KABC::PhoneNumber::Bbs ) );
368 phoneS = QString::fromUcs2( aItem->GetCompanyMainTelephoneNumber().GetBuffer()); 369 phoneS = QString::fromUcs2( aItem->GetCompanyMainTelephoneNumber().GetBuffer());
369 if ( ! phoneS.isEmpty()) 370 if ( ! phoneS.isEmpty())
370 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work + KABC::PhoneNumber::Pref ) ); 371 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work + KABC::PhoneNumber::Pref ) );
371 phoneS = QString::fromUcs2( aItem->GetRadioTelephoneNumber().GetBuffer()); 372 phoneS = QString::fromUcs2( aItem->GetRadioTelephoneNumber().GetBuffer());
372 if ( ! phoneS.isEmpty()) 373 if ( ! phoneS.isEmpty())
373 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Video ) ); 374 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Video ) );
374 phoneS = QString::fromUcs2( aItem->GetCallbackTelephoneNumber().GetBuffer()); 375 phoneS = QString::fromUcs2( aItem->GetCallbackTelephoneNumber().GetBuffer());
375 if ( ! phoneS.isEmpty()) 376 if ( ! phoneS.isEmpty())
376 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Voice + KABC::PhoneNumber::Pref ) ); 377 addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Voice + KABC::PhoneNumber::Pref ) );
377 378
378 bool preferred = true; 379 bool preferred = true;
379 phoneS = QString::fromUcs2( aItem->GetEmail1Address().GetBuffer()); 380 phoneS = QString::fromUcs2( aItem->GetEmail1Address().GetBuffer());
380 if ( ! phoneS.isEmpty()) { 381 if ( ! phoneS.isEmpty()) {
381 addressee.insertEmail(phoneS , preferred ); 382 addressee.insertEmail(phoneS , preferred );
382 preferred = false; 383 preferred = false;
383 } 384 }
384 phoneS = QString::fromUcs2( aItem->GetEmail2Address().GetBuffer()); 385 phoneS = QString::fromUcs2( aItem->GetEmail2Address().GetBuffer());
385 if ( ! phoneS.isEmpty()) { 386 if ( ! phoneS.isEmpty()) {
386 addressee.insertEmail(phoneS , preferred ); 387 addressee.insertEmail(phoneS , preferred );
387 preferred = false; 388 preferred = false;
388 } 389 }
389 phoneS = QString::fromUcs2( aItem->GetEmail3Address().GetBuffer()); 390 phoneS = QString::fromUcs2( aItem->GetEmail3Address().GetBuffer());
390 if ( ! phoneS.isEmpty()) { 391 if ( ! phoneS.isEmpty()) {
391 addressee.insertEmail(phoneS , preferred ); 392 addressee.insertEmail(phoneS , preferred );
392 preferred = false; 393 preferred = false;
393 } 394 }
394 // is this the number of the preferred email? 395 // is this the number of the preferred email?
395 //long GetSelectedMailingAddress();??? 396 //long GetSelectedMailingAddress();???
396 397
397 KABC::Address addressHome; 398 KABC::Address addressHome;
398 KABC::Address* addressAdd = &addressHome; 399 KABC::Address* addressAdd = &addressHome;
399 bool insert = false; 400 bool insert = false;
400 phoneS = QString::fromUcs2( aItem->GetHomeAddressCountry().GetBuffer()); 401 phoneS = QString::fromUcs2( aItem->GetHomeAddressCountry().GetBuffer());
401 phoneS.replace( QRegExp("\\r"), ""); 402 phoneS.replace( QRegExp("\\r"), "");
402 if ( ! phoneS.isEmpty()) { 403 if ( ! phoneS.isEmpty()) {
403 addressAdd->setCountry(phoneS ); 404 addressAdd->setCountry(phoneS );
404 insert = true; 405 insert = true;
405 } 406 }
406 phoneS = QString::fromUcs2( aItem->GetHomeAddressState().GetBuffer()); 407 phoneS = QString::fromUcs2( aItem->GetHomeAddressState().GetBuffer());
407 phoneS.replace( QRegExp("\\r"), ""); 408 phoneS.replace( QRegExp("\\r"), "");
408 if ( ! phoneS.isEmpty()) { 409 if ( ! phoneS.isEmpty()) {
409 addressAdd->setRegion(phoneS ); 410 addressAdd->setRegion(phoneS );
410 insert = true; 411 insert = true;
411 } 412 }