diff options
author | Morten Engvoldsen <morten.engvoldsen@nokia.com> | 2009-05-08 11:02:01 (GMT) |
---|---|---|
committer | Morten Engvoldsen <morten.engvoldsen@nokia.com> | 2009-05-08 11:02:55 (GMT) |
commit | fafd6f5a43d72e91bc511b9738eae6f087eb8073 (patch) | |
tree | 05478d614d2e8d5c786827305ab880897e4debec /src/corelib/io | |
parent | 4f1f40791ed7e6aec845752680c525efbcb9be84 (diff) | |
download | Qt-fafd6f5a43d72e91bc511b9738eae6f087eb8073.zip Qt-fafd6f5a43d72e91bc511b9738eae6f087eb8073.tar.gz Qt-fafd6f5a43d72e91bc511b9738eae6f087eb8073.tar.bz2 |
Added further explanation on the note about stdin and QTextsStream::atEnd()
Explained why you cannot use stdin and atEnd() together.
Task-number:251171
Rev-by: Andreas Aardal Hanssen
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qtextstream.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index ed9d0aa..1167671 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -67,8 +67,10 @@ static const int QTEXTSTREAM_BUFFERSIZE = 16384; \snippet doc/src/snippets/code/src_corelib_io_qtextstream.cpp 1 Note that you cannot use QTextStream::atEnd(), which returns true when you - have reached the end of the data stream, with stdin. - + have reached the end of the data stream, with stdin. The reason for this is + that as long as stdin doesn't give any input to the QTextStream, \c atEnd() + will return true even if the stdin is open and waiting for more characters. + Besides using QTextStream's constructors, you can also set the device or string QTextStream operates on by calling setDevice() or setString(). You can seek to a position by calling seek(), and |