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 7498 times by 23 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QBitArray
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDateTime
  • tst_QFile
  • tst_QGuiVariant
  • tst_QIODevice
  • 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
7498
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 6224 times by 47 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_QIODevice
  • tst_QImage
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QObject
  • tst_QPen
  • ...
6224
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 6362 times by 48 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_QIODevice
  • tst_QImage
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QObject
  • tst_QPen
  • ...
FALSEevaluated 7790 times by 28 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QBitArray
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDateTime
  • tst_QFile
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • 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
  • ...
)
6362-7790
65 delete dev;
executed 6362 times by 48 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_QIODevice
  • tst_QImage
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QObject
  • tst_QPen
  • ...
6362
66}
executed 14152 times by 65 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
14152
67void QDataStream::setDevice(QIODevice *d)-
68{-
69 if (owndev
owndevDescription
TRUEnever evaluated
FALSEevaluated 654 times by 5 tests
Evaluated by:
  • tst_QDataStream
  • tst_QFont
  • tst_QIODevice
  • tst_QPicture
  • tst_QPrinter
) {
0-654
70 delete dev;-
71 owndev = false;-
72 }
never executed: end of block
0
73 dev = d;-
74}
executed 654 times by 5 tests: end of block
Executed by:
  • tst_QDataStream
  • tst_QFont
  • tst_QIODevice
  • tst_QPicture
  • tst_QPrinter
654
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 2599 times by 16 tests: return dev ? dev->atEnd() : true;
Executed by:
  • tst_QAbstractItemModel
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • tst_QKeySequence
  • tst_QMainWindow
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItemModel
  • tst_QTranslator
dev ? dev->atEnd() : true;
executed 2599 times by 16 tests: return dev ? dev->atEnd() : true;
Executed by:
  • tst_QAbstractItemModel
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • tst_QKeySequence
  • tst_QMainWindow
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItemModel
  • tst_QTranslator
2599
89}-
90QDataStream::FloatingPointPrecision QDataStream::floatingPointPrecision() const-
91{-
92 return
executed 42061 times by 15 tests: return d == 0 ? QDataStream::DoublePrecision : d->floatingPointPrecision;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
d == 0 ? QDataStream::DoublePrecision : d->floatingPointPrecision;
executed 42061 times by 15 tests: return d == 0 ? QDataStream::DoublePrecision : d->floatingPointPrecision;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
42061
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 360373 times by 37 tests: return q_status;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QBitArray
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • ...
q_status;
executed 360373 times by 37 tests: return q_status;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QBitArray
  • tst_QBrush
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • ...
360373
110}-
111-
112-
113-
114-
115-
116-
117void QDataStream::resetStatus()-
118{-
119 q_status = Ok;-
120}
executed 3290 times by 26 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QBrush
  • tst_QDataStream
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QListWidget
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QSettings
  • tst_QSplitter
  • tst_QStandardItem
  • tst_QStandardItemModel
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QVariant
  • tst_QVersionNumber
  • ...
3290
121void QDataStream::setStatus(Status status)-
122{-
123 if (q_status == Ok
q_status == OkDescription
TRUEevaluated 1344 times by 13 tests
Evaluated by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QVariant
  • tst_languageChange
FALSEevaluated 200 times by 7 tests
Evaluated by:
  • tst_QDataStream
  • tst_QHeaderView
  • tst_QImage
  • tst_QImageReader
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkDiskCache
)
200-1344
124 q_status = status;
executed 1344 times by 13 tests: q_status = status;
Executed by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QVariant
  • tst_languageChange
1344
125}
executed 1544 times by 13 tests: end of block
Executed by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QVariant
  • tst_languageChange
