qdatastream.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/io/qdatastream.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8QDataStream::QDataStream()-
9{-
10 dev = 0;-
11 owndev = false;-
12 byteorder = BigEndian;-
13 ver = Qt_DefaultCompiledVersion;-
14 noswap = QSysInfo::ByteOrder == QSysInfo::BigEndian;-
15 q_status = Ok;-
16}
executed 292 times by 8 tests: end of block
Executed by:
  • tst_QAbstractPrintDialog
  • tst_QDataStream
  • tst_QDateTime
  • tst_QFont
  • tst_QNetworkDiskCache
  • tst_QPdfWriter
  • tst_QPicture
  • tst_QPrinter
292
17-
18-
19-
20-
21-
22-
23-
24QDataStream::QDataStream(QIODevice *d)-
25{-
26 dev = d;-
27 owndev = false;-
28 byteorder = BigEndian;-
29 ver = Qt_DefaultCompiledVersion;-
30 noswap = QSysInfo::ByteOrder == QSysInfo::BigEndian;-
31 q_status = Ok;-
32}
executed 6879 times by 22 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QBitArray
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDateTime
  • tst_QFile
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPoint
  • tst_QPointF
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
6879
33QDataStream::QDataStream(QByteArray *a, QIODevice::OpenMode flags)-
34{-
35 QBuffer *buf = new QBuffer(a);-
36-
37 buf->blockSignals(true);-
38-
39 buf->open(flags);-
40 dev = buf;-
41 owndev = true;-
42 byteorder = BigEndian;-
43 ver = Qt_DefaultCompiledVersion;-
44 noswap = QSysInfo::ByteOrder == QSysInfo::BigEndian;-
45 q_status = Ok;-
46}
executed 6033 times by 46 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QImage
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QObject
  • tst_QPen
  • tst_QPixmap
  • ...
6033
47QDataStream::QDataStream(const QByteArray &a)-
48{-
49 QBuffer *buf = new QBuffer;-
50-
51 buf->blockSignals(true);-
52-
53 buf->setData(a);-
54 buf->open(QIODevice::ReadOnly);-
55 dev = buf;-
56 owndev = true;-
57 byteorder = BigEndian;-
58 ver = Qt_DefaultCompiledVersion;-
59 noswap = QSysInfo::ByteOrder == QSysInfo::BigEndian;-
60 q_status = Ok;-
61}
executed 138 times by 13 tests: end of block
Executed by:
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QGuiVariant
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QSizePolicy
  • tst_QTranslator
  • tst_QUrl
  • tst_QVariant
  • tst_QVersionNumber
  • tst_QWidget
138
62QDataStream::~QDataStream()-
63{-
64 if (owndev
owndevDescription
TRUEevaluated 6171 times by 47 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QImage
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QObject
  • tst_QPen
  • tst_QPixmap
  • ...
FALSEevaluated 7171 times by 27 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QBitArray
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDateTime
  • tst_QFile
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainterPath
  • tst_QPdfWriter
  • tst_QPicture
  • tst_QPixmap
  • tst_QPoint
  • tst_QPointF
  • tst_QPrinter
  • tst_QSettings
  • ...
)
6171-7171
65 delete dev;
executed 6171 times by 47 tests: delete dev;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QImage
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QObject
  • tst_QPen
  • tst_QPixmap
  • ...
6171
66}
executed 13342 times by 64 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • ...
13342
67void QDataStream::setDevice(QIODevice *d)-
68{-
69 if (owndev
owndevDescription
TRUEnever evaluated
FALSEevaluated 332 times by 4 tests
Evaluated by:
  • tst_QDataStream
  • tst_QFont
  • tst_QPicture
  • tst_QPrinter
) {
0-332
70 delete dev;-
71 owndev = false;-
72 }
never executed: end of block
0
73 dev = d;-
74}
executed 332 times by 4 tests: end of block
Executed by:
  • tst_QDataStream
  • tst_QFont
  • tst_QPicture
  • tst_QPrinter
332
75-
76-
77-
78-
79-
80-
81-
82void QDataStream::unsetDevice()-
83{-
84 setDevice(0);-
85}
executed 20 times by 1 test: end of block
Executed by:
  • tst_QPrinter
