Lines 37-42
Link Here
|
37 |
m_stream( 0 ), |
37 |
m_stream( 0 ), |
38 |
m_current_line( new QString( QString::null ) ), |
38 |
m_current_line( new QString( QString::null ) ), |
39 |
m_current_id( new QString( QString::null ) ), |
39 |
m_current_id( new QString( QString::null ) ), |
|
|
40 |
m_atend( true ), |
40 |
m_prev_time( 0 ), |
41 |
m_prev_time( 0 ), |
41 |
m_only_new( onlynew ), |
42 |
m_only_new( onlynew ), |
42 |
m_savetime( savetime ), |
43 |
m_savetime( savetime ), |
Lines 77-92
Link Here
|
77 |
if( !m_stream ) |
78 |
if( !m_stream ) |
78 |
return true; |
79 |
return true; |
79 |
|
80 |
|
80 |
if( m_stream->atEnd() ) |
81 |
*m_current_line = m_stream->readLine(); |
|
|
82 |
m_atend = m_current_line->isNull(); |
83 |
if( m_atend ) // Cursor was at EOF |
81 |
{ |
84 |
{ |
82 |
*m_current_line = QString::null; |
|
|
83 |
*m_current_id = QString::null; |
85 |
*m_current_id = QString::null; |
84 |
m_prev_status = m_status; |
86 |
m_prev_status = m_status; |
85 |
return true; |
87 |
return true; |
86 |
} |
88 |
} |
87 |
|
89 |
|
88 |
*m_current_line = m_stream->readLine(); |
|
|
89 |
|
90 |
//New message |
90 |
//New message |
91 |
if( m_current_line->left( 5 ) == "From " ) |
91 |
if( m_current_line->left( 5 ) == "From " ) |
92 |
{ |
92 |
{ |
Lines 115-121
Link Here
|
115 |
if( !m_stream ) |
115 |
if( !m_stream ) |
116 |
return false; |
116 |
return false; |
117 |
|
117 |
|
118 |
while( !m_stream->atEnd() && *m_current_id != id ) |
118 |
while( !m_atend && *m_current_id != id ) |
119 |
nextLine(); |
119 |
nextLine(); |
120 |
|
120 |
|
121 |
return *m_current_id == id; |
121 |
return *m_current_id == id; |
Lines 138-143
Link Here
|
138 |
{ |
138 |
{ |
139 |
if( m_stream ) |
139 |
if( m_stream ) |
140 |
m_stream->device()->reset(); |
140 |
m_stream->device()->reset(); |
|
|
141 |
m_atend = m_stream->atEnd(); |
141 |
} |
142 |
} |
142 |
|
143 |
|
143 |
bool ReadMBox::atEnd() const |
144 |
bool ReadMBox::atEnd() const |
Lines 145-151
Link Here
|
145 |
if( !m_stream ) |
146 |
if( !m_stream ) |
146 |
return true; |
147 |
return true; |
147 |
|
148 |
|
148 |
return m_stream->atEnd() || ( m_info->type() == UrlInfo::message && *m_current_id != m_info->id() ); |
149 |
return m_atend || ( m_info->type() == UrlInfo::message && *m_current_id != m_info->id() ); |
149 |
} |
150 |
} |
150 |
|
151 |
|
151 |
bool ReadMBox::inListing() const |
152 |
bool ReadMBox::inListing() const |