qbuffer.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/io/qbuffer.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5class QBufferPrivate : public QIODevicePrivate-
6{-
7 inline QBuffer* q_func() { return static_cast<QBuffer *>(q_ptr); } inline const QBuffer* q_func() const { return static_cast<const QBuffer *>(q_ptr); } friend class QBuffer;-
8-
9public:-
10 QBufferPrivate()-
11 : buf(0)-
12-
13 , writtenSinceLastEmit(0), signalConnectionCount(0), signalsEmitted(false)-
14-
15 { }
executed 11235 times by 81 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QHttpNetworkReply
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • ...
11235
16 ~QBufferPrivate() { }-
17-
18 QByteArray *buf;-
19 QByteArray defaultBuf;-
20-
21 virtual qint64 peek(char *data, qint64 maxSize) override;-
22 virtual QByteArray peek(qint64 maxSize) override;-
23-
24-
25-
26 void _q_emitSignals();-
27-
28 qint64 writtenSinceLastEmit;-
29 int signalConnectionCount;-
30 bool signalsEmitted;-
31-
32};-
33-
34-
35void QBufferPrivate::_q_emitSignals()-
36{-
37 QBuffer * const q = q_func();-
38 q->bytesWritten(writtenSinceLastEmit);-
39 writtenSinceLastEmit = 0;-
40 q->readyRead();-
41 signalsEmitted = false;-
42}
executed 30 times by 1 test: end of block
Executed by:
  • tst_QBuffer
30
43-
44-
45qint64 QBufferPrivate::peek(char *data, qint64 maxSize)-
46{-
47 qint64 readBytes = qMin(maxSize, static_cast<qint64>(buf->size()) - pos);-
48 memcpy(data, buf->constData() + pos, readBytes);-
49 return
executed 1423 times by 12 tests: return readBytes;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QPixmap
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
readBytes;
executed 1423 times by 12 tests: return readBytes;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QPixmap
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
1423
50}-
51-
52QByteArray QBufferPrivate::peek(qint64 maxSize)-
53{-
54 qint64 readBytes = qMin(maxSize, static_cast<qint64>(buf->size()) - pos);-
55 if (pos == 0
pos == 0Description
TRUEevaluated 115 times by 10 tests
Evaluated by:
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QMimeDatabase
  • tst_QPixmap
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
FALSEevaluated 100 times by 8 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QPixmap
&& maxSize >= buf->size()
maxSize >= buf->size()Description
TRUEevaluated 42 times by 3 tests
Evaluated by:
  • tst_QIODevice
  • tst_QImage
  • tst_QMimeDatabase
FALSEevaluated 73 times by 7 tests
Evaluated by:
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImageReader
  • tst_QPixmap
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
)
42-115
56 return
executed 42 times by 3 tests: return *buf;
Executed by:
  • tst_QIODevice
  • tst_QImage
  • tst_QMimeDatabase
*buf;
executed 42 times by 3 tests: return *buf;
Executed by:
  • tst_QIODevice
  • tst_QImage
  • tst_QMimeDatabase
42
57 return
executed 173 times by 12 tests: return QByteArray(buf->constData() + pos, readBytes);
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QPixmap
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
QByteArray(buf->constData() + pos, readBytes);
executed 173 times by 12 tests: return QByteArray(buf->constData() + pos, readBytes);
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QPixmap
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
173
58}-
59QBuffer::QBuffer(QObject *parent)-
60 : QIODevice(*new QBufferPrivate, parent)-
61{-
62 QBufferPrivate * const d = d_func();-
63 d->buf = &d->defaultBuf;-
64}
executed 1297 times by 41 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QFtp
  • tst_QGuiVariant
  • tst_QHttpNetworkReply
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QImage
  • tst_QImageReader
  • tst_QLabel
  • tst_QLoggingRegistry
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPlainTextEdit
  • tst_QPoint
  • ...
