--- a/src/corelib/io/qiodevice_p.h Tue Jul 06 15:10:48 2010 +0300
+++ b/src/corelib/io/qiodevice_p.h Wed Aug 18 10:37:55 2010 +0300
@@ -151,6 +151,15 @@
len++;
*first = c;
}
+ void ungetBlock(const char* block, int size) {
+ if ((first - buf) < size) {
+ // underflow, the existing valid data needs to move to the end of the (potentially bigger) buffer
+ makeSpace(len + size, freeSpaceAtStart);
+ }
+ first -= size;
+ len += size;
+ memcpy(first, block, size);
+ }
private:
enum FreeSpacePos {freeSpaceAtStart, freeSpaceAtEnd};
@@ -222,7 +231,9 @@
accessMode = q_func()->isSequential() ? Sequential : RandomAccess;
return accessMode == Sequential;
}
-
+
+ virtual qint64 peek(char *data, qint64 maxSize);
+ virtual QByteArray peek(qint64 maxSize);
#ifdef QT_NO_QOBJECT
QIODevice *q_ptr;