Diffstat (limited to 'noncore/net/mail/libmailwrapper/imapwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index 56efa0b..8e5212b 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp | |||
@@ -363,25 +363,25 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() | |||
363 | } | 363 | } |
364 | if (result) mailimap_list_result_free( result ); | 364 | if (result) mailimap_list_result_free( result ); |
365 | return folders; | 365 | return folders; |
366 | } | 366 | } |
367 | 367 | ||
368 | RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | 368 | RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) |
369 | { | 369 | { |
370 | RecMail * m = 0; | 370 | RecMail * m = 0; |
371 | mailimap_msg_att_item *item=0; | 371 | mailimap_msg_att_item *item=0; |
372 | clistcell *current,*c,*cf; | 372 | clistcell *current,*c,*cf; |
373 | mailimap_msg_att_dynamic*flist; | 373 | mailimap_msg_att_dynamic*flist; |
374 | mailimap_flag_fetch*cflag; | 374 | mailimap_flag_fetch*cflag; |
375 | int size; | 375 | int size,toffset; |
376 | QBitArray mFlags(7); | 376 | QBitArray mFlags(7); |
377 | QStringList addresslist; | 377 | QStringList addresslist; |
378 | 378 | ||
379 | if (!m_att) { | 379 | if (!m_att) { |
380 | return m; | 380 | return m; |
381 | } | 381 | } |
382 | size = 0; | 382 | size = 0; |
383 | m = new RecMail(); | 383 | m = new RecMail(); |
384 | for (c = clist_begin(m_att->att_list); c!=NULL;c=clist_next(c) ) { | 384 | for (c = clist_begin(m_att->att_list); c!=NULL;c=clist_next(c) ) { |
385 | current = c; | 385 | current = c; |
386 | item = (mailimap_msg_att_item*)current->data; | 386 | item = (mailimap_msg_att_item*)current->data; |
387 | if (item->att_type!=MAILIMAP_MSG_ATT_ITEM_STATIC) { | 387 | if (item->att_type!=MAILIMAP_MSG_ATT_ITEM_STATIC) { |
@@ -415,25 +415,26 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
415 | break; | 415 | break; |
416 | default: | 416 | default: |
417 | break; | 417 | break; |
418 | } | 418 | } |
419 | } else if (cflag->fl_type==MAILIMAP_FLAG_FETCH_RECENT) { | 419 | } else if (cflag->fl_type==MAILIMAP_FLAG_FETCH_RECENT) { |
420 | mFlags.setBit(FLAG_RECENT); | 420 | mFlags.setBit(FLAG_RECENT); |
421 | } | 421 | } |
422 | } | 422 | } |
423 | continue; | 423 | continue; |
424 | } | 424 | } |
425 | if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_ENVELOPE) { | 425 | if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_ENVELOPE) { |
426 | mailimap_envelope * head = item->att_data.att_static->att_data.att_env; | 426 | mailimap_envelope * head = item->att_data.att_static->att_data.att_env; |
427 | m->setDate(parseDateTime(head->env_date)); | 427 | QDateTime d = parseDateTime(head->env_date,toffset); |
428 | m->setDate(d,toffset); | ||
428 | m->setSubject(convert_String((const char*)head->env_subject)); | 429 | m->setSubject(convert_String((const char*)head->env_subject)); |
429 | if (head->env_from!=NULL) { | 430 | if (head->env_from!=NULL) { |
430 | addresslist = address_list_to_stringlist(head->env_from->frm_list); | 431 | addresslist = address_list_to_stringlist(head->env_from->frm_list); |
431 | if (addresslist.count()) { | 432 | if (addresslist.count()) { |
432 | m->setFrom(addresslist.first()); | 433 | m->setFrom(addresslist.first()); |
433 | } | 434 | } |
434 | } | 435 | } |
435 | if (head->env_to!=NULL) { | 436 | if (head->env_to!=NULL) { |
436 | addresslist = address_list_to_stringlist(head->env_to->to_list); | 437 | addresslist = address_list_to_stringlist(head->env_to->to_list); |
437 | m->setTo(addresslist); | 438 | m->setTo(addresslist); |
438 | } | 439 | } |
439 | if (head->env_cc!=NULL) { | 440 | if (head->env_cc!=NULL) { |