qringbuffer.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/tools/qringbuffer.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4const char *QRingBuffer::readPointerAtPosition(qint64 pos, qint64 &length) const-
5{-
6 if (pos >= 0
pos >= 0Description
TRUEevaluated 904 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QRingBuffer
FALSEnever evaluated
) {
0-904
7 pos += head;-
8 for (int i = 0; i < buffers.size()
i < buffers.size()Description
TRUEevaluated 924 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QRingBuffer
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QRingBuffer
; ++i) {
3-924
9 length = (i == tailBuffer
i == tailBufferDescription
TRUEevaluated 180 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QRingBuffer
FALSEevaluated 744 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QRingBuffer
? tail : buffers[i].size());
180-744
10 if (length > pos
length > posDescription
TRUEevaluated 901 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QRingBuffer
FALSEevaluated 23 times by 1 test
Evaluated by:
  • tst_QRingBuffer
) {
23-901
11 length -= pos;-
12 return
executed 901 times by 2 tests: return buffers[i].constData() + pos;
Executed by:
  • tst_QNetworkReply
  • tst_QRingBuffer
buffers[i].constData() + pos;
executed 901 times by 2 tests: return buffers[i].constData() + pos;
Executed by:
  • tst_QNetworkReply
  • tst_QRingBuffer
901
13 }-
14 pos -= length;-
15 }
executed 23 times by 1 test: end of block
Executed by:
  • tst_QRingBuffer
23
16 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_QRingBuffer
3
17-
18 length = 0;-
19 return
executed 3 times by 1 test: return 0;
Executed by:
  • tst_QRingBuffer
0;
executed 3 times by 1 test: return 0;
Executed by:
  • tst_QRingBuffer
3
20}-
21-
22void QRingBuffer::free(qint64 bytes)-
23{-
24 ((!(bytes <= bufferSize)) ? qt_assert("bytes <= bufferSize",__FILE__,74) : qt_noop());-
25-
26 while (bytes > 0
bytes > 0Description
TRUEevaluated 43978893 times by 157 tests
Evaluated by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • ...
FALSEevaluated 35028 times by 42 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QBitArray
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QFile
  • tst_QFileInfo
  • tst_QFtp
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeyEvent
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPixmap
  • tst_QPoint
  • tst_QPointF
  • ...
) {
35028-43978893
27 const qint64 blockSize = buffers.constFirst().size() - head;-
28-
29 if (tailBuffer == 0
tailBuffer == 0Description
TRUEevaluated 43975027 times by 157 tests
Evaluated by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • ...
FALSEevaluated 3866 times by 12 tests
Evaluated by:
  • tst_QFtp
  • tst_QImageReader
  • tst_QLocalSocket
  • tst_QNetworkReply
  • tst_QProcess
  • tst_QRingBuffer
  • tst_QSharedPointer
  • tst_QTcpSocket
  • tst_Selftests
  • tst_Spdy
  • tst_qdbuscpp2xml
  • tst_rcc
|| blockSize > bytes
blockSize > bytesDescription
TRUEevaluated 855 times by 3 tests
Evaluated by:
  • tst_QImageReader
  • tst_QNetworkReply
  • tst_QRingBuffer
FALSEevaluated 3011 times by 12 tests
Evaluated by:
  • tst_QFtp
  • tst_QImageReader
  • tst_QLocalSocket
  • tst_QNetworkReply
  • tst_QProcess
  • tst_QRingBuffer
  • tst_QSharedPointer
  • tst_QTcpSocket
  • tst_Selftests
  • tst_Spdy
  • tst_qdbuscpp2xml
  • tst_rcc
) {
855-43975027
30-
31-
32-
33 if (bufferSize <= bytes
bufferSize <= bytesDescription
TRUEevaluated 126580 times by 156 tests
Evaluated by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • ...
FALSEevaluated 43849302 times by 111 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
) {
126580-43849302
34 if (buffers.constFirst().size() <= basicBlockSize
buffers.constF...basicBlockSizeDescription
TRUEevaluated 121102 times by 156 tests
Evaluated by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • ...
FALSEevaluated 5478 times by 14 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QLocalSocket
  • tst_QNetworkReply
  • tst_QProcess
  • tst_QSharedPointer
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_Selftests
  • tst_Spdy
) {
5478-121102
35 bufferSize = 0;-
36 head = tail = 0;-
37 }
executed 121102 times by 156 tests: end of block
Executed by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • ...
else {
121102
38 clear();-
39 }
executed 5478 times by 14 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QLocalSocket
  • tst_QNetworkReply
  • tst_QProcess
  • tst_QSharedPointer
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_Selftests
  • tst_Spdy
5478
40 } else {-
41 ((!(bytes < MaxByteArraySize)) ? qt_assert("bytes < MaxByteArraySize",__FILE__,91) : qt_noop());-
42 head += int(bytes);-
43 bufferSize -= bytes;-
44 }
executed 43849302 times by 111 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
43849302
45 return;
executed 43975882 times by 157 tests: return;
Executed by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • ...
43975882
46 }-
47-
48 bufferSize -= blockSize;-
49 bytes -= blockSize;-
50 buffers.removeFirst();-
51 --tailBuffer;-
52 head = 0;-
53 }
executed 3011 times by 12 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QImageReader
  • tst_QLocalSocket
  • tst_QNetworkReply
  • tst_QProcess
  • tst_QRingBuffer
  • tst_QSharedPointer
  • tst_QTcpSocket
  • tst_Selftests
  • tst_Spdy
  • tst_qdbuscpp2xml
  • tst_rcc
3011
54}
executed 35028 times by 42 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QBitArray
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QFile
  • tst_QFileInfo
  • tst_QFtp
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeyEvent
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPixmap
  • tst_QPoint
  • tst_QPointF
  • ...
35028
55-
56char *QRingBuffer::reserve(qint64 bytes)-
57{-
58 if (bytes <= 0
bytes <= 0Description
TRUEevaluated 27 times by 8 tests
Evaluated by:
  • tst_QFile
  • tst_QHttpSocketEngine
  • tst_QNetworkReply
  • tst_QSharedPointer
  • tst_QTextStream
  • tst_qdbusxml2cpp
  • tst_qmakelib
  • tst_qnetworkreply - unknown status
FALSEevaluated 397944 times by 165 tests
Evaluated by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • ...
|| bytes >= MaxByteArraySize
bytes >= MaxByteArraySizeDescription
TRUEnever evaluated
FALSEevaluated 397944 times by 165 tests
Evaluated by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • ...
)
0-397944
59 return
executed 27 times by 8 tests: return 0;
Executed by:
  • tst_QFile
  • tst_QHttpSocketEngine
  • tst_QNetworkReply
  • tst_QSharedPointer
  • tst_QTextStream
  • tst_qdbusxml2cpp
  • tst_qmakelib
  • tst_qnetworkreply - unknown status
0;
executed 27 times by 8 tests: return 0;
Executed by:
  • tst_QFile
  • tst_QHttpSocketEngine
  • tst_QNetworkReply
  • tst_QSharedPointer
  • tst_QTextStream
  • tst_qdbusxml2cpp
  • tst_qmakelib
  • tst_qnetworkreply - unknown status
27
60-
61 if (buffers.isEmpty()
buffers.isEmpty()Description
TRUEevaluated 48462 times by 165 tests
Evaluated by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • ...
FALSEevaluated 349482 times by 133 tests
Evaluated by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • ...
) {
48462-349482
62 buffers.append(QByteArray());-
63 buffers.first().resize(qMax(basicBlockSize, int(bytes)));-
64 }
executed 48462 times by 165 tests: end of block
Executed by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • ...
else {
48462
65 const qint64 newSize = bytes + tail;-
66-
67 if (newSize > buffers.constLast().size()
newSize > buff...tLast().size()Description
TRUEevaluated 58432 times by 96 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFrame
  • ...
FALSEevaluated 291050 times by 78 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QChar
  • tst_QColorDialog
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • ...
) {
58432-291050
68 if (newSize > buffers.constLast().capacity()
newSize > buff...t().capacity()Description
TRUEevaluated 45290 times by 96 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFrame
  • ...
FALSEevaluated 13142 times by 10 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QProcess
  • tst_QRingBuffer
  • tst_QSharedPointer
  • tst_QSslSocket
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_Selftests
  • tst_qmake
&& (tail >= basicBlockSize
tail >= basicBlockSizeDescription
TRUEevaluated 1476 times by 13 tests
Evaluated by:
  • tst_QFtp
  • tst_QImageReader
  • tst_QLocalSocket
  • tst_QNetworkReply
  • tst_QProcess
  • tst_QRingBuffer
  • tst_QSharedPointer
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_Selftests
  • tst_qdbuscpp2xml
  • tst_qmake
  • tst_rcc
FALSEevaluated 43814 times by 94 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFrame
  • ...
1476-45290
69 || newSize >= MaxByteArraySize
newSize >= MaxByteArraySizeDescription
TRUEnever evaluated
FALSEevaluated 43814 times by 94 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFrame
  • ...
)) {
0-43814
70-
71 buffers.last().resize(tail);-
72-
73-
74 buffers.append(QByteArray());-
75 ++tailBuffer;-
76 tail = 0;-
77 }
executed 1476 times by 13 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QImageReader
  • tst_QLocalSocket
  • tst_QNetworkReply
  • tst_QProcess
  • tst_QRingBuffer
  • tst_QSharedPointer
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_Selftests
  • tst_qdbuscpp2xml
  • tst_qmake
  • tst_rcc
1476
78 buffers.last().resize(qMax(basicBlockSize, tail + int(bytes)));-
79 }
executed 58432 times by 96 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFrame
  • ...
58432
80 }
executed 349482 times by 133 tests: end of block
Executed by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • ...
349482
81-
82 char *writePtr = buffers.last().data() + tail;-
83 bufferSize += bytes;-
84 ((!(bytes < MaxByteArraySize)) ? qt_assert("bytes < MaxByteArraySize",__FILE__,134) : qt_noop());-
85 tail += int(bytes);-
86 return
executed 397944 times by 165 tests: return writePtr;
Executed by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • ...
writePtr;
executed 397944 times by 165 tests: return writePtr;
Executed by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • ...
397944
87}-
88-
89-
90-
91-
92-
93-
94char *QRingBuffer::reserveFront(qint64 bytes)-
95{-
96 if (bytes <= 0
bytes <= 0Description
TRUEnever evaluated
FALSEevaluated 33198 times by 7 tests
Evaluated by:
  • tst_QBuffer
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QProcess
  • tst_QRingBuffer
|| bytes >= MaxByteArraySize
bytes >= MaxByteArraySizeDescription
TRUEnever evaluated
FALSEevaluated 33198 times by 7 tests
Evaluated by:
  • tst_QBuffer
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QProcess
  • tst_QRingBuffer
)
0-33198
97 return
never executed: return 0;
0;
never executed: return 0;
0
98-
99 if (head < bytes
head < bytesDescription
TRUEevaluated 32952 times by 7 tests
Evaluated by:
  • tst_QBuffer
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QProcess
  • tst_QRingBuffer
FALSEevaluated 246 times by 1 test
Evaluated by:
  • tst_QRingBuffer
) {
246-32952
100 if (buffers.isEmpty()
buffers.isEmpty()Description
TRUEevaluated 7 times by 4 tests
Evaluated by:
  • tst_QBuffer
  • tst_QIODevice
  • tst_QImageReader
  • tst_QRingBuffer
FALSEevaluated 32945 times by 7 tests
Evaluated by:
  • tst_QBuffer
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QProcess
  • tst_QRingBuffer
) {
7-32945
101 buffers.append(QByteArray());-
102 }
executed 7 times by 4 tests: end of block
Executed by:
  • tst_QBuffer
  • tst_QIODevice
  • tst_QImageReader
  • tst_QRingBuffer
else {
7
103 buffers.first().remove(0, head);-
104 if (tailBuffer == 0
tailBuffer == 0Description
TRUEevaluated 32938 times by 7 tests
Evaluated by:
  • tst_QBuffer
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QProcess
  • tst_QRingBuffer
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_QRingBuffer
)
7-32938
105 tail -= head;
executed 32938 times by 7 tests: tail -= head;
Executed by:
  • tst_QBuffer
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QProcess
  • tst_QRingBuffer
32938
106 }
executed 32945 times by 7 tests: end of block
Executed by:
  • tst_QBuffer
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QProcess
  • tst_QRingBuffer
32945
107-
108 head = qMax(basicBlockSize, int(bytes));-
109 if (bufferSize == 0
bufferSize == 0Description
TRUEevaluated 32943 times by 7 tests
Evaluated by:
  • tst_QBuffer
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QProcess
  • tst_QRingBuffer
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_QRingBuffer
) {
9-32943
110 tail = head;-
111 }
executed 32943 times by 7 tests: end of block
Executed by:
  • tst_QBuffer
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QProcess
  • tst_QRingBuffer
else {
32943
112 buffers.prepend(QByteArray());-
113 ++tailBuffer;-
114 }
executed 9 times by 1 test: end of block
Executed by:
  • tst_QRingBuffer
9
115 buffers.first().resize(head);-
116 }
executed 32952 times by 7 tests: end of block
Executed by:
  • tst_QBuffer
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QProcess
  • tst_QRingBuffer
32952
117-
118 head -= int(bytes);-
119 bufferSize += bytes;-
120 return
executed 33198 times by 7 tests: return buffers.first().data() + head;
Executed by:
  • tst_QBuffer
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QProcess
  • tst_QRingBuffer
buffers.first().data() + head;
executed 33198 times by 7 tests: return buffers.first().data() + head;
Executed by:
  • tst_QBuffer
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QProcess
  • tst_QRingBuffer
33198
121}-
122-
123void QRingBuffer::chop(qint64 bytes)-
124{-
125 ((!(bytes <= bufferSize)) ? qt_assert("bytes <= bufferSize",__FILE__,175) : qt_noop());-
126-
127 while (bytes > 0
bytes > 0Description
TRUEevaluated 151026 times by 155 tests
Evaluated by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • ...
FALSEevaluated 76732 times by 63 tests
Evaluated by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QChar
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QEventLoop
  • tst_QFile
  • tst_QFileInfo
  • tst_QFont
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • ...
) {
76732-151026
128 if (tailBuffer == 0
tailBuffer == 0Description
TRUEevaluated 150895 times by 155 tests
Evaluated by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • ...
FALSEevaluated 131 times by 11 tests
Evaluated by:
  • tst_QFtp
  • tst_QImageReader
  • tst_QNetworkReply
  • tst_QProcess
  • tst_QSharedPointer
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_Selftests
  • tst_qdbuscpp2xml
  • tst_qmake
  • tst_rcc
|| tail > bytes
tail > bytesDescription
TRUEevaluated 96 times by 8 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QProcess
  • tst_QSharedPointer
  • tst_Selftests
  • tst_qdbuscpp2xml
  • tst_qmake
  • tst_rcc
FALSEevaluated 35 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QImageReader
  • tst_QNetworkReply
  • tst_QProcess
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_Selftests
) {
35-150895
129-
130-
131-
132 if (bufferSize <= bytes
bufferSize <= bytesDescription
TRUEevaluated 80811 times by 64 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsScene
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • ...
FALSEevaluated 70180 times by 143 tests
Evaluated by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • ...
) {
70180-80811
133 if (buffers.constFirst().size() <= basicBlockSize
buffers.constF...basicBlockSizeDescription
TRUEevaluated 80810 times by 63 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsScene
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • ...
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QRingBuffer
) {
1-80810
134 bufferSize = 0;-
135 head = tail = 0;-
136 }
executed 80810 times by 63 tests: end of block
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFont
  • tst_QFtp
  • tst_QGraphicsScene
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • ...
else {
80810
137 clear();-
138 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QRingBuffer
1
139 } else {-
140 ((!(bytes < MaxByteArraySize)) ? qt_assert("bytes < MaxByteArraySize",__FILE__,190) : qt_noop());-
141 tail -= int(bytes);-
142 bufferSize -= bytes;-
143 }
executed 70180 times by 143 tests: end of block
Executed by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • ...
70180
144 return;
executed 150991 times by 155 tests: return;
Executed by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • ...
150991
145 }-
146-
147 bufferSize -= tail;-
148 bytes -= tail;-
149 buffers.removeLast();-
150 --tailBuffer;-
151 tail = buffers.constLast().size();-
152 }
executed 35 times by 7 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QImageReader
  • tst_QNetworkReply
  • tst_QProcess
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_Selftests
35
153}
executed 76732 times by 63 tests: end of block
Executed by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QChar
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QEventLoop
  • tst_QFile
  • tst_QFileInfo
  • tst_QFont
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • ...
76732
154-
155void QRingBuffer::clear()-
156{-
157 if (buffers.isEmpty()
buffers.isEmpty()Description
TRUEevaluated 229385 times by 71 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDate
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGuiVariant
  • tst_QHttpNetworkConnection
  • tst_QIODevice
  • ...
FALSEevaluated 110619 times by 114 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • ...
)
110619-229385
158 return;
executed 229385 times by 71 tests: return;
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDate
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGuiVariant
  • tst_QHttpNetworkConnection
  • tst_QIODevice
  • ...
229385
159-
160 buffers.erase(buffers.begin() + 1, buffers.end());-
161 buffers.first().clear();-
162-
163 head = tail = 0;-
164 tailBuffer = 0;-
165 bufferSize = 0;-
166}
executed 110619 times by 114 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • ...
110619
167-
168qint64 QRingBuffer::indexOf(char c, qint64 maxLength, qint64 pos) const-
169{-
170 if (maxLength <= 0
maxLength <= 0Description
TRUEevaluated 5159 times by 11 tests
Evaluated by:
  • tst_QBuffer
  • tst_QFtp
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_QXmlSimpleReader
FALSEevaluated 107226 times by 42 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
|| pos < 0
pos < 0Description
TRUEnever evaluated
FALSEevaluated 107226 times by 42 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
)
0-107226
171 return
executed 5159 times by 11 tests: return -1;
Executed by:
  • tst_QBuffer
  • tst_QFtp
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_QXmlSimpleReader
-1;
executed 5159 times by 11 tests: return -1;
Executed by:
  • tst_QBuffer
  • tst_QFtp
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_QXmlSimpleReader
5159
172-
173 qint64 index = -(pos + head);-
174 for (int i = 0; i < buffers.size()
i < buffers.size()Description
TRUEevaluated 116771 times by 42 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
FALSEevaluated 619 times by 9 tests
Evaluated by:
  • tst_QChar
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QRingBuffer
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_QXmlInputSource
; ++i) {
619-116771
175 const qint64 nextBlockIndex = qMin(index + (i == tailBuffer ? tail : buffers[i].size()),-
176 maxLength);-
177-
178 if (nextBlockIndex > 0
nextBlockIndex > 0Description
TRUEevaluated 113954 times by 42 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
FALSEevaluated 2817 times by 1 test
Evaluated by:
  • tst_QRingBuffer
) {
2817-113954
179 const char *ptr = buffers[i].constData();-
180 if (index < 0
index < 0Description
TRUEevaluated 97225 times by 42 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
FALSEevaluated 16729 times by 10 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QNetworkReply
  • tst_QProcess
  • tst_QRingBuffer
  • tst_QSocks5SocketEngine
  • tst_QTcpSocket
  • tst_QXmlInputSource
) {
16729-97225
181 ptr -= index;-
182 index = 0;-
183 }
executed 97225 times by 42 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
97225
184-
185 const char *findPtr = reinterpret_cast<const char *>(memchr(ptr, c,-
186 nextBlockIndex - index));-
187 if (findPtr
findPtrDescription
TRUEevaluated 106220 times by 42 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
FALSEevaluated 7734 times by 11 tests
Evaluated by:
  • tst_QChar
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QTcpSocket
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_QXmlInputSource
)
7734-106220
188 return
executed 106220 times by 42 tests: return qint64(findPtr - ptr) + index + pos;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
qint64(findPtr - ptr) + index + pos;
executed 106220 times by 42 tests: return qint64(findPtr - ptr) + index + pos;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
106220
189-
190 if (nextBlockIndex == maxLength
nextBlockIndex == maxLengthDescription
TRUEevaluated 387 times by 5 tests
Evaluated by:
  • tst_QIODevice
  • tst_QImageReader
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QTcpSocket
FALSEevaluated 7347 times by 10 tests
Evaluated by:
  • tst_QChar
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_QXmlInputSource
)
387-7347
191 return
executed 387 times by 5 tests: return -1;
Executed by:
  • tst_QIODevice
  • tst_QImageReader
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QTcpSocket
-1;
executed 387 times by 5 tests: return -1;
Executed by:
  • tst_QIODevice
  • tst_QImageReader
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QTcpSocket
387
192 }
executed 7347 times by 10 tests: end of block
Executed by:
  • tst_QChar
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_QXmlInputSource
7347
193 index = nextBlockIndex;-
194 }
executed 10164 times by 10 tests: end of block
Executed by:
  • tst_QChar
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_QXmlInputSource
10164
195 return
executed 619 times by 9 tests: return -1;
Executed by:
  • tst_QChar
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QRingBuffer
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_QXmlInputSource
-1;
executed 619 times by 9 tests: return -1;
Executed by:
  • tst_QChar
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QRingBuffer
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_QXmlInputSource
619
196}-
197-
198qint64 QRingBuffer::read(char *data, qint64 maxLength)-
199{-
200 const qint64 bytesToRead = qMin(size(), maxLength);-
201 qint64 readSoFar = 0;-
202 while (readSoFar < bytesToRead
readSoFar < bytesToReadDescription
TRUEevaluated 929541 times by 145 tests
Evaluated by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • ...
FALSEevaluated 7877124 times by 192 tests
Evaluated by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • ...
) {
929541-7877124
203 const qint64 bytesToReadFromThisBlock = qMin(bytesToRead - readSoFar,-
204 nextDataBlockSize());-
205 if (data
dataDescription
TRUEevaluated 929541 times by 145 tests
Evaluated by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • ...
FALSEnever evaluated
)
0-929541
206 memcpy(data + readSoFar, readPointer(), bytesToReadFromThisBlock);
executed 929541 times by 145 tests: memcpy(data + readSoFar, readPointer(), bytesToReadFromThisBlock);
Executed by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • ...
929541
207 readSoFar += bytesToReadFromThisBlock;-
208 free(bytesToReadFromThisBlock);-
209 }
executed 929541 times by 145 tests: end of block
Executed by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • ...
929541
210 return
executed 7877124 times by 192 tests: return readSoFar;
Executed by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • ...
readSoFar;
executed 7877124 times by 192 tests: return readSoFar;
Executed by:
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • ...
7877124
211}-
212-
213-
214-
215-
216-
217-
218QByteArray QRingBuffer::read()-
219{-
220 if (bufferSize == 0
bufferSize == 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QRingBuffer
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QRingBuffer
)
1-3
221 return
executed 1 time by 1 test: return QByteArray();
Executed by:
  • tst_QRingBuffer
QByteArray();
executed 1 time by 1 test: return QByteArray();
Executed by:
  • tst_QRingBuffer
1
222-
223 QByteArray qba(buffers.takeFirst());-
224-
225 qba.reserve(0);-
226 if (tailBuffer == 0
tailBuffer == 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QRingBuffer
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QRingBuffer
) {
1-2
227 qba.resize(tail);-
228 tail = 0;-
229 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QRingBuffer
else {
1
230 --tailBuffer;-
231 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_QRingBuffer
2
232 qba.remove(0, head);-
233 head = 0;-
234 bufferSize -= qba.size();-
235 return
executed 3 times by 1 test: return qba;
Executed by:
  • tst_QRingBuffer
qba;
executed 3 times by 1 test: return qba;
Executed by:
  • tst_QRingBuffer
3
236}-
237-
238-
239-
240-
241-
242-
243qint64 QRingBuffer::peek(char *data, qint64 maxLength, qint64 pos) const-
244{-
245 qint64 readSoFar = 0;-
246-
247 if (pos >= 0
pos >= 0Description
TRUEevaluated 15861 times by 15 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QHttpNetworkConnection
  • tst_QIODevice
  • tst_QImageReader
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_Spdy
FALSEnever evaluated
) {
0-15861
248 pos += head;-
249 for (int i = 0; readSoFar < maxLength
readSoFar < maxLengthDescription
TRUEevaluated 20554 times by 15 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QHttpNetworkConnection
  • tst_QIODevice
  • tst_QImageReader
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_Spdy
FALSEevaluated 11132 times by 12 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QHttpNetworkConnection
  • tst_QIODevice
  • tst_QImageReader
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_Spdy
&& i < buffers.size()
i < buffers.size()Description
TRUEevaluated 15825 times by 14 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QHttpNetworkConnection
  • tst_QIODevice
  • tst_QImageReader
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_Spdy
FALSEevaluated 4729 times by 12 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QHttpNetworkConnection
  • tst_QIODevice
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSslSocket
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_Spdy
; ++i) {
4729-20554
250 qint64 blockLength = (i == tailBuffer
i == tailBufferDescription
TRUEevaluated 15031 times by 14 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QHttpNetworkConnection
  • tst_QIODevice
  • tst_QImageReader
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_Spdy
FALSEevaluated 794 times by 3 tests
Evaluated by:
  • tst_QImageReader
  • tst_QNetworkReply
  • tst_QRingBuffer
? tail : buffers[i].size());
794-15031
251-
252 if (pos < blockLength
pos < blockLengthDescription
TRUEevaluated 12255 times by 14 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QHttpNetworkConnection
  • tst_QIODevice
  • tst_QImageReader
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_Spdy
FALSEevaluated 3570 times by 8 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QIODevice
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSslSocket
  • tst_Spdy
) {
3570-12255
253 blockLength = qMin(blockLength - pos, maxLength - readSoFar);-
254 memcpy(data + readSoFar, buffers[i].constData() + pos, blockLength);-
255 readSoFar += blockLength;-
256 pos = 0;-
257 }
executed 12255 times by 14 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QHttpNetworkConnection
  • tst_QIODevice
  • tst_QImageReader
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_Spdy
else {
12255
258 pos -= blockLength;-
259 }
executed 3570 times by 8 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QIODevice
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSslSocket
  • tst_Spdy
3570
260 }-
261 }
executed 15861 times by 15 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QHttpNetworkConnection
  • tst_QIODevice
  • tst_QImageReader
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_Spdy
15861
262-
263 return
executed 15861 times by 15 tests: return readSoFar;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QHttpNetworkConnection
  • tst_QIODevice
  • tst_QImageReader
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_Spdy
readSoFar;
executed 15861 times by 15 tests: return readSoFar;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QHttpNetworkConnection
  • tst_QIODevice
  • tst_QImageReader
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_Spdy
15861
264}-
265-
266-
267-
268-
269-
270-
271void QRingBuffer::append(const char *data, qint64 size)-
272{-
273 char *writePointer = reserve(size);-
274 if (size == 1
size == 1Description
TRUEevaluated 69869 times by 17 tests
Evaluated by:
  • tst_QDataStream
  • tst_QFile
  • tst_QHttpSocketEngine
  • tst_QLocalSocket
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Spdy
FALSEevaluated 96356 times by 62 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QEventLoop
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiEventLoop
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • ...
)
69869-96356
275 *
executed 69869 times by 17 tests: *writePointer = *data;
Executed by:
  • tst_QDataStream
  • tst_QFile
  • tst_QHttpSocketEngine
  • tst_QLocalSocket
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Spdy
writePointer = *data;
executed 69869 times by 17 tests: *writePointer = *data;
Executed by:
  • tst_QDataStream
  • tst_QFile
  • tst_QHttpSocketEngine
  • tst_QLocalSocket
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Spdy
69869
276 else if (size
sizeDescription
TRUEevaluated 96329 times by 62 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QEventLoop
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiEventLoop
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • ...
FALSEevaluated 27 times by 8 tests
Evaluated by:
  • tst_QFile
  • tst_QHttpSocketEngine
  • tst_QNetworkReply
  • tst_QSharedPointer
  • tst_QTextStream
  • tst_qdbusxml2cpp
  • tst_qmakelib
  • tst_qnetworkreply - unknown status
)
27-96329
277 ::
executed 96329 times by 62 tests: ::memcpy(writePointer, data, size);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QEventLoop
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiEventLoop
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • ...
memcpy(writePointer, data, size);
executed 96329 times by 62 tests: ::memcpy(writePointer, data, size);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QEventLoop
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiEventLoop
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • ...
96329
278}
executed 166225 times by 63 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QEventLoop
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiEventLoop
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • ...
166225
279-
280-
281-
282-
283-
284-
285void QRingBuffer::append(const QByteArray &qba)-
286{-
287 if (tail == 0
tail == 0Description
TRUEevaluated 685 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_Spdy
FALSEevaluated 6470 times by 4 tests
Evaluated by:
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_Spdy
) {
685-6470
288 if (buffers.isEmpty()
buffers.isEmpty()Description
TRUEevaluated 465 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_Spdy
FALSEevaluated 220 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
220-465
289 buffers.append(qba);
executed 465 times by 5 tests: buffers.append(qba);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_Spdy
465
290 else-
291 buffers.last() = qba;
executed 220 times by 1 test: buffers.last() = qba;
Executed by:
  • tst_QNetworkReply
220
292 } else {-
293 buffers.last().resize(tail);-
294 buffers.append(qba);-
295 ++tailBuffer;-
296 }
executed 6470 times by 4 tests: end of block
Executed by:
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_Spdy
6470
297 tail = qba.size();-
298 bufferSize += tail;-
299}
executed 7155 times by 5 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_Spdy
7155
300-
301qint64 QRingBuffer::readLine(char *data, qint64 maxLength)-
302{-
303 if (!data
!dataDescription
TRUEnever evaluated
FALSEevaluated 101034 times by 42 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
|| --
--maxLength <= 0Description
TRUEnever evaluated
FALSEevaluated 101034 times by 42 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
maxLength <= 0
--maxLength <= 0Description
TRUEnever evaluated
FALSEevaluated 101034 times by 42 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
)
0-101034
304 return
never executed: return -1;
-1;
never executed: return -1;
0
305-
306 qint64 i = indexOf('\n', maxLength);-
307 i = read(data, i >= 0 ? (i + 1) : maxLength);-
308-
309-
310 data[i] = '\0';-
311 return
executed 101034 times by 42 tests: return i;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
i;
executed 101034 times by 42 tests: return i;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
101034
312}-
313-
314-
Switch to Source codePreprocessed file

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