-rw-r--r-- | noncore/net/mail/accountview.cpp | 8 | ||||
-rw-r--r-- | noncore/net/mail/accountview.h | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index ac4f0e0..847b099 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp | |||
@@ -70,8 +70,9 @@ void IMAPviewItem::refresh(QList<RecMail>&) | |||
70 | } | 70 | } |
71 | 71 | ||
72 | Folder *it; | 72 | Folder *it; |
73 | QListViewItem*item = 0; | ||
73 | for ( it = folders->first(); it; it = folders->next() ) { | 74 | for ( it = folders->first(); it; it = folders->next() ) { |
74 | (void) new IMAPfolderItem( it, this ); | 75 | item = new IMAPfolderItem( it, this , item ); |
75 | } | 76 | } |
76 | } | 77 | } |
77 | 78 | ||
@@ -85,8 +86,8 @@ IMAPfolderItem::~IMAPfolderItem() | |||
85 | delete folder; | 86 | delete folder; |
86 | } | 87 | } |
87 | 88 | ||
88 | IMAPfolderItem::IMAPfolderItem( Folder *folderInit, IMAPviewItem *parent ) | 89 | IMAPfolderItem::IMAPfolderItem( Folder *folderInit, IMAPviewItem *parent , QListViewItem*after ) |
89 | : AccountViewItem( parent ) | 90 | : AccountViewItem( parent,after ) |
90 | { | 91 | { |
91 | folder = folderInit; | 92 | folder = folderInit; |
92 | imap = parent; | 93 | imap = parent; |
@@ -113,6 +114,7 @@ AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) | |||
113 | { | 114 | { |
114 | connect( this, SIGNAL( clicked( QListViewItem * ) ), | 115 | connect( this, SIGNAL( clicked( QListViewItem * ) ), |
115 | SLOT( refresh( QListViewItem * ) ) ); | 116 | SLOT( refresh( QListViewItem * ) ) ); |
117 | setSorting(-1); | ||
116 | } | 118 | } |
117 | 119 | ||
118 | void AccountView::populate( QList<Account> list ) | 120 | void AccountView::populate( QList<Account> list ) |
diff --git a/noncore/net/mail/accountview.h b/noncore/net/mail/accountview.h index cdc87ce..04f9b7a 100644 --- a/noncore/net/mail/accountview.h +++ b/noncore/net/mail/accountview.h | |||
@@ -17,7 +17,8 @@ class AccountViewItem : public QListViewItem | |||
17 | 17 | ||
18 | public: | 18 | public: |
19 | AccountViewItem( QListView *parent ) : QListViewItem( parent ) {} | 19 | AccountViewItem( QListView *parent ) : QListViewItem( parent ) {} |
20 | AccountViewItem( QListViewItem *parent ) : QListViewItem( parent ) {} | 20 | AccountViewItem( QListViewItem *parent) : QListViewItem( parent) {} |
21 | AccountViewItem( QListViewItem *parent , QListViewItem*after ) : QListViewItem( parent,after ) {} | ||
21 | virtual void refresh(QList<RecMail>&)=0; | 22 | virtual void refresh(QList<RecMail>&)=0; |
22 | virtual RecBody fetchBody(const RecMail&)=0; | 23 | virtual RecBody fetchBody(const RecMail&)=0; |
23 | }; | 24 | }; |
@@ -55,7 +56,7 @@ class IMAPfolderItem : public AccountViewItem | |||
55 | { | 56 | { |
56 | 57 | ||
57 | public: | 58 | public: |
58 | IMAPfolderItem( Folder *folder, IMAPviewItem *parent ); | 59 | IMAPfolderItem( Folder *folder, IMAPviewItem *parent , QListViewItem*after ); |
59 | ~IMAPfolderItem(); | 60 | ~IMAPfolderItem(); |
60 | virtual void refresh(QList<RecMail>&); | 61 | virtual void refresh(QList<RecMail>&); |
61 | virtual RecBody fetchBody(const RecMail&); | 62 | virtual RecBody fetchBody(const RecMail&); |