1297
65QBuffer::QBuffer(QByteArray *byteArray, QObject *parent)-
66 : QIODevice(*new QBufferPrivate, parent)-
67{-
68 QBufferPrivate * const d = d_func();-
69 d->buf = byteArray
byteArrayDescription
TRUEevaluated 9938 times by 64 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeyEvent
  • tst_QKeySequence
  • tst_QListWidget
  • ...
FALSEnever evaluated
? byteArray : &d->defaultBuf;
0-9938
70 d->defaultBuf.clear();-
71}
executed 9938 times by 64 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeyEvent
  • tst_QKeySequence
  • tst_QListWidget
  • ...
9938
72-
73-
74-
75-
76-
77-
78QBuffer::~QBuffer()-
79{-
80}-
81void QBuffer::setBuffer(QByteArray *byteArray)-
82{-
83 QBufferPrivate * const d = d_func();-
84 if (isOpen()
isOpen()Description
TRUEnever evaluated
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_QBuffer
) {
0-9
85 QMessageLogger(__FILE__, 240, __PRETTY_FUNCTION__).warning("QBuffer::setBuffer: Buffer is open");-
86 return;
never executed: return;
0
87 }-
88 if (byteArray
byteArrayDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QBuffer
FALSEnever evaluated
) {
0-9
89 d->buf = byteArray;-
90 }
executed 9 times by 1 test: end of block
Executed by:
  • tst_QBuffer
else {
9
91 d->buf = &d->defaultBuf;-
92 }
never executed: end of block
0
93 d->defaultBuf.clear();-
94}
executed 9 times by 1 test: end of block
Executed by:
  • tst_QBuffer
9
95QByteArray &QBuffer::buffer()-
96{-
97 QBufferPrivate * const d = d_func();-
98 return
executed 492 times by 12 tests: return *d->buf;
Executed by:
  • tst_QBuffer
  • tst_QDataStream
  • tst_QFtp
  • tst_QImageReader
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QTextStream
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_Spdy
*d->buf;
executed 492 times by 12 tests: return *d->buf;
Executed by:
  • tst_QBuffer
  • tst_QDataStream
  • tst_QFtp
  • tst_QImageReader
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QTextStream
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_Spdy
492
99}-
100-
101-
102-
103-
104-
105-
106-
107const QByteArray &QBuffer::buffer() const-
108{-
109 const QBufferPrivate * const d = d_func();-
110 return
executed 174 times by 3 tests: return *d->buf;
Executed by:
  • tst_QDataStream
  • tst_QLabel
  • tst_QPicture
*d->buf;
executed 174 times by 3 tests: return *d->buf;
Executed by:
  • tst_QDataStream
  • tst_QLabel
  • tst_QPicture
174
111}-
112const QByteArray &QBuffer::data() const-
113{-
114 const QBufferPrivate * const d = d_func();-
115 return
executed 25075 times by 12 tests: return *d->buf;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QBuffer
  • tst_QDataStream
  • tst_QImage
  • tst_QImageReader
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QPlainTextEdit
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QVariant
  • tst_QXmlStream
*d->buf;
executed 25075 times by 12 tests: return *d->buf;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QBuffer
  • tst_QDataStream
  • tst_QImage
  • tst_QImageReader
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QPlainTextEdit
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QVariant
  • tst_QXmlStream
25075
116}-
117void QBuffer::setData(const QByteArray &data)-
118{-
119 QBufferPrivate * const d = d_func();-
120 if (isOpen()
isOpen()Description
TRUEnever evaluated
FALSEevaluated 528 times by 29 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QGuiVariant
  • tst_QHttpNetworkReply
  • tst_QIcoImageFormat
  • tst_QImage
  • tst_QImageReader
  • tst_QLoggingRegistry
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QSizePolicy
  • tst_QTextStream
  • tst_QTranslator
  • tst_QUrl
  • tst_QVariant
  • tst_QVersionNumber
  • tst_QWidget
  • tst_QXmlInputSource
  • ...
) {
0-528
121 QMessageLogger(__FILE__, 303, __PRETTY_FUNCTION__).warning("QBuffer::setData: Buffer is open");-
122 return;
never executed: return;
0
123 }-
124 *d->buf = data;-
125}
executed 528 times by 29 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QGuiVariant
  • tst_QHttpNetworkReply
  • tst_QIcoImageFormat
  • tst_QImage
  • tst_QImageReader
  • tst_QLoggingRegistry
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QSizePolicy
  • tst_QTextStream
  • tst_QTranslator
  • tst_QUrl
  • tst_QVariant
  • tst_QVersionNumber
  • tst_QWidget
  • tst_QXmlInputSource
  • ...