20
86bool QDataStream::atEnd() const-
87{-
88 return
executed 1525 times by 23 tests: return dev ? dev->atEnd() : true;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QKeySequence
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QSplitter
  • tst_QStandardItemModel
  • tst_QTranslator
  • tst_QTreeWidget
  • tst_QVariant
dev
devDescription
TRUEevaluated 1525 times by 23 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QKeySequence
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QSplitter
  • tst_QStandardItemModel
  • tst_QTranslator
  • tst_QTreeWidget
  • tst_QVariant
FALSEnever evaluated
? dev->atEnd() : true;
executed 1525 times by 23 tests: return dev ? dev->atEnd() : true;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QKeySequence
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QSplitter
  • tst_QStandardItemModel
  • tst_QTranslator
  • tst_QTreeWidget
  • tst_QVariant
0-1525
89}-
90QDataStream::FloatingPointPrecision QDataStream::floatingPointPrecision() const-
91{-
92 return
executed 38359 times by 14 tests: return d == 0 ? QDataStream::DoublePrecision : d->floatingPointPrecision;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
d == 0
d == 0Description
TRUEevaluated 38295 times by 14 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_QDataStream
? QDataStream::DoublePrecision : d->floatingPointPrecision;
executed 38359 times by 14 tests: return d == 0 ? QDataStream::DoublePrecision : d->floatingPointPrecision;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
64-38359
93}-
94void QDataStream::setFloatingPointPrecision(QDataStream::FloatingPointPrecision precision)-
95{-
96 if (d == 0
d == 0Description
TRUEevaluated 58 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEnever evaluated
)
0-58
97 d.reset(new QDataStreamPrivate());
executed 58 times by 1 test: d.reset(new QDataStreamPrivate());
Executed by:
  • tst_QDataStream
58
98 d->floatingPointPrecision = precision;-
99}
executed 58 times by 1 test: end of block
Executed by:
  • tst_QDataStream
58
100-
101-
102-
103-
104-
105-
106-
107QDataStream::Status QDataStream::status() const-
108{-
109 return
executed 354545 times by 26 tests: return q_status;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QBitArray
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPixmap
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
  • ...
q_status;
executed 354545 times by 26 tests: return q_status;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QBitArray
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPixmap
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
  • ...
354545
110}-
111-
112-
113-
114-
115-
116-
117void QDataStream::resetStatus()-
118{-
119 q_status = Ok;-
120}
executed 709 times by 14 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
  • tst_languageChange
