-rw-r--r-- | qmake/tools/qbuffer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qmake/tools/qbuffer.cpp b/qmake/tools/qbuffer.cpp index b213dd9..0fc90e4 100644 --- a/qmake/tools/qbuffer.cpp +++ b/qmake/tools/qbuffer.cpp | |||
@@ -175,50 +175,50 @@ bool QBuffer::setBuffer( QByteArray buf ) | |||
175 | otherwise returns FALSE. The buffer must be opened before use. | 175 | otherwise returns FALSE. The buffer must be opened before use. |
176 | 176 | ||
177 | The mode parameter \a m must be a combination of the following flags. | 177 | The mode parameter \a m must be a combination of the following flags. |
178 | \list | 178 | \list |
179 | \i \c IO_ReadOnly opens the buffer in read-only mode. | 179 | \i \c IO_ReadOnly opens the buffer in read-only mode. |
180 | \i \c IO_WriteOnly opens the buffer in write-only mode. | 180 | \i \c IO_WriteOnly opens the buffer in write-only mode. |
181 | \i \c IO_ReadWrite opens the buffer in read/write mode. | 181 | \i \c IO_ReadWrite opens the buffer in read/write mode. |
182 | \i \c IO_Append sets the buffer index to the end of the buffer. | 182 | \i \c IO_Append sets the buffer index to the end of the buffer. |
183 | \i \c IO_Truncate truncates the buffer. | 183 | \i \c IO_Truncate truncates the buffer. |
184 | \endlist | 184 | \endlist |
185 | 185 | ||
186 | \sa close(), isOpen() | 186 | \sa close(), isOpen() |
187 | */ | 187 | */ |
188 | 188 | ||
189 | bool QBuffer::open( int m ) | 189 | bool QBuffer::open( int m ) |
190 | { | 190 | { |
191 | if ( isOpen() ) { // buffer already open | 191 | if ( isOpen() ) { // buffer already open |
192 | #if defined(QT_CHECK_STATE) | 192 | #if defined(QT_CHECK_STATE) |
193 | qWarning( "QBuffer::open: Buffer already open" ); | 193 | qWarning( "QBuffer::open: Buffer already open" ); |
194 | #endif | 194 | #endif |
195 | return FALSE; | 195 | return FALSE; |
196 | } | 196 | } |
197 | setMode( m ); | 197 | setMode( m ); |
198 | if ( m & IO_Truncate ) { // truncate buffer | 198 | if ( m & IO_Truncate ) { // truncate buffer |
199 | a.resize( 0 ); | 199 | a.resize( 1 ); |
200 | a_len = 0; | 200 | a_len = 1; |
201 | } | 201 | } |
202 | if ( m & IO_Append ) { // append to end of buffer | 202 | if ( m & IO_Append ) { // append to end of buffer |
203 | ioIndex = a.size(); | 203 | ioIndex = a.size(); |
204 | } else { | 204 | } else { |
205 | ioIndex = 0; | 205 | ioIndex = 0; |
206 | } | 206 | } |
207 | a_inc = 16; | 207 | a_inc = 16; |
208 | setState( IO_Open ); | 208 | setState( IO_Open ); |
209 | setStatus( 0 ); | 209 | setStatus( 0 ); |
210 | return TRUE; | 210 | return TRUE; |
211 | } | 211 | } |
212 | 212 | ||
213 | /*! | 213 | /*! |
214 | \reimp | 214 | \reimp |
215 | 215 | ||
216 | Closes an open buffer. | 216 | Closes an open buffer. |
217 | 217 | ||
218 | \sa open() | 218 | \sa open() |
219 | */ | 219 | */ |
220 | 220 | ||
221 | void QBuffer::close() | 221 | void QBuffer::close() |
222 | { | 222 | { |
223 | if ( isOpen() ) { | 223 | if ( isOpen() ) { |
224 | setFlags( IO_Direct ); | 224 | setFlags( IO_Direct ); |