528
126bool QBuffer::open(OpenMode flags)-
127{-
128 QBufferPrivate * const d = d_func();-
129-
130 if ((
(flags & (Appe...runcate)) != 0Description
TRUEevaluated 78 times by 5 tests
Evaluated by:
  • tst_QBuffer
  • tst_QDataStream
  • tst_QMetaObjectBuilder
  • tst_QPicture
  • tst_QPrinter
FALSEevaluated 11239 times by 80 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QHttpNetworkReply
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • ...
flags & (Append | Truncate)) != 0
(flags & (Appe...runcate)) != 0Description
TRUEevaluated 78 times by 5 tests
Evaluated by:
  • tst_QBuffer
  • tst_QDataStream
  • tst_QMetaObjectBuilder
  • tst_QPicture
  • tst_QPrinter
FALSEevaluated 11239 times by 80 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QHttpNetworkReply
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • ...
)
78-11239
131 flags |= WriteOnly;
executed 78 times by 5 tests: flags |= WriteOnly;
Executed by:
  • tst_QBuffer
  • tst_QDataStream
  • tst_QMetaObjectBuilder
  • tst_QPicture
  • tst_QPrinter
78
132 if ((
(flags & (Read...iteOnly)) == 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QBuffer
FALSEevaluated 11314 times by 80 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QHttpNetworkReply
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • ...
flags & (ReadOnly | WriteOnly)) == 0
(flags & (Read...iteOnly)) == 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QBuffer
FALSEevaluated 11314 times by 80 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QHttpNetworkReply
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • ...
) {
3-11314
133 QMessageLogger(__FILE__, 328, __PRETTY_FUNCTION__).warning("QBuffer::open: Buffer access not specified");-
134 return
executed 3 times by 1 test: return false;
Executed by:
  • tst_QBuffer
false;
executed 3 times by 1 test: return false;
Executed by:
  • tst_QBuffer
3
135 }-
136-
137 if ((
(flags & Truncate) == TruncateDescription
TRUEevaluated 52 times by 4 tests
Evaluated by:
  • tst_QBuffer
  • tst_QDataStream
  • tst_QPicture
  • tst_QPrinter
FALSEevaluated 11262 times by 80 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QHttpNetworkReply
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • ...
flags & Truncate) == Truncate
(flags & Truncate) == TruncateDescription
TRUEevaluated 52 times by 4 tests
Evaluated by:
  • tst_QBuffer
  • tst_QDataStream
  • tst_QPicture
  • tst_QPrinter
FALSEevaluated 11262 times by 80 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QHttpNetworkReply
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • ...
)
52-11262
138 d->buf->resize(0);
executed 52 times by 4 tests: d->buf->resize(0);
Executed by:
  • tst_QBuffer
  • tst_QDataStream
  • tst_QPicture
  • tst_QPrinter
52
139-
140 return
executed 11314 times by 80 tests: return QIODevice::open(flags | QIODevice::Unbuffered);
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QHttpNetworkReply
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • ...
QIODevice::open(flags | QIODevice::Unbuffered);
executed 11314 times by 80 tests: return QIODevice::open(flags | QIODevice::Unbuffered);
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QHttpNetworkReply
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • ...
11314
141}-
142-
143-
144-
145-
146void QBuffer::close()-
147{-
148 QIODevice::close();-
149}
executed 1836 times by 16 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QBitArray
  • tst_QBuffer
  • tst_QDataStream
  • tst_QFont
  • tst_QIcoImageFormat
  • tst_QImageReader
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QXmlStream
1836
150-
151-
152-
153-
154qint64 QBuffer::pos() const-
155{-
156 return
executed 9749910 times by 80 tests: return QIODevice::pos();
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QHttpNetworkReply
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • ...
QIODevice::pos();
executed 9749910 times by 80 tests: return QIODevice::pos();
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QHttpNetworkReply
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • ...
9749910
157}-
158-
159-
160-
161-
162qint64 QBuffer::size() const-
163{-
164 const QBufferPrivate * const d = d_func();-
165 return
executed 25099 times by 37 tests: return qint64(d->buf->size());
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QKeySequence
  • tst_QLoggingRegistry
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPixmap
  • tst_QPlainTextEdit
  • ...
qint64(d->buf->size());
executed 25099 times by 37 tests: return qint64(d->buf->size());
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QKeySequence
  • tst_QLoggingRegistry
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPixmap
  • tst_QPlainTextEdit
  • ...
25099
166}-
167-
168-
169-
170-
171bool QBuffer::seek(qint64 pos)-
172{-
173 QBufferPrivate * const d = d_func();-
174 if (pos > d->buf->size()
pos > d->buf->size()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QBuffer
FALSEevaluated 45716 times by 29 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPixmap
  • tst_QPlainTextEdit
  • tst_QPoint
  • tst_QPointF
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QTextDocument
  • ...
&& isWritable()
isWritable()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QBuffer
FALSEnever evaluated
) {
0-45716
175 if (seek(d->buf->size())
seek(d->buf->size())Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QBuffer
FALSEnever evaluated
) {
0-3
176 const qint64 gapSize = pos - d->buf->size();-
177 if (write(QByteArray(gapSize, 0)) != gapSize
write(QByteArr...0)) != gapSizeDescription
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QBuffer
) {
0-3
178 QMessageLogger(__FILE__, 373, __PRETTY_FUNCTION__).warning("QBuffer::seek: Unable to fill gap");-
179 return
never executed: return false;
false;
never executed: return false;
0
180 }-
181 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_QBuffer
else {
3
182 return
never executed: return false;
false;
never executed: return false;
0
183 }-
184 } else if (pos > d->buf->size()
pos > d->buf->size()Description
TRUEnever evaluated
FALSEevaluated 45716 times by 29 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPixmap
  • tst_QPlainTextEdit
  • tst_QPoint
  • tst_QPointF
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QTextDocument
  • ...
|| pos < 0
pos < 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QBuffer
FALSEevaluated 45714 times by 29 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPixmap
  • tst_QPlainTextEdit
  • tst_QPoint
  • tst_QPointF
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QTextDocument
  • ...
) {
0-45716
185 QMessageLogger(__FILE__, 380, __PRETTY_FUNCTION__).warning("QBuffer::seek: Invalid pos: %d", int(pos));-
186 return
executed 2 times by 1 test: return false;
Executed by:
  • tst_QBuffer
false;
executed 2 times by 1 test: return false;
Executed by:
  • tst_QBuffer
2
187 }-
188 return
executed 45717 times by 29 tests: return QIODevice::seek(pos);
Executed by:
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPixmap
  • tst_QPlainTextEdit
  • tst_QPoint
  • tst_QPointF
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QTextDocument
  • ...
QIODevice::seek(pos);
executed 45717 times by 29 tests: return QIODevice::seek(pos);
Executed by:
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPixmap
  • tst_QPlainTextEdit
  • tst_QPoint
  • tst_QPointF
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QTextDocument
  • ...
45717
189}-
190-
191-
192-
193-
194bool QBuffer::atEnd() const-
195{-
196 return
executed 5890 times by 26 tests: return QIODevice::atEnd();
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QKeySequence
  • tst_QLoggingRegistry
  • tst_QMainWindow
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPixmap
  • tst_QPrinter
  • tst_QStandardItemModel
  • tst_QTextStream
  • tst_QTranslator
  • tst_QXmlStream
  • ...
QIODevice::atEnd();
executed 5890 times by 26 tests: return QIODevice::atEnd();
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QKeySequence
  • tst_QLoggingRegistry
  • tst_QMainWindow
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPixmap
  • tst_QPrinter
  • tst_QStandardItemModel
  • tst_QTextStream
  • tst_QTranslator
  • tst_QXmlStream
  • ...
5890
197}-
198-
199-
200-
201-
202bool QBuffer::canReadLine() const-
203{-
204 const QBufferPrivate * const d = d_func();-
205 if (!isOpen()
!isOpen()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QBuffer
FALSEevaluated 59 times by 3 tests
Evaluated by:
  • tst_QBuffer
  • tst_QIODevice
  • tst_QXmlSimpleReader
)
4-59
206 return
executed 4 times by 1 test: return false;
Executed by:
  • tst_QBuffer
false;
executed 4 times by 1 test: return false;
Executed by:
  • tst_QBuffer
4
207-
208 return
executed 59 times by 3 tests: return d->buf->indexOf('\n', int(pos())) != -1 || QIODevice::canReadLine();
Executed by:
  • tst_QBuffer
  • tst_QIODevice
  • tst_QXmlSimpleReader
d->buf->indexOf('\n', int(pos())) != -1 || QIODevice::canReadLine();
executed 59 times by 3 tests: return d->buf->indexOf('\n', int(pos())) != -1 || QIODevice::canReadLine();
Executed by:
  • tst_QBuffer
  • tst_QIODevice
  • tst_QXmlSimpleReader
59
209}-
210-
211-
212-
213-
214qint64 QBuffer::readData(char *data, qint64 len)-
215{-
216 QBufferPrivate * const d = d_func();-
217 if ((
(len = qMin(le...- pos())) <= 0Description
TRUEevaluated 1473 times by 21 tests
Evaluated by:
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QDataStream
  • tst_QFtp
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QLoggingRegistry
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkReply
  • tst_QPixmap
  • tst_QPrinter
  • tst_QTextStream
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_languageChange
FALSEevaluated 4647285 times by 72 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QHttpNetworkReply
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • ...
len = qMin(len, qint64(d->buf->size()) - pos())) <= 0
(len = qMin(le...- pos())) <= 0Description
TRUEevaluated 1473 times by 21 tests
Evaluated by:
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QDataStream
  • tst_QFtp
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QLoggingRegistry
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkReply
  • tst_QPixmap
  • tst_QPrinter
  • tst_QTextStream
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_languageChange
FALSEevaluated 4647285 times by 72 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QHttpNetworkReply
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • ...
)
1473-4647285
218 return
executed 1473 times by 21 tests: return qint64(0);
Executed by:
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QDataStream
  • tst_QFtp
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QLoggingRegistry
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkReply
  • tst_QPixmap
  • tst_QPrinter
  • tst_QTextStream
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_languageChange
qint64(0);
executed 1473 times by 21 tests: return qint64(0);
Executed by:
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QDataStream
  • tst_QFtp
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QLoggingRegistry
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkReply
  • tst_QPixmap
  • tst_QPrinter
  • tst_QTextStream
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_languageChange
1473
219 memcpy(data, d->buf->constData() + pos(), len);-
220 return
executed 4647285 times by 72 tests: return len;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QHttpNetworkReply
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • ...
len;
executed 4647285 times by 72 tests: return len;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QHttpNetworkReply
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • ...
4647285
221}-
222-
223-
224-
225-
226qint64 QBuffer::writeData(const char *data, qint64 len)-
227{-
228 QBufferPrivate * const d = d_func();-
229 int extraBytes = pos() + len - d->buf->size();-
230 if (extraBytes > 0
extraBytes > 0Description
TRUEevaluated 212303 times by 69 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
FALSEevaluated 8300 times by 14 tests
Evaluated by:
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBuffer
  • tst_QDataStream
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QPicture
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QUuid
  • tst_QXmlStream
) {
8300-212303
231 int newSize = d->buf->size() + extraBytes;-
232 d->buf->resize(newSize);-
233 if (d->buf->size() != newSize
d->buf->size() != newSizeDescription
TRUEnever evaluated
FALSEevaluated 212303 times by 69 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
) {
0-212303
234 QMessageLogger(__FILE__, 429, __PRETTY_FUNCTION__).warning("QBuffer::writeData: Memory allocation error");-
235 return
never executed: return -1;
-1;
never executed: return -1;
0
236 }-
237 }
executed 212303 times by 69 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
212303
238-
239 memcpy(d->buf->data() + pos(), data, int(len));-
240-
241-
242 d->writtenSinceLastEmit += len;-
243 if (d->signalConnectionCount
d->signalConnectionCountDescription
TRUEevaluated 40 times by 1 test
Evaluated by:
  • tst_QBuffer
FALSEevaluated 220563 times by 69 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
&& !d->signalsEmitted
!d->signalsEmittedDescription
TRUEevaluated 31 times by 1 test
Evaluated by:
  • tst_QBuffer
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_QBuffer
&& !signalsBlocked()
!signalsBlocked()Description
TRUEevaluated 31 times by 1 test
Evaluated by:
  • tst_QBuffer
FALSEnever evaluated
) {
0-220563
244 d->signalsEmitted = true;-
245 QMetaObject::invokeMethod(this, "_q_emitSignals", Qt::QueuedConnection);-
246 }
executed 31 times by 1 test: end of block
Executed by:
  • tst_QBuffer
31
247-
248 return
executed 220603 times by 69 tests: return len;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
len;
executed 220603 times by 69 tests: return len;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
220603
249}-
250-
251-
252-
253-
254-
255-
256void QBuffer::connectNotify(const QMetaMethod &signal)-
257{-
258 static const QMetaMethod readyReadSignal = QMetaMethod::fromSignal(&QBuffer::readyRead);-
259 static const QMetaMethod bytesWrittenSignal = QMetaMethod::fromSignal(&QBuffer::bytesWritten);-
260 if (signal == readyReadSignal
signal == readyReadSignalDescription
TRUEevaluated 40 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QBuffer
  • tst_QNetworkReply
FALSEevaluated 1349 times by 11 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QBuffer
  • tst_QKeyEvent
  • tst_QLoggingRegistry
  • tst_QNetworkReply
  • tst_QString
  • tst_QTextStream
  • tst_QXmlStream
  • tst_qdbusxml2cpp - unknown status
  • tst_qmakelib
  • tst_qtextstream - unknown status
|| signal == bytesWrittenSignal
signal == bytesWrittenSignalDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QBuffer
FALSEevaluated 1345 times by 10 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QKeyEvent
  • tst_QLoggingRegistry
  • tst_QNetworkReply
  • tst_QString
  • tst_QTextStream
  • tst_QXmlStream
  • tst_qdbusxml2cpp - unknown status
  • tst_qmakelib
  • tst_qtextstream - unknown status
)
4-1349
261 d_func()->signalConnectionCount++;
executed 44 times by 3 tests: d_func()->signalConnectionCount++;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QBuffer
  • tst_QNetworkReply
44
262}
executed 1389 times by 11 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QBuffer
  • tst_QKeyEvent
  • tst_QLoggingRegistry
  • tst_QNetworkReply
  • tst_QString
  • tst_QTextStream
  • tst_QXmlStream
  • tst_qdbusxml2cpp - unknown status
  • tst_qmakelib
  • tst_qtextstream - unknown status
1389
263-
264-
265-
266-
267-
268void QBuffer::disconnectNotify(const QMetaMethod &signal)-
269{-
270 if (signal.isValid()
signal.isValid()Description
TRUEevaluated 472 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QTextStream
FALSEnever evaluated
) {
0-472
271 static const QMetaMethod readyReadSignal = QMetaMethod::fromSignal(&QBuffer::readyRead);-
272 static const QMetaMethod bytesWrittenSignal = QMetaMethod::fromSignal(&QBuffer::bytesWritten);-
273 if (signal == readyReadSignal
signal == readyReadSignalDescription
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 463 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QTextStream
|| signal == bytesWrittenSignal
signal == bytesWrittenSignalDescription
TRUEnever evaluated
FALSEevaluated 463 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QTextStream
)
0-463
274 d_func()->signalConnectionCount--;
executed 9 times by 2 tests: d_func()->signalConnectionCount--;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
9
275 }
executed 472 times by 3 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QTextStream
else {
472
276 d_func()->signalConnectionCount = 0;-
277 }
never executed: end of block
0
278}-
279-
280-
281-
282-
283-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9