-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 @@ -71,6 +71,7 @@ void IMAPviewItem::refresh(QList<RecMail>&) Folder *it; + QListViewItem*item = 0; for ( it = folders->first(); it; it = folders->next() ) { - (void) new IMAPfolderItem( it, this ); + item = new IMAPfolderItem( it, this , item ); } } @@ -86,6 +87,6 @@ IMAPfolderItem::~IMAPfolderItem() } -IMAPfolderItem::IMAPfolderItem( Folder *folderInit, IMAPviewItem *parent ) - : AccountViewItem( parent ) +IMAPfolderItem::IMAPfolderItem( Folder *folderInit, IMAPviewItem *parent , QListViewItem*after ) + : AccountViewItem( parent,after ) { folder = folderInit; @@ -114,4 +115,5 @@ AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) connect( this, SIGNAL( clicked( QListViewItem * ) ), SLOT( refresh( QListViewItem * ) ) ); + setSorting(-1); } 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 @@ -18,5 +18,6 @@ class AccountViewItem : public QListViewItem public: AccountViewItem( QListView *parent ) : QListViewItem( parent ) {} - AccountViewItem( QListViewItem *parent ) : QListViewItem( parent ) {} + AccountViewItem( QListViewItem *parent) : QListViewItem( parent) {} + AccountViewItem( QListViewItem *parent , QListViewItem*after ) : QListViewItem( parent,after ) {} virtual void refresh(QList<RecMail>&)=0; virtual RecBody fetchBody(const RecMail&)=0; @@ -56,5 +57,5 @@ class IMAPfolderItem : public AccountViewItem public: - IMAPfolderItem( Folder *folder, IMAPviewItem *parent ); + IMAPfolderItem( Folder *folder, IMAPviewItem *parent , QListViewItem*after ); ~IMAPfolderItem(); virtual void refresh(QList<RecMail>&); |