Initializes seqDumpPos on qiodevice.cpp

This was spotted by RIM static code checking team. seqDumpPos is a dummy
variable which is only used on sequential mode. It is used as a
simultaneous storage area of both pPos and pDevicePos when in sequential mode,
to keep both in sync. They just suggested that it would be a good practice to
initialize the variable, since it does not have any side effect, and there's
not much value on not doing it.

Change-Id: I8138729eb31df5779c91b368c2cfaecd39788f29
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
This commit is contained in:
Nick Ratelle 2012-01-06 12:19:27 -05:00 committed by Qt by Nokia
parent d5268eabfb
commit e7e8799304

View File

@ -118,7 +118,7 @@ void debugBinaryString(const char *data, qint64 maxlen)
*/ */
QIODevicePrivate::QIODevicePrivate() QIODevicePrivate::QIODevicePrivate()
: openMode(QIODevice::NotOpen), buffer(QIODEVICE_BUFFERSIZE), : openMode(QIODevice::NotOpen), buffer(QIODEVICE_BUFFERSIZE),
pos(0), devicePos(0) pos(0), devicePos(0), seqDumpPos(0)
, pPos(&pos), pDevicePos(&devicePos) , pPos(&pos), pDevicePos(&devicePos)
, baseReadLineDataCalled(false) , baseReadLineDataCalled(false)
, firstRead(true) , firstRead(true)
@ -562,6 +562,7 @@ void QIODevice::close()
d->openMode = NotOpen; d->openMode = NotOpen;
d->errorString.clear(); d->errorString.clear();
d->pos = 0; d->pos = 0;
d->seqDumpPos = 0;
d->buffer.clear(); d->buffer.clear();
d->firstRead = true; d->firstRead = true;
} }