diff options
Diffstat (limited to 'src/corelib/io/qtextstream.cpp')
-rw-r--r-- | src/corelib/io/qtextstream.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index 730329d21d..5f3177e58f 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -681,15 +681,9 @@ bool QTextStreamPrivate::scan(const QChar **ptr, int *length, int maxlen, TokenD && (!maxlen || totalSize < maxlen) && (device && (canStillReadFromDevice = fillReadBuffer()))); - // if the token was not found, but we reached the end of input, - // then we accept what we got. if we are not at the end of input, - // we return false. - if (!foundToken && (!maxlen || totalSize < maxlen) - && (totalSize == 0 - || (string && stringOffset + totalSize < string->size()) - || (device && !device->atEnd() && canStillReadFromDevice))) { + if (totalSize == 0) { #if defined (QTEXTSTREAM_DEBUG) - qDebug("QTextStreamPrivate::scan() did not find the token."); + qDebug("QTextStreamPrivate::scan() reached the end of input."); #endif return false; } |