709
121void QDataStream::setStatus(Status status)-
122{-
123 if (q_status == Ok
q_status == OkDescription
TRUEevaluated 344 times by 10 tests
Evaluated by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QHeaderView
  • tst_QImage
  • tst_QImageReader
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QVariant
FALSEevaluated 135 times by 7 tests
Evaluated by:
  • tst_QDataStream
  • tst_QHeaderView
  • tst_QImage
  • tst_QImageReader
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkDiskCache
)
135-344
124 q_status = status;
executed 344 times by 10 tests: q_status = status;
Executed by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QHeaderView
  • tst_QImage
  • tst_QImageReader
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QVariant
344
125}
executed 479 times by 10 tests: end of block
Executed by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QHeaderView
  • tst_QImage
  • tst_QImageReader
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QVariant
479
126void QDataStream::setByteOrder(ByteOrder bo)-
127{-
128 byteorder = bo;-
129 if (QSysInfo::ByteOrder == QSysInfo::BigEndian
QSysInfo::Byte...nfo::BigEndianDescription
TRUEnever evaluated
FALSEevaluated 950 times by 9 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QPixmap
  • tst_QPrinter
  • tst_QUuid
)
0-950
130 noswap = (byteorder == BigEndian);
never executed: noswap = (byteorder == BigEndian);
0
131 else-
132 noswap = (byteorder == LittleEndian);
executed 950 times by 9 tests: noswap = (byteorder == LittleEndian);
Executed by:
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QPixmap
  • tst_QPrinter
  • tst_QUuid
950
133}-
134QDataStream &QDataStream::operator>>(qint8 &i)-
135{-
136 i = 0;-
137 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 131187 times by 38 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • ...
) { QMessageLogger(__FILE__, 589, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
}
0-131187
138 char c;-
139 if (!dev->getChar(&c)
!dev->getChar(&c)Description
TRUEevaluated 30 times by 4 tests
Evaluated by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QHeaderView
  • tst_QMetaType
FALSEevaluated 131157 times by 38 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • ...
)
30-131157
140 setStatus(ReadPastEnd);
executed 30 times by 4 tests: setStatus(ReadPastEnd);
Executed by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QHeaderView
  • tst_QMetaType
30
141 else-
142 i = qint8(c);
executed 131157 times by 38 tests: i = qint8(c);
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • ...
131157
143 return
executed 131187 times by 38 tests: return *this;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • ...
*this;
executed 131187 times by 38 tests: return *this;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • ...
131187
144}-
145QDataStream &QDataStream::operator>>(qint16 &i)-
146{-
147 i = 0;-
148 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 10378 times by 18 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPixmap
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QVariant
  • tst_QWidget
) { QMessageLogger(__FILE__, 617, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
}
0-10378
149 if (dev->read((char *)&i, 2) != 2
dev->read((char *)&i, 2) != 2Description
TRUEevaluated 60 times by 4 tests
Evaluated by:
  • tst_QDataStream
  • tst_QImage
  • tst_QImageReader
  • tst_QMetaType
FALSEevaluated 10318 times by 18 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPixmap
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QVariant
  • tst_QWidget
) {
60-10318
150 i = 0;-
151 setStatus(ReadPastEnd);-
152 }
executed 60 times by 4 tests: end of block
Executed by:
  • tst_QDataStream
  • tst_QImage
  • tst_QImageReader
  • tst_QMetaType
else {
60
153 if (!noswap
!noswapDescription
TRUEevaluated 8800 times by 14 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QImage
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QVariant
  • tst_QWidget
FALSEevaluated 1518 times by 6 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QPixmap
) {
1518-8800
154 i = qbswap(i);-
155 }
executed 8800 times by 14 tests: end of block
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QImage
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QVariant
  • tst_QWidget
8800
156 }
executed 10318 times by 18 tests: end of block
Executed by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPixmap
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QVariant
  • tst_QWidget
10318
157 return
executed 10378 times by 18 tests: return *this;
Executed by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPixmap
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QVariant
  • tst_QWidget
*this;
executed 10378 times by 18 tests: return *this;
Executed by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPixmap
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QVariant
  • tst_QWidget
10378
158}-
159QDataStream &QDataStream::operator>>(qint32 &i)-
160{-
161 i = 0;-
162 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 120753 times by 56 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • ...
) { QMessageLogger(__FILE__, 648, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
}
0-120753
163 if (dev->read((char *)&i, 4) != 4
dev->read((char *)&i, 4) != 4Description
TRUEevaluated 199 times by 8 tests
Evaluated by:
  • tst_QDataStream
  • tst_QHeaderView
  • tst_QImage
  • tst_QImageReader
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QPixmap
FALSEevaluated 120554 times by 56 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • ...
) {
199-120554
164 i = 0;-
165 setStatus(ReadPastEnd);-
166 }
executed 199 times by 8 tests: end of block
Executed by:
  • tst_QDataStream
  • tst_QHeaderView
  • tst_QImage
  • tst_QImageReader
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QPixmap
else {
199
167 if (!noswap
!noswapDescription
TRUEevaluated 116818 times by 53 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QBitArray
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • ...
FALSEevaluated 3736 times by 6 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QPixmap
) {
3736-116818
168 i = qbswap(i);-
169 }
executed 116818 times by 53 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QBitArray
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • ...
116818
170 }
executed 120554 times by 56 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • ...
120554
171 return
executed 120753 times by 56 tests: return *this;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • ...
*this;
executed 120753 times by 56 tests: return *this;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • ...
120753
172}-
173QDataStream &QDataStream::operator>>(qint64 &i)-
174{-
175 i = qint64(0);-
176 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 34762 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
) { QMessageLogger(__FILE__, 678, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
}
0-34762
177 if (version() < 6
version() < 6Description
TRUEnever evaluated
FALSEevaluated 34762 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
) {
0-34762
178 quint32 i1, i2;-
179 *this >> i2 >> i1;-
180 i = ((quint64)i1 << 32) + i2;-
181 }
never executed: end of block
else {
0
182 if (dev->read((char *)&i, 8) != 8
dev->read((char *)&i, 8) != 8Description
TRUEevaluated 50 times by 2 tests
Evaluated by:
  • tst_QDataStream
  • tst_QMetaType
FALSEevaluated 34712 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
) {
50-34712
183 i = qint64(0);-
184 setStatus(ReadPastEnd);-
185 }
executed 50 times by 2 tests: end of block
Executed by:
  • tst_QDataStream
  • tst_QMetaType
else {
50
186 if (!noswap
!noswapDescription
TRUEevaluated 34700 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QDataStream
) {
12-34700
187 i = qbswap(i);-
188 }
executed 34700 times by 12 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
34700
189 }
executed 34712 times by 12 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
34712
190 }-
191 return
executed 34762 times by 12 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
*this;
executed 34762 times by 12 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
34762
192}-
193-
194-
195-
196-
197-
198QDataStream &QDataStream::operator>>(bool &i)-
199{-
200 qint8 v;-
201 *this >> v;-
202 i = !!v;-
203 return
executed 17617 times by 18 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPrinter
  • tst_QSplitter
  • tst_QTimeZone
  • tst_languageChange
*this;
executed 17617 times by 18 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPrinter
  • tst_QSplitter
  • tst_QTimeZone
  • tst_languageChange
17617
204}-
205QDataStream &QDataStream::operator>>(float &f)-
206{-
207 if (version() >= QDataStream::Qt_4_6
version() >= Q...Stream::Qt_4_6Description
TRUEevaluated 38 times by 3 tests
Evaluated by:
  • tst_QDataStream
  • tst_QMetaType
  • tst_QVariant
FALSEnever evaluated
0-38
208 && floatingPointPrecision() == QDataStream::DoublePrecision
floatingPointP...oublePrecisionDescription
TRUEevaluated 12 times by 3 tests
Evaluated by:
  • tst_QDataStream
  • tst_QMetaType
  • tst_QVariant
FALSEevaluated 26 times by 1 test
Evaluated by:
  • tst_QDataStream
) {
12-26
209 double d;-
210 *this >> d;-
211 f = d;-
212 return
executed 12 times by 3 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QMetaType
  • tst_QVariant
*this;
executed 12 times by 3 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QMetaType
  • tst_QVariant
12
213 }-
214-
215 f = 0.0f;-
216 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 26 times by 1 test
Evaluated by:
  • tst_QDataStream
) { QMessageLogger(__FILE__, 729, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
}
0-26
217 if (dev->read((char *)&f, 4) != 4
dev->read((char *)&f, 4) != 4Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_QDataStream
) {
10-16
218 f = 0.0f;-
219 setStatus(ReadPastEnd);-
220 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_QDataStream
else {
10
221 if (!noswap
!noswapDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QDataStream
) {
6-10
222 union {-
223 float val1;-
224 quint32 val2;-
225 } x;-
226 x.val2 = qbswap(*reinterpret_cast<quint32 *>(&f));-
227 f = x.val1;-
228 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_QDataStream
10
229 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_QDataStream
16
230 return
executed 26 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
*this;
executed 26 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
26
231}-
232QDataStream &QDataStream::operator>>(double &f)-
233{-
234 if (version() >= QDataStream::Qt_4_6
version() >= Q...Stream::Qt_4_6Description
TRUEevaluated 9326 times by 13 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QVariant
FALSEevaluated 3248 times by 2 tests
Evaluated by:
  • tst_QDataStream
  • tst_QFont
3248-9326
235 && floatingPointPrecision() == QDataStream::SinglePrecision
floatingPointP...inglePrecisionDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 9325 times by 13 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QVariant
) {
1-9325
236 float d;-
237 *this >> d;-
238 f = d;-
239 return
executed 1 time by 1 test: return *this;
Executed by:
  • tst_QDataStream
*this;
executed 1 time by 1 test: return *this;
Executed by:
  • tst_QDataStream
1
240 }-
241-
242 f = 0.0;-
243 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 12573 times by 13 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QVariant
) { QMessageLogger(__FILE__, 767, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
}
0-12573
244 if (dev->read((char *)&f, 8) != 8
dev->read((char *)&f, 8) != 8Description
TRUEevaluated 46 times by 2 tests
Evaluated by:
  • tst_QDataStream
  • tst_QMetaType
FALSEevaluated 12527 times by 13 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QVariant
) {
46-12527
245 f = 0.0;-
246 setStatus(ReadPastEnd);-
247 }
executed 46 times by 2 tests: end of block
Executed by:
  • tst_QDataStream
  • tst_QMetaType
else {
46
248 if (!noswap
!noswapDescription
TRUEevaluated 12520 times by 13 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QVariant
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_QDataStream
) {
7-12520
249 union {-
250 double val1;-
251 quint64 val2;-
252 } x;-
253 x.val2 = qbswap(*reinterpret_cast<quint64 *>(&f));-
254 f = x.val1;-
255 }
executed 12520 times by 13 tests: end of block
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QVariant
12520
256 }
executed 12527 times by 13 tests: end of block
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QVariant
12527
257 return
executed 12573 times by 13 tests: return *this;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QVariant
*this;
executed 12573 times by 13 tests: return *this;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QVariant
12573
258}-
259QDataStream &QDataStream::operator>>(char *&s)-
260{-
261 uint len = 0;-
262 return
executed 28 times by 1 test: return readBytes(s, len);
Executed by:
  • tst_QDataStream
readBytes(s, len);
executed 28 times by 1 test: return readBytes(s, len);
Executed by:
  • tst_QDataStream
28
263}-
264QDataStream &QDataStream::readBytes(char *&s, uint &l)-
265{-
266 s = 0;-
267 l = 0;-
268 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 56 times by 1 test
Evaluated by:
  • tst_QDataStream
) { QMessageLogger(__FILE__, 827, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
}
0-56
269-
270 quint32 len;-
271 *this >> len;-
272 if (len == 0
len == 0Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 46 times by 1 test
Evaluated by:
  • tst_QDataStream
)
10-46
273 return
executed 10 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
*this;
executed 10 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
10
274-
275 const quint32 Step = 1024 * 1024;-
276 quint32 allocated = 0;-
277 char *prevBuf = 0;-
278 char *curBuf = 0;-
279-
280 do {-
281 int blockSize = qMin(Step, len - allocated);-
282 prevBuf = curBuf;-
283 curBuf = new char[allocated + blockSize + 1];-
284 if (prevBuf
prevBufDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 46 times by 1 test
Evaluated by:
  • tst_QDataStream
) {
28-46
285 memcpy(curBuf, prevBuf, allocated);-
286 delete [] prevBuf;-
287 }
executed 28 times by 1 test: end of block
Executed by:
  • tst_QDataStream
28
288 if (dev->read(curBuf + allocated, blockSize) != blockSize
dev->read(curB...) != blockSizeDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 50 times by 1 test
Evaluated by:
  • tst_QDataStream
) {
24-50
289 delete [] curBuf;-
290 setStatus(ReadPastEnd);-
291 return
executed 24 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
*this;
executed 24 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
24
292 }-
293 allocated += blockSize;-
294 }
executed 50 times by 1 test: end of block
Executed by:
  • tst_QDataStream
while (allocated < len
allocated < lenDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_QDataStream
);
22-50
295-
296 s = curBuf;-
297 s[len] = '\0';-
298 l = (uint)len;-
299 return
executed 22 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
*this;
executed 22 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
22
300}-
301int QDataStream::readRawData(char *s, int len)-
302{-
303 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 18453 times by 41 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • ...
) { QMessageLogger(__FILE__, 872, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return -1;
-1;
never executed: return -1;
}
0-18453
304 return
executed 18453 times by 41 tests: return dev->read(s, len);
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • ...
dev->read(s, len);
executed 18453 times by 41 tests: return dev->read(s, len);
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • ...
18453
305}-
306QDataStream &QDataStream::operator<<(qint8 i)-
307{-
308 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 27410 times by 31 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFile
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHostAddress
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStandardItemModel
  • ...
) { QMessageLogger(__FILE__, 897, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
} if (q_status != Ok
q_status != OkDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 27408 times by 31 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFile
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHostAddress
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStandardItemModel
  • ...
) return
executed 2 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
*this;
executed 2 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
0-27410
309 if (!dev->putChar(i)
!dev->putChar(i)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 27406 times by 31 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFile
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHostAddress
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStandardItemModel
  • ...
)
2-27406
310 q_status = WriteFailed;
executed 2 times by 1 test: q_status = WriteFailed;
Executed by:
  • tst_QDataStream
2
311 return
executed 27408 times by 31 tests: return *this;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFile
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHostAddress
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStandardItemModel
  • ...
*this;
executed 27408 times by 31 tests: return *this;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFile
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHostAddress
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStandardItemModel
  • ...
27408
312}-
313QDataStream &QDataStream::operator<<(qint16 i)-
314{-
315 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 20192 times by 19 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPixmap
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_QWidget
) { QMessageLogger(__FILE__, 921, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
} if (q_status != Ok
q_status != OkDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 20190 times by 19 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPixmap
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_QWidget
) return
executed 2 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
*this;
executed 2 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
0-20192
316 if (!noswap
!noswapDescription
TRUEevaluated 19900 times by 14 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_QWidget
FALSEevaluated 290 times by 5 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QPixmap
) {
290-19900
317 i = qbswap(i);-
318 }
executed 19900 times by 14 tests: end of block
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_QWidget
19900
319 if (dev->write((char *)&i, sizeof(qint16)) != sizeof(qint16)
dev->write((ch...sizeof(qint16)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 20188 times by 19 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPixmap
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_QWidget
)
2-20188
320 q_status = WriteFailed;
executed 2 times by 1 test: q_status = WriteFailed;
Executed by:
  • tst_QDataStream
2
321 return
executed 20190 times by 19 tests: return *this;
Executed by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPixmap
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_QWidget
*this;
executed 20190 times by 19 tests: return *this;
Executed by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPixmap
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_QWidget
20190
322}-
323QDataStream &QDataStream::operator<<(qint32 i)-
324{-
325 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 74296 times by 56 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • ...
) { QMessageLogger(__FILE__, 939, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
} if (q_status != Ok
q_status != OkDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 74293 times by 56 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • ...
) return
executed 3 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
*this;
executed 3 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
0-74296
326 if (!noswap
!noswapDescription
TRUEevaluated 73794 times by 53 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QBitArray
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • ...
FALSEevaluated 499 times by 5 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QPixmap
) {
499-73794
327 i = qbswap(i);-
328 }
executed 73794 times by 53 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QBitArray
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • ...
73794
329 if (dev->write((char *)&i, sizeof(qint32)) != sizeof(qint32)
dev->write((ch...sizeof(qint32)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 74290 times by 56 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • ...
)
3-74290
330 q_status = WriteFailed;
executed 3 times by 1 test: q_status = WriteFailed;
Executed by:
  • tst_QDataStream
3
331 return
executed 74293 times by 56 tests: return *this;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • ...
*this;
executed 74293 times by 56 tests: return *this;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • ...
74293
332}-
333QDataStream &QDataStream::operator<<(qint64 i)-
334{-
335 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 5666 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
) { QMessageLogger(__FILE__, 965, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
} if (q_status != Ok
q_status != OkDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 5664 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
) return
executed 2 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
*this;
executed 2 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
0-5666
336 if (version() < 6
version() < 6Description
TRUEnever evaluated
FALSEevaluated 5664 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
) {
0-5664
337 quint32 i1 = i & 0xffffffff;-
338 quint32 i2 = i >> 32;-
339 *this << i2 << i1;-
340 }
never executed: end of block
else {
0
341 if (!noswap
!noswapDescription
TRUEevaluated 5660 times by 11 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QAuthenticator
) {
4-5660
342 i = qbswap(i);-
343 }
executed 5660 times by 11 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
5660
344 if (dev->write((char *)&i, sizeof(qint64)) != sizeof(qint64)
dev->write((ch...sizeof(qint64)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 5662 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
)
2-5662
345 q_status = WriteFailed;
executed 2 times by 1 test: q_status = WriteFailed;
Executed by:
  • tst_QDataStream
2
346 }
executed 5664 times by 12 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
5664
347 return
executed 5664 times by 12 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
*this;
executed 5664 times by 12 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
5664
348}-
349QDataStream &QDataStream::operator<<(bool i)-
350{-
351 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 2132 times by 17 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSplitter
  • tst_languageChange
) { QMessageLogger(__FILE__, 995, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
} if (q_status != Ok
q_status != OkDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 2131 times by 17 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSplitter
  • tst_languageChange
) return
executed 1 time by 1 test: return *this;
Executed by:
  • tst_QDataStream
*this;
executed 1 time by 1 test: return *this;
Executed by:
  • tst_QDataStream
0-2132
352 if (!dev->putChar(qint8(i))
!dev->putChar(qint8(i))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 2130 times by 17 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSplitter
  • tst_languageChange
)
1-2130
353 q_status = WriteFailed;
executed 1 time by 1 test: q_status = WriteFailed;
Executed by:
  • tst_QDataStream
1
354 return
executed 2131 times by 17 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSplitter
  • tst_languageChange
*this;
executed 2131 times by 17 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSplitter
  • tst_languageChange
2131
355}-
356QDataStream &QDataStream::operator<<(float f)-
357{-
358 if (version() >= QDataStream::Qt_4_6
version() >= Q...Stream::Qt_4_6Description
TRUEevaluated 14 times by 3 tests
Evaluated by:
  • tst_QDataStream
  • tst_QMetaType
  • tst_QVariant
FALSEnever evaluated
0-14
359 && floatingPointPrecision() == QDataStream::DoublePrecision
floatingPointP...oublePrecisionDescription
TRUEevaluated 10 times by 3 tests
Evaluated by:
  • tst_QDataStream
  • tst_QMetaType
  • tst_QVariant
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QDataStream
) {
4-10
360 *this << double(f);-
361 return
executed 10 times by 3 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QMetaType
  • tst_QVariant
*this;
executed 10 times by 3 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QMetaType
  • tst_QVariant
10
362 }-
363-
364 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QDataStream
) { QMessageLogger(__FILE__, 1018, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
} if (q_status != Ok
q_status != OkDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QDataStream
) return
never executed: return *this;
*this;
never executed: return *this;
0-4
365 float g = f;-
366 if (!noswap
!noswapDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEnever evaluated
) {
0-4
367 union {-
368 float val1;-
369 quint32 val2;-
370 } x;-
371 x.val1 = g;-
372 x.val2 = qbswap(x.val2);-
373-
374 if (dev->write((char *)&x.val2, sizeof(float)) != sizeof(float)
dev->write((ch... sizeof(float)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QDataStream
)
0-4
375 q_status = WriteFailed;
never executed: q_status = WriteFailed;
0
376 return
executed 4 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
*this;
executed 4 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
4
377 }-
378-
379 if (dev->write((char *)&g, sizeof(float)) != sizeof(float)
dev->write((ch... sizeof(float)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
380 q_status = WriteFailed;
never executed: q_status = WriteFailed;
0
381 return
never executed: return *this;
*this;
never executed: return *this;
0
382}-
383QDataStream &QDataStream::operator<<(double f)-
384{-
385 if (version() >= QDataStream::Qt_4_6
version() >= Q...Stream::Qt_4_6Description
TRUEevaluated 28980 times by 14 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
FALSEevaluated 3187 times by 2 tests
Evaluated by:
  • tst_QDataStream
  • tst_QFont
3187-28980
386 && floatingPointPrecision() == QDataStream::SinglePrecision
floatingPointP...inglePrecisionDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 28979 times by 14 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
) {
1-28979
387 *this << float(f);-
388 return
executed 1 time by 1 test: return *this;
Executed by:
  • tst_QDataStream
*this;
executed 1 time by 1 test: return *this;
Executed by:
  • tst_QDataStream
1
389 }-
390-
391 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 32166 times by 14 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
) { QMessageLogger(__FILE__, 1056, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
} if (q_status != Ok
q_status != OkDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 32164 times by 14 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
) return
executed 2 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
*this;
executed 2 times by 1 test: return *this;
Executed by:
  • tst_QDataStream
0-32166
392 if (noswap
noswapDescription
TRUEnever evaluated
FALSEevaluated 32164 times by 14 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
) {
0-32164
393 if (dev->write((char *)&f, sizeof(double)) != sizeof(double)
dev->write((ch...sizeof(double)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
394 q_status = WriteFailed;
never executed: q_status = WriteFailed;
0
395 }
never executed: end of block
else {
0
396 union {-
397 double val1;-
398 quint64 val2;-
399 } x;-
400 x.val1 = f;-
401 x.val2 = qbswap(x.val2);-
402 if (dev->write((char *)&x.val2, sizeof(double)) != sizeof(double)
dev->write((ch...sizeof(double)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 32162 times by 14 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
)
2-32162
403 q_status = WriteFailed;
executed 2 times by 1 test: q_status = WriteFailed;
Executed by:
  • tst_QDataStream
2
404 }
executed 32164 times by 14 tests: end of block
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
32164
405 return
executed 32164 times by 14 tests: return *this;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
*this;
executed 32164 times by 14 tests: return *this;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
32164
406}-
407QDataStream &QDataStream::operator<<(const char *s)-
408{-
409 if (!s
!sDescription
TRUEnever evaluated
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QDataStream
  • tst_QVariant
) {
0-4
410 *this << (quint32)0;-
411 return
never executed: return *this;
*this;
never executed: return *this;
0
412 }-
413 uint len = qstrlen(s) + 1;-
414 *this << (quint32)len;-
415 writeRawData(s, len);-
416 return
executed 4 times by 2 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QVariant
*this;
executed 4 times by 2 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QVariant
4
417}-
418QDataStream &QDataStream::writeBytes(const char *s, uint len)-
419{-
420 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 15693 times by 31 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHostAddress
  • tst_QIcon
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPrinter
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStandardItemModel
  • ...
) { QMessageLogger(__FILE__, 1110, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
} if (q_status != Ok
q_status != OkDescription
TRUEnever evaluated
FALSEevaluated 15693 times by 31 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHostAddress
  • tst_QIcon
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPrinter
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStandardItemModel
  • ...
) return
never executed: return *this;
*this;
never executed: return *this;
0-15693
421 *this << (quint32)len;-
422 if (len
lenDescription
TRUEevaluated 15469 times by 31 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHostAddress
  • tst_QIcon
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPrinter
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStandardItemModel
  • ...
FALSEevaluated 224 times by 7 tests
Evaluated by:
  • tst_QDataStream
  • tst_QMetaObjectBuilder
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSettings
  • tst_QVariant
)
224-15469
423 writeRawData(s, len);
executed 15469 times by 31 tests: writeRawData(s, len);
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHostAddress
  • tst_QIcon
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPrinter
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStandardItemModel
  • ...
15469
424 return
executed 15693 times by 31 tests: return *this;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHostAddress
  • tst_QIcon
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPrinter
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStandardItemModel
  • ...
*this;
executed 15693 times by 31 tests: return *this;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHostAddress
  • tst_QIcon
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • tst_QPrinter
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStandardItemModel
  • ...
15693
425}-
426int QDataStream::writeRawData(const char *s, int len)-
427{-
428 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 16953 times by 40 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • ...
) { QMessageLogger(__FILE__, 1128, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return -1;
-1;
never executed: return -1;
} if (q_status != Ok
q_status != OkDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 16950 times by 40 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • ...
) return
executed 3 times by 1 test: return -1;
Executed by:
  • tst_QDataStream
-1;
executed 3 times by 1 test: return -1;
Executed by:
  • tst_QDataStream
0-16953
429 int ret = dev->write(s, len);-
430 if (ret != len
ret != lenDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 16949 times by 40 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • ...
)
1-16949
431 q_status = WriteFailed;
executed 1 time by 1 test: q_status = WriteFailed;
Executed by:
  • tst_QDataStream
1
432 return
executed 16950 times by 40 tests: return ret;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • ...
ret;
executed 16950 times by 40 tests: return ret;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFont
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPicture
  • ...
16950
433}-
434int QDataStream::skipRawData(int len)-
435{-
436 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 24 times by 2 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QDataStream
) { QMessageLogger(__FILE__, 1148, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return -1;
-1;
never executed: return -1;
}
0-24
437-
438 if (dev->isSequential()
dev->isSequential()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 21 times by 2 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QDataStream
) {
3-21
439 char buf[4096];-
440 int sumRead = 0;-
441-
442 while (len > 0
len > 0Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDataStream
) {
3-9
443 int blockSize = qMin(len, (int)sizeof(buf));-
444 int n = dev->read(buf, blockSize);-
445 if (n == -1
n == -1Description
TRUEnever evaluated
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_QDataStream
)
0-9
446 return
never executed: return -1;
-1;
never executed: return -1;
0
447 if (n == 0
n == 0Description
TRUEnever evaluated
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_QDataStream
)
0-9
448 return
never executed: return sumRead;
sumRead;
never executed: return sumRead;
0
449-
450 sumRead += n;-
451 len -= blockSize;-
452 }
executed 9 times by 1 test: end of block
Executed by:
  • tst_QDataStream
9
453 return
executed 3 times by 1 test: return sumRead;
Executed by:
  • tst_QDataStream
sumRead;
executed 3 times by 1 test: return sumRead;
Executed by:
  • tst_QDataStream
3
454 } else {-
455 qint64 pos = dev->pos();-
456 qint64 size = dev->size();-
457 if (pos + len > size
pos + len > sizeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 20 times by 2 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QDataStream
)
1-20
458 len = size - pos;
executed 1 time by 1 test: len = size - pos;
Executed by:
  • tst_QDataStream
1
459 if (!dev->seek(pos + len)
!dev->seek(pos + len)Description
TRUEnever evaluated
FALSEevaluated 21 times by 2 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QDataStream
)
0-21
460 return
never executed: return -1;
-1;
never executed: return -1;
0
461 return
executed 21 times by 2 tests: return len;
Executed by:
  • tst_QAuthenticator
  • tst_QDataStream
len;
executed 21 times by 2 tests: return len;
Executed by:
  • tst_QAuthenticator
  • tst_QDataStream
21
462 }-
463}-
464-
465-
Switch to Source codePreprocessed file

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