-rw-r--r-- | kmicromail/accountview.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp index e9be224..6227f6d 100644 --- a/kmicromail/accountview.cpp +++ b/kmicromail/accountview.cpp | |||
@@ -82,48 +82,50 @@ void AccountView::populate( QList<Account> list ) | |||
82 | { | 82 | { |
83 | NNTPaccount *nntp = static_cast<NNTPaccount *>(it); | 83 | NNTPaccount *nntp = static_cast<NNTPaccount *>(it); |
84 | /* must not be hold 'cause it isn't required */ | 84 | /* must not be hold 'cause it isn't required */ |
85 | (void) new NNTPviewItem( nntp, this ); | 85 | (void) new NNTPviewItem( nntp, this ); |
86 | } | 86 | } |
87 | } | 87 | } |
88 | } | 88 | } |
89 | 89 | ||
90 | void AccountView::refresh(QListViewItem *item) | 90 | void AccountView::refresh(QListViewItem *item) |
91 | { | 91 | { |
92 | if ( item ) | 92 | if ( item ) |
93 | { | 93 | { |
94 | m_currentItem = item; | 94 | m_currentItem = item; |
95 | QValueList<RecMailP> headerlist; | 95 | QValueList<RecMailP> headerlist; |
96 | AccountViewItem *view = static_cast<AccountViewItem *>(item); | 96 | AccountViewItem *view = static_cast<AccountViewItem *>(item); |
97 | view->refresh(headerlist); | 97 | view->refresh(headerlist); |
98 | emit refreshMailview(headerlist); | 98 | emit refreshMailview(headerlist); |
99 | } | 99 | } |
100 | } | 100 | } |
101 | void AccountView::refreshOutgoing() | 101 | void AccountView::refreshOutgoing() |
102 | { | 102 | { |
103 | m_currentItem = currentItem(); | 103 | m_currentItem = currentItem(); |
104 | if ( !m_currentItem ) return; | 104 | if ( !m_currentItem ) return; |
105 | AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); | 105 | AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); |
106 | if ( !view->getFolder() ) | ||
107 | return; | ||
106 | QString bName = view->getFolder()->getDisplayName(); | 108 | QString bName = view->getFolder()->getDisplayName(); |
107 | if (bName.startsWith("/")&&bName.length()>1) | 109 | if (bName.startsWith("/")&&bName.length()>1) |
108 | { | 110 | { |
109 | bName.replace(0,1,""); | 111 | bName.replace(0,1,""); |
110 | } | 112 | } |
111 | int pos = bName.findRev("/"); | 113 | int pos = bName.findRev("/"); |
112 | if (pos > 0) | 114 | if (pos > 0) |
113 | { | 115 | { |
114 | bName.replace(0,pos+1,""); | 116 | bName.replace(0,pos+1,""); |
115 | } | 117 | } |
116 | //qDebug("name *%s* ",bName.lower().latin1() ); | 118 | //qDebug("name *%s* ",bName.lower().latin1() ); |
117 | if ( bName.lower() == "outgoing" || bName.lower() == "sent" || bName.lower() == "sendfailed" ) { | 119 | if ( bName.lower() == "outgoing" || bName.lower() == "sent" || bName.lower() == "sendfailed" ) { |
118 | refreshCurrent(); | 120 | refreshCurrent(); |
119 | // qDebug("refresh "); | 121 | // qDebug("refresh "); |
120 | } | 122 | } |
121 | } | 123 | } |
122 | 124 | ||
123 | void AccountView::refreshCurrent() | 125 | void AccountView::refreshCurrent() |
124 | { | 126 | { |
125 | m_currentItem = currentItem(); | 127 | m_currentItem = currentItem(); |
126 | if ( !m_currentItem ) return; | 128 | if ( !m_currentItem ) return; |
127 | QValueList<RecMailP> headerlist; | 129 | QValueList<RecMailP> headerlist; |
128 | AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); | 130 | AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); |
129 | view->refresh(headerlist); | 131 | view->refresh(headerlist); |