1544
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}-
134void QDataStream::startTransaction()-
135{-
136 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 719 times by 1 test
Evaluated by:
  • tst_QDataStream
) { QMessageLogger(__FILE__, 630, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return ;
;
never executed: return ;
}
0-719
137-
138 if (d == 0
d == 0Description
TRUEevaluated 409 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 310 times by 1 test
Evaluated by:
  • tst_QDataStream
)
310-409
139 d.reset(new QDataStreamPrivate());
executed 409 times by 1 test: d.reset(new QDataStreamPrivate());
Executed by:
  • tst_QDataStream
409
140-
141 if (++
++d->transactionDepth == 1Description
TRUEevaluated 701 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_QDataStream
d->transactionDepth == 1
++d->transactionDepth == 1Description
TRUEevaluated 701 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_QDataStream
) {
18-701
142 dev->startTransaction();-
143 resetStatus();-
144 }
executed 701 times by 1 test: end of block
Executed by:
  • tst_QDataStream
701
145}
executed 719 times by 1 test: end of block
Executed by:
  • tst_QDataStream
719
146bool QDataStream::commitTransaction()-
147{-
148 if (!d
!dDescription
TRUEnever evaluated
FALSEevaluated 707 times by 1 test
Evaluated by:
  • tst_QDataStream
|| d->transactionDepth == 0
d->transactionDepth == 0Description
TRUEnever evaluated
FALSEevaluated 707 times by 1 test
Evaluated by:
  • tst_QDataStream
) { QMessageLogger(__FILE__, 663, __PRETTY_FUNCTION__).warning("QDataStream: No transaction in progress"); return
never executed: return false;
false;
never executed: return false;
}
0-707
149 if (--
--d->transactionDepth == 0Description
TRUEevaluated 701 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QDataStream
d->transactionDepth == 0
--d->transactionDepth == 0Description
TRUEevaluated 701 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QDataStream
) {
6-701
150 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 701 times by 1 test
Evaluated by:
  • tst_QDataStream
) { QMessageLogger(__FILE__, 665, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return false;
false;
never executed: return false;
}
0-701
151-
152 if (q_status == ReadPastEnd
q_status == ReadPastEndDescription
TRUEevaluated 370 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 331 times by 1 test
Evaluated by:
  • tst_QDataStream
) {
331-370
153 dev->rollbackTransaction();-
154 return
executed 370 times by 1 test: return false;
Executed by:
  • tst_QDataStream
false;
executed 370 times by 1 test: return false;
Executed by:
  • tst_QDataStream
370
155 }-
156 dev->commitTransaction();-
157 }
executed 331 times by 1 test: end of block
Executed by:
  • tst_QDataStream
331
158 return
executed 337 times by 1 test: return q_status == Ok;
Executed by:
  • tst_QDataStream
q_status == Ok;
executed 337 times by 1 test: return q_status == Ok;
Executed by:
  • tst_QDataStream
337
159}-
160void QDataStream::rollbackTransaction()-
161{-
162 setStatus(ReadPastEnd);-
163-
164 if (!d
!dDescription
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QDataStream
|| d->transactionDepth == 0
d->transactionDepth == 0Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QDataStream
) { QMessageLogger(__FILE__, 703, __PRETTY_FUNCTION__).warning("QDataStream: No transaction in progress"); return
never executed: return ;
;
never executed: return ;
}
0-6
165 if (--
--d->transactionDepth != 0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEnever evaluated
d->transactionDepth != 0
--d->transactionDepth != 0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEnever evaluated
)
0-6
166 return;
executed 6 times by 1 test: return;
Executed by:
  • tst_QDataStream
6
167-
168 if (!dev
!devDescription
TRUEnever evaluated
FALSEnever evaluated
) { QMessageLogger(__FILE__, 707, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return ;
;
never executed: return ;
}
0
169 if (q_status == ReadPastEnd
q_status == ReadPastEndDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
170 dev->rollbackTransaction();
never executed: dev->rollbackTransaction();
0
171 else-
172 dev->commitTransaction();
never executed: dev->commitTransaction();
0
173}-
174void QDataStream::abortTransaction()-
175{-
176 q_status = ReadCorruptData;-
177-
178 if (!d
!dDescription
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QDataStream
|| d->transactionDepth == 0
d->transactionDepth == 0Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QDataStream
) { QMessageLogger(__FILE__, 739, __PRETTY_FUNCTION__).warning("QDataStream: No transaction in progress"); return
never executed: return ;
;
never executed: return ;
}
0-6
179 if (--
--d->transactionDepth != 0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEnever evaluated
d->transactionDepth != 0
--d->transactionDepth != 0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEnever evaluated
)
0-6
180 return;
executed 6 times by 1 test: return;
Executed by:
  • tst_QDataStream
6
181-
182 if (!dev
!devDescription
TRUEnever evaluated
FALSEnever evaluated
) { QMessageLogger(__FILE__, 743, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return ;
;
never executed: return ;
}
0
183 dev->commitTransaction();-
184}
never executed: end of block
0
185int QDataStream::readBlock(char *data, int len)-
186{-
187-
188 if (q_status != Ok
q_status != OkDescription
TRUEevaluated 1246 times by 8 tests
Evaluated by:
  • tst_QDataStream
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkDiskCache
FALSEevaluated 338953 times by 62 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • ...
&& dev->isTransactionStarted()
dev->isTransactionStarted()Description
TRUEevaluated 1075 times by 2 tests
Evaluated by:
  • tst_QDataStream
  • tst_QIODevice
FALSEevaluated 171 times by 7 tests
Evaluated by:
  • tst_QDataStream
  • tst_QHeaderView
  • tst_QImage
  • tst_QImageReader
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkDiskCache
)
171-338953
189 return
executed 1075 times by 2 tests: return -1;
Executed by:
  • tst_QDataStream
  • tst_QIODevice
-1;
executed 1075 times by 2 tests: return -1;
Executed by:
  • tst_QDataStream
  • tst_QIODevice
1075
190-
191 const int readResult = dev->read(data, len);-
192 if (readResult != len
readResult != lenDescription
TRUEevaluated 1217 times by 12 tests
Evaluated by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_languageChange
FALSEevaluated 337907 times by 62 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • ...
)
1217-337907
193 setStatus(ReadPastEnd);
executed 1217 times by 12 tests: setStatus(ReadPastEnd);
Executed by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_languageChange
1217
194 return
executed 339124 times by 62 tests: return readResult;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • ...
readResult;
executed 339124 times by 62 tests: return readResult;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBrush
  • tst_QBuffer
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDockWidget
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QHostAddress
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • ...
339124
195}-
196QDataStream &QDataStream::operator>>(qint8 &i)-
197{-
198 i = 0;-
199 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 133653 times by 39 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_QIODevice
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • ...
) { QMessageLogger(__FILE__, 783, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
}
0-133653
200 char c;-
201 if (readBlock(&c, 1) == 1
readBlock(&c, 1) == 1Description
TRUEevaluated 133470 times by 39 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_QIODevice
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • ...
FALSEevaluated 183 times by 5 tests
Evaluated by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QMetaType
)
183-133470
202 i = qint8(c);
executed 133470 times by 39 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_QIODevice
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • ...
133470
203 return
executed 133653 times by 39 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_QIODevice
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • ...
*this;
executed 133653 times by 39 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_QIODevice
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • ...
133653
204}-
205QDataStream &QDataStream::operator>>(qint16 &i)-
206{-
207 i = 0;-
208 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 11603 times by 19 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • 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__, 809, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
}
0-11603
209 if (readBlock(reinterpret_cast<char *>(&i), 2) != 2
readBlock(rein...>(&i), 2) != 2Description
TRUEevaluated 87 times by 5 tests
Evaluated by:
  • tst_QDataStream
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QMetaType
FALSEevaluated 11516 times by 19 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPixmap
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QVariant
  • tst_QWidget
) {
87-11516
210 i = 0;-
211 }
executed 87 times by 5 tests: end of block
Executed by:
  • tst_QDataStream
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QMetaType
else {
87
212 if (!noswap
!noswapDescription
TRUEevaluated 9998 times by 15 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • 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-9998
213 i = qbswap(i);-
214 }
executed 9998 times by 15 tests: end of block
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QImage
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QVariant
  • tst_QWidget
9998
215 }
executed 11516 times by 19 tests: end of block
Executed by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPixmap
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QVariant
  • tst_QWidget
11516
216 return
executed 11603 times by 19 tests: return *this;
Executed by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • 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 11603 times by 19 tests: return *this;
Executed by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPixmap
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QVariant
  • tst_QWidget
11603
217}-
218QDataStream &QDataStream::operator>>(qint32 &i)-
219{-
220 i = 0;-
221 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 123863 times by 57 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • ...
) { QMessageLogger(__FILE__, 839, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
}
0-123863
222 if (readBlock(reinterpret_cast<char *>(&i), 4) != 4
readBlock(rein...>(&i), 4) != 4Description
TRUEevaluated 728 times by 10 tests
Evaluated by:
  • tst_QDataStream
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_languageChange
FALSEevaluated 123135 times by 57 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • ...
) {
728-123135
223 i = 0;-
224 }
executed 728 times by 10 tests: end of block
Executed by:
  • tst_QDataStream
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_languageChange
else {
728
225 if (!noswap
!noswapDescription
TRUEevaluated 119399 times by 54 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • ...
FALSEevaluated 3736 times by 6 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QPixmap
) {
3736-119399
226 i = qbswap(i);-
227 }
executed 119399 times by 54 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • ...
119399
228 }
executed 123135 times by 57 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • ...
123135
229 return
executed 123863 times by 57 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • ...
*this;
executed 123863 times by 57 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • ...
123863
230}-
231QDataStream &QDataStream::operator>>(qint64 &i)-
232{-
233 i = qint64(0);-
234 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 35987 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
) { QMessageLogger(__FILE__, 868, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
}
0-35987
235 if (version() < 6
version() < 6Description
TRUEnever evaluated
FALSEevaluated 35987 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
) {
0-35987
236 quint32 i1, i2;-
237 *this >> i2 >> i1;-
238 i = ((quint64)i1 << 32) + i2;-
239 }
never executed: end of block
else {
0
240 if (readBlock(reinterpret_cast<char *>(&i), 8) != 8
readBlock(rein...>(&i), 8) != 8Description
TRUEevaluated 185 times by 3 tests
Evaluated by:
  • tst_QDataStream
  • tst_QIODevice
  • tst_QMetaType
FALSEevaluated 35802 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
) {
185-35802
241 i = qint64(0);-
242 }
executed 185 times by 3 tests: end of block
Executed by:
  • tst_QDataStream
  • tst_QIODevice
  • tst_QMetaType
else {
185
243 if (!noswap
!noswapDescription
TRUEevaluated 35790 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QIODevice
  • 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-35790
244 i = qbswap(i);-
245 }
executed 35790 times by 13 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
35790
246 }
executed 35802 times by 13 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
35802
247 }-
248 return
executed 35987 times by 13 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
*this;
executed 35987 times by 13 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QTimeZone
  • tst_QVariant
35987
249}-
250-
251-
252-
253-
254-
255QDataStream &QDataStream::operator>>(bool &i)-
256{-
257 qint8 v;-
258 *this >> v;-
259 i = !!v;-
260 return
executed 18849 times by 19 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPrinter
  • tst_QSplitter
  • tst_QTimeZone
  • tst_languageChange
*this;
executed 18849 times by 19 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPrinter
  • tst_QSplitter
  • tst_QTimeZone
  • tst_languageChange
18849
261}-
262QDataStream &QDataStream::operator>>(float &f)-
263{-
264 if (version() >= QDataStream::Qt_4_6
version() >= Q...Stream::Qt_4_6Description
TRUEevaluated 1263 times by 4 tests
Evaluated by:
  • tst_QDataStream
  • tst_QIODevice
  • tst_QMetaType
  • tst_QVariant
FALSEnever evaluated
0-1263
265 && floatingPointPrecision() == QDataStream::DoublePrecision
floatingPointP...oublePrecisionDescription
TRUEevaluated 1237 times by 4 tests
Evaluated by:
  • tst_QDataStream
  • tst_QIODevice
  • tst_QMetaType
  • tst_QVariant
FALSEevaluated 26 times by 1 test
Evaluated by:
  • tst_QDataStream
) {
26-1237
266 double d;-
267 *this >> d;-
268 f = d;-
269 return
executed 1237 times by 4 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QIODevice
  • tst_QMetaType
  • tst_QVariant
*this;
executed 1237 times by 4 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QIODevice
  • tst_QMetaType
  • tst_QVariant
1237
270 }-
271-
272 f = 0.0f;-
273 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 26 times by 1 test
Evaluated by:
  • tst_QDataStream
) { QMessageLogger(__FILE__, 918, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
}
0-26
274 if (readBlock(reinterpret_cast<char *>(&f), 4) != 4
readBlock(rein...>(&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
275 f = 0.0f;-
276 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_QDataStream
else {
10
277 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
278 union {-
279 float val1;-
280 quint32 val2;-
281 } x;-
282 x.val2 = qbswap(*reinterpret_cast<quint32 *>(&f));-
283 f = x.val1;-
284 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_QDataStream
10
285 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_QDataStream
16
286 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
287}-
288QDataStream &QDataStream::operator>>(double &f)-
289{-
290 if (version() >= QDataStream::Qt_4_6
version() >= Q...Stream::Qt_4_6Description
TRUEevaluated 11776 times by 14 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • 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-11776
291 && floatingPointPrecision() == QDataStream::SinglePrecision
floatingPointP...inglePrecisionDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 11775 times by 14 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QVariant
) {
1-11775
292 float d;-
293 *this >> d;-
294 f = d;-
295 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
296 }-
297-
298 f = 0.0;-
299 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 15023 times by 14 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QVariant
) { QMessageLogger(__FILE__, 955, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
}
0-15023
300 if (readBlock(reinterpret_cast<char *>(&f), 8) != 8
readBlock(rein...>(&f), 8) != 8Description
TRUEevaluated 550 times by 3 tests
Evaluated by:
  • tst_QDataStream
  • tst_QIODevice
  • tst_QMetaType
FALSEevaluated 14473 times by 14 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QVariant
) {
550-14473
301 f = 0.0;-
302 }
executed 550 times by 3 tests: end of block
Executed by:
  • tst_QDataStream
  • tst_QIODevice
  • tst_QMetaType
else {
550
303 if (!noswap
!noswapDescription
TRUEevaluated 14466 times by 14 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • 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-14466
304 union {-
305 double val1;-
306 quint64 val2;-
307 } x;-
308 x.val2 = qbswap(*reinterpret_cast<quint64 *>(&f));-
309 f = x.val1;-
310 }
executed 14466 times by 14 tests: end of block
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QVariant
14466
311 }
executed 14473 times by 14 tests: end of block
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QVariant
14473
312 return
executed 15023 times by 14 tests: return *this;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QVariant
*this;
executed 15023 times by 14 tests: return *this;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QVariant
15023
313}-
314QDataStream &QDataStream::operator>>(char *&s)-
315{-
316 uint len = 0;-
317 return
executed 1253 times by 2 tests: return readBytes(s, len);
Executed by:
  • tst_QDataStream
  • tst_QIODevice
readBytes(s, len);
executed 1253 times by 2 tests: return readBytes(s, len);
Executed by:
  • tst_QDataStream
  • tst_QIODevice
1253
318}-
319QDataStream &QDataStream::readBytes(char *&s, uint &l)-
320{-
321 s = 0;-
322 l = 0;-
323 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 1281 times by 2 tests
Evaluated by:
  • tst_QDataStream
  • tst_QIODevice
) { QMessageLogger(__FILE__, 1014, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return *this;
*this;
never executed: return *this;
}
0-1281
324-
325 quint32 len;-
326 *this >> len;-
327 if (len == 0
len == 0Description
TRUEevaluated 334 times by 2 tests
Evaluated by:
  • tst_QDataStream
  • tst_QIODevice
FALSEevaluated 947 times by 2 tests
Evaluated by:
  • tst_QDataStream
  • tst_QIODevice
)
334-947
328 return
executed 334 times by 2 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QIODevice
*this;
executed 334 times by 2 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QIODevice
334
329-
330 const quint32 Step = 1024 * 1024;-
331 quint32 allocated = 0;-
332 char *prevBuf = 0;-
333 char *curBuf = 0;-
334-
335 do {-
336 int blockSize = qMin(Step, len - allocated);-
337 prevBuf = curBuf;-
338 curBuf = new char[allocated + blockSize + 1];-
339 if (prevBuf
prevBufDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 947 times by 2 tests
Evaluated by:
  • tst_QDataStream
  • tst_QIODevice
) {
28-947
340 memcpy(curBuf, prevBuf, allocated);-
341 delete [] prevBuf;-
342 }
executed 28 times by 1 test: end of block
Executed by:
  • tst_QDataStream
28
343 if (readBlock(curBuf + allocated, blockSize) != blockSize
readBlock(curB...) != blockSizeDescription
TRUEevaluated 180 times by 2 tests
Evaluated by:
  • tst_QDataStream
  • tst_QIODevice
FALSEevaluated 795 times by 2 tests
Evaluated by:
  • tst_QDataStream
  • tst_QIODevice
) {
180-795
344 delete [] curBuf;-
345 return
executed 180 times by 2 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QIODevice
*this;
executed 180 times by 2 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QIODevice
180
346 }-
347 allocated += blockSize;-
348 }
executed 795 times by 2 tests: end of block
Executed by:
  • tst_QDataStream
  • tst_QIODevice
while (allocated < len
allocated < lenDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 767 times by 2 tests
Evaluated by:
  • tst_QDataStream
  • tst_QIODevice
);
28-795
349-
350 s = curBuf;-
351 s[len] = '\0';-
352 l = (uint)len;-
353 return
executed 767 times by 2 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QIODevice
*this;
executed 767 times by 2 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QIODevice
767
354}-
355int QDataStream::readRawData(char *s, int len)-
356{-
357 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 19060 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__, 1058, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return -1;
-1;
never executed: return -1;
}
0-19060
358 return
executed 19060 times by 41 tests: return readBlock(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
  • ...
readBlock(s, len);
executed 19060 times by 41 tests: return readBlock(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
  • ...
19060
359}-
360QDataStream &QDataStream::operator<<(qint8 i)-
361{-
362 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 27419 times by 32 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_QIODevice
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • ...
) { QMessageLogger(__FILE__, 1083, __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 27417 times by 32 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_QIODevice
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • ...
) 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-27419
363 if (!dev->putChar(i)
!dev->putChar(i)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 27415 times by 32 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_QIODevice
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • ...
)
2-27415
364 q_status = WriteFailed;
executed 2 times by 1 test: q_status = WriteFailed;
Executed by:
  • tst_QDataStream
2
365 return
executed 27417 times by 32 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_QIODevice
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • ...
*this;
executed 27417 times by 32 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_QIODevice
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • ...
27417
366}-
367QDataStream &QDataStream::operator<<(qint16 i)-
368{-
369 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 20205 times by 21 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • 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__, 1107, __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 20203 times by 21 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • 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-20205
370 if (!noswap
!noswapDescription
TRUEevaluated 19913 times by 16 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • 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-19913
371 i = qbswap(i);-
372 }
executed 19913 times by 16 tests: end of block
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSettings
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_QWidget
19913
373 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 20201 times by 21 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • 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-20201
374 q_status = WriteFailed;
executed 2 times by 1 test: q_status = WriteFailed;
Executed by:
  • tst_QDataStream
2
375 return
executed 20203 times by 21 tests: return *this;
Executed by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • 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 20203 times by 21 tests: return *this;
Executed by:
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QDataStream
  • tst_QDockWidget
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • 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
20203
376}-
377QDataStream &QDataStream::operator<<(qint32 i)-
378{-
379 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 74641 times by 57 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • ...
) { QMessageLogger(__FILE__, 1125, __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 74638 times by 57 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • ...
) 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-74641
380 if (!noswap
!noswapDescription
TRUEevaluated 74139 times by 54 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • ...
FALSEevaluated 499 times by 5 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QPixmap
) {
499-74139
381 i = qbswap(i);-
382 }
executed 74139 times by 54 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • tst_QMargins
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • ...
74139
383 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 74635 times by 57 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • ...
)
3-74635
384 q_status = WriteFailed;
executed 3 times by 1 test: q_status = WriteFailed;
Executed by:
  • tst_QDataStream
3
385 return
executed 74638 times by 57 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • ...
*this;
executed 74638 times by 57 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMainWindow
  • ...
74638
386}-
387QDataStream &QDataStream::operator<<(qint64 i)-
388{-
389 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 5675 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
) { QMessageLogger(__FILE__, 1151, __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 5673 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QIODevice
  • 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-5675
390 if (version() < 6
version() < 6Description
TRUEnever evaluated
FALSEevaluated 5673 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
) {
0-5673
391 quint32 i1 = i & 0xffffffff;-
392 quint32 i2 = i >> 32;-
393 *this << i2 << i1;-
394 }
never executed: end of block
else {
0
395 if (!noswap
!noswapDescription
TRUEevaluated 5669 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QIODevice
  • 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-5669
396 i = qbswap(i);-
397 }
executed 5669 times by 12 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
5669
398 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 5671 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
)
2-5671
399 q_status = WriteFailed;
executed 2 times by 1 test: q_status = WriteFailed;
Executed by:
  • tst_QDataStream
2
400 }
executed 5673 times by 13 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
5673
401 return
executed 5673 times by 13 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
*this;
executed 5673 times by 13 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
5673
402}-
403QDataStream &QDataStream::operator<<(bool i)-
404{-
405 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 2155 times by 18 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSplitter
  • tst_languageChange
) { QMessageLogger(__FILE__, 1181, __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 2154 times by 18 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QIODevice
  • 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-2155
406 if (!dev->putChar(qint8(i))
!dev->putChar(qint8(i))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 2153 times by 18 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSplitter
  • tst_languageChange
)
1-2153
407 q_status = WriteFailed;
executed 1 time by 1 test: q_status = WriteFailed;
Executed by:
  • tst_QDataStream
1
408 return
executed 2154 times by 18 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSplitter
  • tst_languageChange
*this;
executed 2154 times by 18 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPen
  • tst_QPicture
  • tst_QPrinter
  • tst_QSplitter
  • tst_languageChange
2154
409}-
410QDataStream &QDataStream::operator<<(float f)-
411{-
412 if (version() >= QDataStream::Qt_4_6
version() >= Q...Stream::Qt_4_6Description
TRUEevaluated 23 times by 4 tests
Evaluated by:
  • tst_QDataStream
  • tst_QIODevice
  • tst_QMetaType
  • tst_QVariant
FALSEnever evaluated
0-23
413 && floatingPointPrecision() == QDataStream::DoublePrecision
floatingPointP...oublePrecisionDescription
TRUEevaluated 19 times by 4 tests
Evaluated by:
  • tst_QDataStream
  • tst_QIODevice
  • tst_QMetaType
  • tst_QVariant
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QDataStream
) {
4-19
414 *this << double(f);-
415 return
executed 19 times by 4 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QIODevice
  • tst_QMetaType
  • tst_QVariant
*this;
executed 19 times by 4 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QIODevice
  • tst_QMetaType
  • tst_QVariant
19
416 }-
417-
418 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QDataStream
) { QMessageLogger(__FILE__, 1204, __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
419 float g = f;-
420 if (!noswap
!noswapDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QDataStream
FALSEnever evaluated
) {
0-4
421 union {-
422 float val1;-
423 quint32 val2;-
424 } x;-
425 x.val1 = g;-
426 x.val2 = qbswap(x.val2);-
427-
428 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
429 q_status = WriteFailed;
never executed: q_status = WriteFailed;
0
430 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
431 }-
432-
433 if (dev->write((char *)&g, sizeof(float)) != sizeof(float)
dev->write((ch... sizeof(float)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
434 q_status = WriteFailed;
never executed: q_status = WriteFailed;
0
435 return
never executed: return *this;
*this;
never executed: return *this;
0
436}-
437QDataStream &QDataStream::operator<<(double f)-
438{-
439 if (version() >= QDataStream::Qt_4_6
version() >= Q...Stream::Qt_4_6Description
TRUEevaluated 28998 times by 15 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • 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-28998
440 && floatingPointPrecision() == QDataStream::SinglePrecision
floatingPointP...inglePrecisionDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 28997 times by 15 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
) {
1-28997
441 *this << float(f);-
442 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
443 }-
444-
445 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 32184 times by 15 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
) { QMessageLogger(__FILE__, 1242, __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 32182 times by 15 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • 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-32184
446 if (noswap
noswapDescription
TRUEnever evaluated
FALSEevaluated 32182 times by 15 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
) {
0-32182
447 if (dev->write((char *)&f, sizeof(double)) != sizeof(double)
dev->write((ch...sizeof(double)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
448 q_status = WriteFailed;
never executed: q_status = WriteFailed;
0
449 }
never executed: end of block
else {
0
450 union {-
451 double val1;-
452 quint64 val2;-
453 } x;-
454 x.val1 = f;-
455 x.val2 = qbswap(x.val2);-
456 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 32180 times by 15 tests
Evaluated by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
)
2-32180
457 q_status = WriteFailed;
executed 2 times by 1 test: q_status = WriteFailed;
Executed by:
  • tst_QDataStream
2
458 }
executed 32182 times by 15 tests: end of block
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
32182
459 return
executed 32182 times by 15 tests: return *this;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
*this;
executed 32182 times by 15 tests: return *this;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QFont
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QMargins
  • tst_QMetaType
  • tst_QPainterPath
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStandardItem
  • tst_QStyleSheetStyle
  • tst_QVariant
32182
460}-
461QDataStream &QDataStream::operator<<(const char *s)-
462{-
463 if (!s
!sDescription
TRUEnever evaluated
FALSEevaluated 14 times by 4 tests
Evaluated by:
  • tst_QDataStream
  • tst_QIODevice
  • tst_QIcon
  • tst_QVariant
) {
0-14
464 *this << (quint32)0;-
465 return
never executed: return *this;
*this;
never executed: return *this;
0
466 }-
467 uint len = qstrlen(s) + 1;-
468 *this << (quint32)len;-
469 writeRawData(s, len);-
470 return
executed 14 times by 4 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QIODevice
  • tst_QIcon
  • tst_QVariant
*this;
executed 14 times by 4 tests: return *this;
Executed by:
  • tst_QDataStream
  • tst_QIODevice
  • tst_QIcon
  • tst_QVariant
14
471}-
472QDataStream &QDataStream::writeBytes(const char *s, uint len)-
473{-
474 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__, 1296, __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
475 *this << (quint32)len;-
476 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
477 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
478 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
479}-
480int QDataStream::writeRawData(const char *s, int len)-
481{-
482 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 16967 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • ...
) { QMessageLogger(__FILE__, 1314, __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 16964 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • ...
) 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-16967
483 int ret = dev->write(s, len);-
484 if (ret != len
ret != lenDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDataStream
FALSEevaluated 16963 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • ...
)
1-16963
485 q_status = WriteFailed;
executed 1 time by 1 test: q_status = WriteFailed;
Executed by:
  • tst_QDataStream
1
486 return
executed 16964 times by 41 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • ...
ret;
executed 16964 times by 41 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_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMetaObjectBuilder
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • ...
16964
487}-
488int QDataStream::skipRawData(int len)-
489{-
490 if (!dev
!devDescription
TRUEnever evaluated
FALSEevaluated 24 times by 2 tests
Evaluated by:
  • tst_QAuthenticator
  • tst_QDataStream
) { QMessageLogger(__FILE__, 1334, __PRETTY_FUNCTION__).warning("QDataStream: No device"); return
never executed: return -1;
-1;
never executed: return -1;
}
0-24
491-
492 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
493 char buf[4096];-
494 int sumRead = 0;-
495-
496 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
497 int blockSize = qMin(len, (int)sizeof(buf));-
498 int n = readBlock(buf, blockSize);-
499 if (n == -1
n == -1Description
TRUEnever evaluated
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_QDataStream
)
0-9
500 return
never executed: return -1;
-1;
never executed: return -1;
0
501 if (n == 0
n == 0Description
TRUEnever evaluated
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_QDataStream
)
0-9
502 return
never executed: return sumRead;
sumRead;
never executed: return sumRead;
0
503-
504 sumRead += n;-
505 len -= blockSize;-
506 }
executed 9 times by 1 test: end of block
Executed by:
  • tst_QDataStream
9
507 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
508 } else {-
509 qint64 pos = dev->pos();-
510 qint64 size = dev->size();-
511 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
512 len = size - pos;
executed 1 time by 1 test: len = size - pos;
Executed by:
  • tst_QDataStream
1
513 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
514 return
never executed: return -1;
-1;
never executed: return -1;
0
515 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
516 }-
517}-
518-
519-
Switch to Source codePreprocessed file

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