author | alwin <alwin> | 2004-03-12 19:24:38 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-12 19:24:38 (UTC) |
commit | b600871ce93553a116a66fd80acd6dfc1cc46829 (patch) (unidiff) | |
tree | b361346a49e09d9f0220993583bf183cf29bd974 /noncore/net/mail/accountitem.cpp | |
parent | 874d5a34eca296263dcd1adf857aebe9981825a1 (diff) | |
download | opie-b600871ce93553a116a66fd80acd6dfc1cc46829.zip opie-b600871ce93553a116a66fd80acd6dfc1cc46829.tar.gz opie-b600871ce93553a116a66fd80acd6dfc1cc46829.tar.bz2 |
some more smart-pointers
some bugfixes
some renaming of internals
Diffstat (limited to 'noncore/net/mail/accountitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/accountitem.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/noncore/net/mail/accountitem.cpp b/noncore/net/mail/accountitem.cpp index 3e12563..9a09c18 100644 --- a/noncore/net/mail/accountitem.cpp +++ b/noncore/net/mail/accountitem.cpp | |||
@@ -46,13 +46,13 @@ POP3viewItem::~POP3viewItem() | |||
46 | 46 | ||
47 | AbstractMail *POP3viewItem::getWrapper() | 47 | AbstractMail *POP3viewItem::getWrapper() |
48 | { | 48 | { |
49 | return wrapper; | 49 | return wrapper; |
50 | } | 50 | } |
51 | 51 | ||
52 | void POP3viewItem::refresh( QList<RecMail> & ) | 52 | void POP3viewItem::refresh(QValueList<Opie::OSmartPointer<RecMail> > & ) |
53 | { | 53 | { |
54 | refresh(); | 54 | refresh(); |
55 | } | 55 | } |
56 | 56 | ||
57 | void POP3viewItem::refresh() | 57 | void POP3viewItem::refresh() |
58 | { | 58 | { |
@@ -72,13 +72,13 @@ void POP3viewItem::refresh() | |||
72 | item = new POP3folderItem( (*it), this , item ); | 72 | item = new POP3folderItem( (*it), this , item ); |
73 | item->setSelectable( (*it)->may_select()); | 73 | item->setSelectable( (*it)->may_select()); |
74 | } | 74 | } |
75 | delete folders; | 75 | delete folders; |
76 | } | 76 | } |
77 | 77 | ||
78 | RecBody POP3viewItem::fetchBody( const RecMail &mail ) | 78 | RecBody POP3viewItem::fetchBody( const RecMailP &mail ) |
79 | { | 79 | { |
80 | qDebug( "POP3 fetchBody" ); | 80 | qDebug( "POP3 fetchBody" ); |
81 | return wrapper->fetchBody( mail ); | 81 | return wrapper->fetchBody( mail ); |
82 | } | 82 | } |
83 | 83 | ||
84 | QPopupMenu * POP3viewItem::getContextMenu() | 84 | QPopupMenu * POP3viewItem::getContextMenu() |
@@ -151,19 +151,19 @@ POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent , | |||
151 | { | 151 | { |
152 | setPixmap( 0, PIXMAP_INBOXFOLDER); | 152 | setPixmap( 0, PIXMAP_INBOXFOLDER); |
153 | } | 153 | } |
154 | setText( 0, folder->getDisplayName() ); | 154 | setText( 0, folder->getDisplayName() ); |
155 | } | 155 | } |
156 | 156 | ||
157 | void POP3folderItem::refresh(QList<RecMail>&target) | 157 | void POP3folderItem::refresh(QValueList<RecMailP>&target) |
158 | { | 158 | { |
159 | if (folder->may_select()) | 159 | if (folder->may_select()) |
160 | pop3->getWrapper()->listMessages( folder->getName(),target ); | 160 | pop3->getWrapper()->listMessages( folder->getName(),target ); |
161 | } | 161 | } |
162 | 162 | ||
163 | RecBody POP3folderItem::fetchBody(const RecMail&aMail) | 163 | RecBody POP3folderItem::fetchBody(const RecMailP&aMail) |
164 | { | 164 | { |
165 | return pop3->getWrapper()->fetchBody(aMail); | 165 | return pop3->getWrapper()->fetchBody(aMail); |
166 | } | 166 | } |
167 | 167 | ||
168 | QPopupMenu * POP3folderItem::getContextMenu() | 168 | QPopupMenu * POP3folderItem::getContextMenu() |
169 | { | 169 | { |
@@ -236,13 +236,13 @@ NNTPviewItem::~NNTPviewItem() | |||
236 | 236 | ||
237 | AbstractMail *NNTPviewItem::getWrapper() | 237 | AbstractMail *NNTPviewItem::getWrapper() |
238 | { | 238 | { |
239 | return wrapper; | 239 | return wrapper; |
240 | } | 240 | } |
241 | 241 | ||
242 | void NNTPviewItem::refresh( QList<RecMail> & ) | 242 | void NNTPviewItem::refresh( QValueList<RecMailP> & ) |
243 | { | 243 | { |
244 | refresh(); | 244 | refresh(); |
245 | } | 245 | } |
246 | 246 | ||
247 | void NNTPviewItem::refresh() | 247 | void NNTPviewItem::refresh() |
248 | { | 248 | { |
@@ -263,13 +263,13 @@ void NNTPviewItem::refresh() | |||
263 | item = new NNTPfolderItem( (*it), this , item ); | 263 | item = new NNTPfolderItem( (*it), this , item ); |
264 | item->setSelectable( (*it)->may_select()); | 264 | item->setSelectable( (*it)->may_select()); |
265 | } | 265 | } |
266 | delete folders; | 266 | delete folders; |
267 | } | 267 | } |
268 | 268 | ||
269 | RecBody NNTPviewItem::fetchBody( const RecMail &mail ) | 269 | RecBody NNTPviewItem::fetchBody( const RecMailP &mail ) |
270 | { | 270 | { |
271 | qDebug( "NNTP fetchBody" ); | 271 | qDebug( "NNTP fetchBody" ); |
272 | return wrapper->fetchBody( mail ); | 272 | return wrapper->fetchBody( mail ); |
273 | } | 273 | } |
274 | 274 | ||
275 | QPopupMenu * NNTPviewItem::getContextMenu() | 275 | QPopupMenu * NNTPviewItem::getContextMenu() |
@@ -355,19 +355,19 @@ NNTPfolderItem::NNTPfolderItem( const FolderP &folderInit, NNTPviewItem *parent | |||
355 | { | 355 | { |
356 | setPixmap( 0, PIXMAP_INBOXFOLDER); | 356 | setPixmap( 0, PIXMAP_INBOXFOLDER); |
357 | } | 357 | } |
358 | setText( 0, folder->getDisplayName() ); | 358 | setText( 0, folder->getDisplayName() ); |
359 | } | 359 | } |
360 | 360 | ||
361 | void NNTPfolderItem::refresh(QList<RecMail>&target) | 361 | void NNTPfolderItem::refresh(QValueList<RecMailP>&target) |
362 | { | 362 | { |
363 | if (folder->may_select()) | 363 | if (folder->may_select()) |
364 | nntp->getWrapper()->listMessages( folder->getName(),target ); | 364 | nntp->getWrapper()->listMessages( folder->getName(),target ); |
365 | } | 365 | } |
366 | 366 | ||
367 | RecBody NNTPfolderItem::fetchBody(const RecMail&aMail) | 367 | RecBody NNTPfolderItem::fetchBody(const RecMailP&aMail) |
368 | { | 368 | { |
369 | return nntp->getWrapper()->fetchBody(aMail); | 369 | return nntp->getWrapper()->fetchBody(aMail); |
370 | } | 370 | } |
371 | 371 | ||
372 | QPopupMenu * NNTPfolderItem::getContextMenu() | 372 | QPopupMenu * NNTPfolderItem::getContextMenu() |
373 | { | 373 | { |
@@ -425,13 +425,13 @@ IMAPviewItem::~IMAPviewItem() | |||
425 | 425 | ||
426 | AbstractMail *IMAPviewItem::getWrapper() | 426 | AbstractMail *IMAPviewItem::getWrapper() |
427 | { | 427 | { |
428 | return wrapper; | 428 | return wrapper; |
429 | } | 429 | } |
430 | 430 | ||
431 | void IMAPviewItem::refresh(QList<RecMail>&) | 431 | void IMAPviewItem::refresh(QValueList<RecMailP>&) |
432 | { | 432 | { |
433 | refreshFolders(false); | 433 | refreshFolders(false); |
434 | } | 434 | } |
435 | 435 | ||
436 | const QStringList&IMAPviewItem::subFolders() | 436 | const QStringList&IMAPviewItem::subFolders() |
437 | { | 437 | { |
@@ -558,13 +558,13 @@ void IMAPviewItem::contextMenuSelected(int id) | |||
558 | break; | 558 | break; |
559 | default: | 559 | default: |
560 | break; | 560 | break; |
561 | } | 561 | } |
562 | } | 562 | } |
563 | 563 | ||
564 | RecBody IMAPviewItem::fetchBody(const RecMail&) | 564 | RecBody IMAPviewItem::fetchBody(const RecMailP&) |
565 | { | 565 | { |
566 | return RecBody(); | 566 | return RecBody(); |
567 | } | 567 | } |
568 | 568 | ||
569 | bool IMAPviewItem::offline() | 569 | bool IMAPviewItem::offline() |
570 | { | 570 | { |
@@ -606,25 +606,25 @@ IMAPfolderItem::~IMAPfolderItem() | |||
606 | 606 | ||
607 | const QString& IMAPfolderItem::Delemiter()const | 607 | const QString& IMAPfolderItem::Delemiter()const |
608 | { | 608 | { |
609 | return folder->Separator(); | 609 | return folder->Separator(); |
610 | } | 610 | } |
611 | 611 | ||
612 | void IMAPfolderItem::refresh(QList<RecMail>&target) | 612 | void IMAPfolderItem::refresh(QValueList<RecMailP>&target) |
613 | { | 613 | { |
614 | if (folder->may_select()) | 614 | if (folder->may_select()) |
615 | { | 615 | { |
616 | imap->getWrapper()->listMessages( folder->getName(),target ); | 616 | imap->getWrapper()->listMessages( folder->getName(),target ); |
617 | } | 617 | } |
618 | else | 618 | else |
619 | { | 619 | { |
620 | target.clear(); | 620 | target.clear(); |
621 | } | 621 | } |
622 | } | 622 | } |
623 | 623 | ||
624 | RecBody IMAPfolderItem::fetchBody(const RecMail&aMail) | 624 | RecBody IMAPfolderItem::fetchBody(const RecMailP&aMail) |
625 | { | 625 | { |
626 | return imap->getWrapper()->fetchBody(aMail); | 626 | return imap->getWrapper()->fetchBody(aMail); |
627 | } | 627 | } |
628 | 628 | ||
629 | QPopupMenu * IMAPfolderItem::getContextMenu() | 629 | QPopupMenu * IMAPfolderItem::getContextMenu() |
630 | { | 630 | { |
@@ -745,13 +745,13 @@ MHviewItem::~MHviewItem() | |||
745 | 745 | ||
746 | AbstractMail *MHviewItem::getWrapper() | 746 | AbstractMail *MHviewItem::getWrapper() |
747 | { | 747 | { |
748 | return wrapper; | 748 | return wrapper; |
749 | } | 749 | } |
750 | 750 | ||
751 | void MHviewItem::refresh( QList<RecMail> & target) | 751 | void MHviewItem::refresh( QValueList<RecMailP> & target) |
752 | { | 752 | { |
753 | refresh(false); | 753 | refresh(false); |
754 | getWrapper()->listMessages( "",target ); | 754 | getWrapper()->listMessages( "",target ); |
755 | } | 755 | } |
756 | 756 | ||
757 | void MHviewItem::refresh(bool force) | 757 | void MHviewItem::refresh(bool force) |
@@ -796,13 +796,13 @@ void MHviewItem::refresh(bool force) | |||
796 | } | 796 | } |
797 | item->setSelectable((*it)->may_select()); | 797 | item->setSelectable((*it)->may_select()); |
798 | } | 798 | } |
799 | delete folders; | 799 | delete folders; |
800 | } | 800 | } |
801 | 801 | ||
802 | RecBody MHviewItem::fetchBody( const RecMail &mail ) | 802 | RecBody MHviewItem::fetchBody( const RecMailP &mail ) |
803 | { | 803 | { |
804 | qDebug( "MH fetchBody" ); | 804 | qDebug( "MH fetchBody" ); |
805 | return wrapper->fetchBody( mail ); | 805 | return wrapper->fetchBody( mail ); |
806 | } | 806 | } |
807 | 807 | ||
808 | QPopupMenu * MHviewItem::getContextMenu() | 808 | QPopupMenu * MHviewItem::getContextMenu() |
@@ -911,19 +911,19 @@ void MHfolderItem::initName() | |||
911 | 911 | ||
912 | const FolderP&MHfolderItem::getFolder()const | 912 | const FolderP&MHfolderItem::getFolder()const |
913 | { | 913 | { |
914 | return folder; | 914 | return folder; |
915 | } | 915 | } |
916 | 916 | ||
917 | void MHfolderItem::refresh(QList<RecMail>&target) | 917 | void MHfolderItem::refresh(QValueList<RecMailP>&target) |
918 | { | 918 | { |
919 | if (folder->may_select()) | 919 | if (folder->may_select()) |
920 | mbox->getWrapper()->listMessages( folder->getName(),target ); | 920 | mbox->getWrapper()->listMessages( folder->getName(),target ); |
921 | } | 921 | } |
922 | 922 | ||
923 | RecBody MHfolderItem::fetchBody(const RecMail&aMail) | 923 | RecBody MHfolderItem::fetchBody(const RecMailP&aMail) |
924 | { | 924 | { |
925 | return mbox->getWrapper()->fetchBody(aMail); | 925 | return mbox->getWrapper()->fetchBody(aMail); |
926 | } | 926 | } |
927 | 927 | ||
928 | void MHfolderItem::deleteFolder() | 928 | void MHfolderItem::deleteFolder() |
929 | { | 929 | { |
@@ -1039,13 +1039,13 @@ AccountViewItem::AccountViewItem( QListViewItem *parent) | |||
1039 | AccountViewItem::AccountViewItem( QListViewItem *parent , QListViewItem*after ) | 1039 | AccountViewItem::AccountViewItem( QListViewItem *parent , QListViewItem*after ) |
1040 | :QListViewItem( parent,after ),folder(0) | 1040 | :QListViewItem( parent,after ),folder(0) |
1041 | { | 1041 | { |
1042 | init(); | 1042 | init(); |
1043 | } | 1043 | } |
1044 | 1044 | ||
1045 | AccountViewItem::AccountViewItem( const Opie::osmart_pointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ) | 1045 | AccountViewItem::AccountViewItem( const Opie::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ) |
1046 | :QListViewItem( parent,after ),folder(folderInit) | 1046 | :QListViewItem( parent,after ),folder(folderInit) |
1047 | { | 1047 | { |
1048 | init(); | 1048 | init(); |
1049 | } | 1049 | } |
1050 | 1050 | ||
1051 | void AccountViewItem::init() | 1051 | void AccountViewItem::init() |