summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-03-15 14:26:41 (GMT)
committerSamuli Piippo <samuli.piippo@digia.com>2011-06-09 10:05:14 (GMT)
commit708205d04d8add5f8c4d6c588a814868b53d8fc2 (patch)
tree90f071b94ab0539bddf8583ea6f65d7f0734c19f /src/corelib
parent2f12b5a5d23197b04f4807978704e7c79d5da594 (diff)
downloadQt-708205d04d8add5f8c4d6c588a814868b53d8fc2.zip
Qt-708205d04d8add5f8c4d6c588a814868b53d8fc2.tar.gz
Qt-708205d04d8add5f8c4d6c588a814868b53d8fc2.tar.bz2
QNetworkReply: Fix canReadLine()
Reviewed-by: Peter Hartmann (cherry picked from commit dd6c5cad88a56fb3a342fe9d4fc3b113ffe3fd53)
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qbytedata_p.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/tools/qbytedata_p.h b/src/corelib/tools/qbytedata_p.h
index fb1fa64..f59d8eb 100644
--- a/src/corelib/tools/qbytedata_p.h
+++ b/src/corelib/tools/qbytedata_p.h
@@ -206,6 +206,13 @@ public:
{
return buffers[i];
}
+
+ inline bool canReadLine() const {
+ for (int i = 0; i < buffers.length(); i++)
+ if (buffers.at(i).contains('\n'))
+ return true;
+ return false;
+ }
};
QT_END_NAMESPACE