qfiledevice.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/io/qfiledevice.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8static const int QFILE_WRITEBUFFER_SIZE = 16384;-
9-
10QFileDevicePrivate::QFileDevicePrivate()-
11 : fileEngine(0),-
12 writeBuffer(QFILE_WRITEBUFFER_SIZE), cachedSize(0),-
13 error(QFile::NoError), lastWasWrite(false)-
14{-
15}
executed 58573 times by 216 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • ...
58573
16-
17QFileDevicePrivate::~QFileDevicePrivate()-
18{-
19 delete fileEngine;-
20 fileEngine = 0;-
21}
executed 58565 times by 220 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • ...
58565
22-
23QAbstractFileEngine * QFileDevicePrivate::engine() const-
24{-
25 if (!fileEngine
!fileEngineDescription
TRUEnever evaluated
FALSEevaluated 451 times by 7 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QSaveFile
  • tst_QSettings
  • tst_languageChange
)
0-451
26 fileEngine = new QFSFileEngine;
never executed: fileEngine = new QFSFileEngine;
0
27 return
executed 451 times by 7 tests: return fileEngine;
Executed by:
  • tst_QColorDialog
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QSaveFile
  • tst_QSettings
  • tst_languageChange
fileEngine;
executed 451 times by 7 tests: return fileEngine;
Executed by:
  • tst_QColorDialog
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QSaveFile
  • tst_QSettings
  • tst_languageChange
451
28}-
29-
30void QFileDevicePrivate::setError(QFileDevice::FileError err)-
31{-
32 error = err;-
33 errorString.clear();-
34}
executed 649116 times by 216 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • ...
649116
35-
36void QFileDevicePrivate::setError(QFileDevice::FileError err, const QString &errStr)-
37{-
38 error = err;-
39 errorString = errStr;-
40}
executed 4140 times by 62 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTime
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QGlobal
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLocalSocket
  • ...
4140
41-
42void QFileDevicePrivate::setError(QFileDevice::FileError err, int errNum)-
43{-
44 error = err;-
45 errorString = qt_error_string(errNum);-
46}
never executed: end of block
0
47QFileDevice::QFileDevice()-
48 : QIODevice(*new QFileDevicePrivate, 0)-
49{-
50}
never executed: end of block
0
51-
52-
53-
54QFileDevice::QFileDevice(QObject *parent)-
55 : QIODevice(*new QFileDevicePrivate, parent)-
56{-
57}
never executed: end of block
0
58-
59-
60-
61QFileDevice::QFileDevice(QFileDevicePrivate &dd, QObject *parent)-
62 : QIODevice(dd, parent)-
63{-
64}
executed 58573 times by 216 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • ...
58573
65-
66-
67-
68-
69-
70QFileDevice::~QFileDevice()-
71{-
72 close();-
73}
executed 58565 times by 220 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • ...
58565
74bool QFileDevice::isSequential() const-
75{-
76 const QFileDevicePrivate * const d = d_func();-
77 return
executed 94236 times by 143 tests: return d->fileEngine && d->fileEngine->isSequential();
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDir
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • ...
d->fileEngine
d->fileEngineDescription
TRUEevaluated 94236 times by 143 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDir
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • ...
FALSEnever evaluated
&& d->fileEngine->isSequential()
d->fileEngine->isSequential()Description
TRUEevaluated 706 times by 8 tests
Evaluated by:
  • tst_QFile
  • tst_QPrinterInfo
  • tst_QRawFont
  • tst_QUuid
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
  • tst_quuid - unknown status
FALSEevaluated 93530 times by 137 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDir
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • ...
;
executed 94236 times by 143 tests: return d->fileEngine && d->fileEngine->isSequential();
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDir
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • ...
0-94236
78}-
79int QFileDevice::handle() const-
80{-
81 const QFileDevicePrivate * const d = d_func();-
82 if (!isOpen()
!isOpen()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 35 times by 6 tests
Evaluated by:
  • tst_QDBusMarshall
  • tst_QFile
  • tst_QFileInfo
  • tst_QKeySequence
  • tst_QTemporaryFile
  • tst_QTranslator
|| !d->fileEngine
!d->fileEngineDescription
TRUEnever evaluated
FALSEevaluated 35 times by 6 tests
Evaluated by:
  • tst_QDBusMarshall
  • tst_QFile
  • tst_QFileInfo
  • tst_QKeySequence
  • tst_QTemporaryFile
  • tst_QTranslator
)
0-35
83 return
executed 4 times by 1 test: return -1;
Executed by:
  • tst_QFile
-1;
executed 4 times by 1 test: return -1;
Executed by:
  • tst_QFile
4
84-
85 return
executed 35 times by 6 tests: return d->fileEngine->handle();
Executed by:
  • tst_QDBusMarshall
  • tst_QFile
  • tst_QFileInfo
  • tst_QKeySequence
  • tst_QTemporaryFile
  • tst_QTranslator
d->fileEngine->handle();
executed 35 times by 6 tests: return d->fileEngine->handle();
Executed by:
  • tst_QDBusMarshall
  • tst_QFile
  • tst_QFileInfo
  • tst_QKeySequence
  • tst_QTemporaryFile
  • tst_QTranslator
35
86}-
87-
88-
89-
90-
91-
92QString QFileDevice::fileName() const-
93{-
94 return
never executed: return QString();
QString();
never executed: return QString();
0
95}-
96-
97static inline qint64 _qfile_writeData(QAbstractFileEngine *engine, QRingBuffer *buffer)-
98{-
99 qint64 ret = engine->write(buffer->readPointer(), buffer->nextDataBlockSize());-
100 if (ret > 0
ret > 0Description
TRUEevaluated 18438 times by 42 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QFile
)
6-18438
101 buffer->free(ret);
executed 18438 times by 42 tests: buffer->free(ret);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
18438
102 return
executed 18444 times by 42 tests: return ret;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
ret;
executed 18444 times by 42 tests: return ret;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
18444
103}-
104-
105-
106-
107-
108-
109bool QFileDevice::flush()-
110{-
111 QFileDevicePrivate * const d = d_func();-
112 if (!d->fileEngine
!d->fileEngineDescription
TRUEnever evaluated
FALSEevaluated 58964 times by 180 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • ...
) {
0-58964
113 QMessageLogger(__FILE__, 287, __PRETTY_FUNCTION__).warning("QFileDevice::flush: No file engine. Is IODevice open?");-
114 return
never executed: return false;
false;
never executed: return false;
0
115 }-
116-
117 if (!d->writeBuffer.isEmpty()
!d->writeBuffer.isEmpty()Description
TRUEevaluated 18444 times by 42 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
FALSEevaluated 40520 times by 180 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • ...
) {
18444-40520
118 qint64 size = d->writeBuffer.size();-
119 if (_qfile_writeData(d->fileEngine, &d->writeBuffer) != size
_qfile_writeDa...uffer) != sizeDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 18438 times by 42 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
) {
6-18438
120 QFileDevice::FileError err = d->fileEngine->error();-
121 if (err == QFileDevice::UnspecifiedError
err == QFileDe...specifiedErrorDescription
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QFile
)
0-6
122 err = QFileDevice::WriteError;
never executed: err = QFileDevice::WriteError;
0
123 d->setError(err, d->fileEngine->errorString());-
124 return
executed 6 times by 1 test: return false;
Executed by:
  • tst_QFile
false;
executed 6 times by 1 test: return false;
Executed by:
  • tst_QFile
6
125 }-
126 }
executed 18438 times by 42 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
18438
127-
128 if (!d->fileEngine->flush()
!d->fileEngine->flush()Description
TRUEnever evaluated
FALSEevaluated 58958 times by 180 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • ...
) {
0-58958
129 QFileDevice::FileError err = d->fileEngine->error();-
130 if (err == QFileDevice::UnspecifiedError
err == QFileDe...specifiedErrorDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
131 err = QFileDevice::WriteError;
never executed: err = QFileDevice::WriteError;
0
132 d->setError(err, d->fileEngine->errorString());-
133 return
never executed: return false;
false;
never executed: return false;
0
134 }-
135 return
executed 58958 times by 180 tests: return true;
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • ...
true;
executed 58958 times by 180 tests: return true;
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • ...
58958
136}-
137-
138-
139-
140-
141-
142-
143void QFileDevice::close()-
144{-
145 QFileDevicePrivate * const d = d_func();-
146 if (!isOpen()
!isOpen()Description
TRUEevaluated 36721 times by 194 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • ...
FALSEevaluated 40805 times by 180 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • ...
)
36721-40805
147 return;
executed 36721 times by 194 tests: return;
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • ...
36721
148 bool flushed = flush();-
149 QIODevice::close();-
150-
151-
152 d->lastWasWrite = false;-
153 d->writeBuffer.clear();-
154-
155-
156 if (d->fileEngine->close()
d->fileEngine->close()Description
TRUEevaluated 40805 times by 180 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • ...
FALSEnever evaluated
&& flushed
flushedDescription
TRUEevaluated 40803 times by 180 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • ...
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QFile
)
0-40805
157 unsetError();
executed 40803 times by 180 tests: unsetError();
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • ...
40803
158 else if (flushed
flushedDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QFile
)
0-2
159 d->setError(d->fileEngine->error(), d->fileEngine->errorString());
never executed: d->setError(d->fileEngine->error(), d->fileEngine->errorString());
0
160}
executed 40805 times by 180 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • ...
40805
161-
162-
163-
164-
165qint64 QFileDevice::pos() const-
166{-
167 return
executed 481322 times by 100 tests: return QIODevice::pos();
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • ...
QIODevice::pos();
executed 481322 times by 100 tests: return QIODevice::pos();
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • ...
481322
168}-
169bool QFileDevice::atEnd() const-
170{-
171 const QFileDevicePrivate * const d = d_func();-
172-
173-
174 if (!d->buffer.isEmpty()
!d->buffer.isEmpty()Description
TRUEevaluated 107109 times by 19 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QChar
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QFile
  • tst_QFileInfo
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSettings
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_selftests - unknown status
FALSEevaluated 4588 times by 28 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QChar
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QIODevice
  • tst_QImageReader
  • tst_QLayout
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSplitter
  • tst_QTemporaryDir
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • ...
)
4588-107109
175 return
executed 107109 times by 19 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QChar
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QFile
  • tst_QFileInfo
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSettings
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_selftests - unknown status
false;
executed 107109 times by 19 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QChar
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QFile
  • tst_QFileInfo
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSettings
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_selftests - unknown status
107109
176-
177 if (!isOpen()
!isOpen()Description
TRUEnever evaluated
FALSEevaluated 4588 times by 28 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QChar
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QIODevice
  • tst_QImageReader
  • tst_QLayout
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSplitter
  • tst_QTemporaryDir
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • ...
)
0-4588
178 return
never executed: return true;
true;
never executed: return true;
0
179-
180 if (!d->ensureFlushed()
!d->ensureFlushed()Description
TRUEnever evaluated
FALSEevaluated 4588 times by 28 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QChar
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QIODevice
  • tst_QImageReader
  • tst_QLayout
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSplitter
  • tst_QTemporaryDir
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • ...
)
0-4588
181 return
never executed: return false;
false;
never executed: return false;
0
182-
183-
184 if (d->fileEngine->supportsExtension(QAbstractFileEngine::AtEndExtension)
d->fileEngine-...tEndExtension)Description
TRUEnever evaluated
FALSEevaluated 4588 times by 28 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QChar
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QIODevice
  • tst_QImageReader
  • tst_QLayout
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSplitter
  • tst_QTemporaryDir
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • ...
) {
0-4588
185-
186-
187 return
never executed: return d->fileEngine->atEnd();
d->fileEngine->atEnd();
never executed: return d->fileEngine->atEnd();
0
188 }-
189-
190-
191-
192 if (pos() < d->cachedSize
pos() < d->cachedSizeDescription
TRUEevaluated 382 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFile
  • tst_QFileInfo
  • tst_QImageReader
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QTextStream
FALSEevaluated 4206 times by 28 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QChar
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QIODevice
  • tst_QImageReader
  • tst_QLayout
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSplitter
  • tst_QTemporaryDir
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • ...
)
382-4206
193 return
executed 382 times by 7 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFile
  • tst_QFileInfo
  • tst_QImageReader
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QTextStream
false;
executed 382 times by 7 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFile
  • tst_QFileInfo
  • tst_QImageReader
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QTextStream
382
194-
195-
196 return
executed 4206 times by 28 tests: return bytesAvailable() == 0;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QChar
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QIODevice
  • tst_QImageReader
  • tst_QLayout
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSplitter
  • tst_QTemporaryDir
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • ...
bytesAvailable() == 0;
executed 4206 times by 28 tests: return bytesAvailable() == 0;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QChar
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QIODevice
  • tst_QImageReader
  • tst_QLayout
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSplitter
  • tst_QTemporaryDir
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • ...
4206
197}-
198bool QFileDevice::seek(qint64 off)-
199{-
200 QFileDevicePrivate * const d = d_func();-
201 if (!isOpen()
!isOpen()Description
TRUEnever evaluated
FALSEevaluated 230331 times by 90 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • ...
) {
0-230331
202 QMessageLogger(__FILE__, 402, __PRETTY_FUNCTION__).warning("QFileDevice::seek: IODevice is not open");-
203 return
never executed: return false;
false;
never executed: return false;
0
204 }-
205-
206 if (!d->ensureFlushed()
!d->ensureFlushed()Description
TRUEnever evaluated
FALSEevaluated 230331 times by 90 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • ...
)
0-230331
207 return
never executed: return false;
false;
never executed: return false;
0
208-
209 if (!d->fileEngine->seek(off)
!d->fileEngine->seek(off)Description
TRUEnever evaluated
FALSEevaluated 230331 times by 90 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • ...
|| !QIODevice::seek(off)
!QIODevice::seek(off)Description
TRUEnever evaluated
FALSEevaluated 230331 times by 90 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • ...
) {
0-230331
210 QFileDevice::FileError err = d->fileEngine->error();-
211 if (err == QFileDevice::UnspecifiedError
err == QFileDe...specifiedErrorDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
212 err = QFileDevice::PositionError;
never executed: err = QFileDevice::PositionError;
0
213 d->setError(err, d->fileEngine->errorString());-
214 return
never executed: return false;
false;
never executed: return false;
0
215 }-
216 unsetError();-
217 return
executed 230331 times by 90 tests: return true;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • ...
true;
executed 230331 times by 90 tests: return true;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • ...
230331
218}-
219-
220-
221-
222-
223qint64 QFileDevice::readLineData(char *data, qint64 maxlen)-
224{-
225 QFileDevicePrivate * const d = d_func();-
226 if (!d->ensureFlushed()
!d->ensureFlushed()Description
TRUEnever evaluated
FALSEevaluated 583 times by 15 tests
Evaluated by:
  • tst_QChar
  • tst_QCssParser
  • tst_QDebug
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_selftests - unknown status
)
0-583
227 return
never executed: return -1;
-1;
never executed: return -1;
0
228-
229 qint64 read;-
230 if (d->fileEngine->supportsExtension(QAbstractFileEngine::FastReadLineExtension)
d->fileEngine-...LineExtension)Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 575 times by 15 tests
Evaluated by:
  • tst_QChar
  • tst_QCssParser
  • tst_QDebug
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_selftests - unknown status
) {
8-575
231 read = d->fileEngine->readLine(data, maxlen);-
232 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_QFile
else {
8
233-
234-
235 read = QIODevice::readLineData(data, maxlen);-
236 }
executed 575 times by 15 tests: end of block
Executed by:
  • tst_QChar
  • tst_QCssParser
  • tst_QDebug
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_selftests - unknown status
575
237-
238 if (read < maxlen
read < maxlenDescription
TRUEevaluated 582 times by 15 tests
Evaluated by:
  • tst_QChar
  • tst_QCssParser
  • tst_QDebug
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_selftests - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
) {
1-582
239-
240 d->cachedSize = 0;-
241 }
executed 582 times by 15 tests: end of block
Executed by:
  • tst_QChar
  • tst_QCssParser
  • tst_QDebug
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_selftests - unknown status
582
242-
243 return
executed 583 times by 15 tests: return read;
Executed by:
  • tst_QChar
  • tst_QCssParser
  • tst_QDebug
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_selftests - unknown status
read;
executed 583 times by 15 tests: return read;
Executed by:
  • tst_QChar
  • tst_QCssParser
  • tst_QDebug
  • tst_QFile
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • tst_QTextBoundaryFinder
  • tst_QTextStream
  • tst_selftests - unknown status
583
244}-
245-
246-
247-
248-
249qint64 QFileDevice::readData(char *data, qint64 len)-
250{-
251 QFileDevicePrivate * const d = d_func();-
252 if (!len
!lenDescription
TRUEevaluated 16998 times by 92 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • ...
FALSEevaluated 109995 times by 137 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
)
16998-109995
253 return
executed 16998 times by 92 tests: return 0;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • ...
0;
executed 16998 times by 92 tests: return 0;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • ...
16998
254 unsetError();-
255 if (!d->ensureFlushed()
!d->ensureFlushed()Description
TRUEnever evaluated
FALSEevaluated 109995 times by 137 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
)
0-109995
256 return
never executed: return -1;
-1;
never executed: return -1;
0
257-
258 const qint64 read = d->fileEngine->read(data, len);-
259 if (read < 0
read < 0Description
TRUEnever evaluated
FALSEevaluated 109995 times by 137 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
) {
0-109995
260 QFileDevice::FileError err = d->fileEngine->error();-
261 if (err == QFileDevice::UnspecifiedError
err == QFileDe...specifiedErrorDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
262 err = QFileDevice::ReadError;
never executed: err = QFileDevice::ReadError;
0
263 d->setError(err, d->fileEngine->errorString());-
264 }
never executed: end of block
0
265-
266 if (read < len
read < lenDescription
TRUEevaluated 94434 times by 127 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • ...
FALSEevaluated 15561 times by 68 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • ...
) {
15561-94434
267-
268 d->cachedSize = 0;-
269 }
executed 94434 times by 127 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • ...
94434
270-
271 return
executed 109995 times by 137 tests: return read;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
read;
executed 109995 times by 137 tests: return read;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
109995
272}-
273-
274-
275-
276-
277bool QFileDevicePrivate::putCharHelper(char c)-
278{-
279-
280-
281-
282-
283-
284 qint64 writeBufferSize = writeBuffer.size();-
285 if ((openMode & QIODevice::Unbuffered) || writeBufferSize + 1 >= QFILE_WRITEBUFFER_SIZE
writeBufferSiz...ITEBUFFER_SIZEDescription
TRUEnever evaluated
FALSEevaluated 2144 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFile
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
0-2144
286-
287-
288-
289 ) {-
290 return
never executed: return QIODevicePrivate::putCharHelper(c);
QIODevicePrivate::putCharHelper(c);
never executed: return QIODevicePrivate::putCharHelper(c);
0
291 }-
292-
293 if (!(openMode & QIODevice::WriteOnly)
!(openMode & Q...ce::WriteOnly)Description
TRUEnever evaluated
FALSEevaluated 2144 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFile
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
) {
0-2144
294 if (openMode == QIODevice::NotOpen
openMode == QIODevice::NotOpenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
295 QMessageLogger(__FILE__, 495, __PRETTY_FUNCTION__).warning("QIODevice::putChar: Closed device");
never executed: QMessageLogger(__FILE__, 495, __PRETTY_FUNCTION__).warning("QIODevice::putChar: Closed device");
0
296 else-
297 QMessageLogger(__FILE__, 497, __PRETTY_FUNCTION__).warning("QIODevice::putChar: ReadOnly device");
never executed: QMessageLogger(__FILE__, 497, __PRETTY_FUNCTION__).warning("QIODevice::putChar: ReadOnly device");
0
298 return
never executed: return false;
false;
never executed: return false;
0
299 }-
300-
301-
302 const bool sequential = isSequential();-
303 if (pos != devicePos
pos != devicePosDescription
TRUEnever evaluated
FALSEevaluated 2144 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFile
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
&& !sequential
!sequentialDescription
TRUEnever evaluated
FALSEnever evaluated
&& !q_func()->seek(pos)
!q_func()->seek(pos)Description
TRUEnever evaluated
FALSEnever evaluated
)
0-2144
304 return
never executed: return false;
false;
never executed: return false;
0
305-
306 lastWasWrite = true;-
307-
308 int len = 1;-
309 *writeBuffer.reserve(1) = c;-
310-
311 if (!sequential
!sequentialDescription
TRUEevaluated 2144 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFile
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
FALSEnever evaluated
) {
0-2144
312 pos += len;-
313 devicePos += len;-
314 if (!buffer.isEmpty()
!buffer.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 2144 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFile
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
)
0-2144
315 buffer.skip(len);
never executed: buffer.skip(len);
0
316 }
executed 2144 times by 6 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFile
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
2144
317-
318 return
executed 2144 times by 6 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFile
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
true;
executed 2144 times by 6 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QFile
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
2144
319-
320}-
321-
322-
323-
324-
325qint64 QFileDevice::writeData(const char *data, qint64 len)-
326{-
327 QFileDevicePrivate * const d = d_func();-
328 unsetError();-
329 d->lastWasWrite = true;-
330 bool buffered = !(d->openMode & Unbuffered);-
331-
332-
333 if (buffered
bufferedDescription
TRUEevaluated 128820 times by 43 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
FALSEevaluated 651 times by 5 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QFile
  • tst_QNetworkReply
  • tst_qfileopenevent
&& (
(d->writeBuffe...ITEBUFFER_SIZEDescription
TRUEevaluated 542 times by 12 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFtp
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QStorageInfo
  • tst_QTextStream
  • tst_qnetworkreply - unknown status
FALSEevaluated 128278 times by 42 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
d->writeBuffer.size() + len) > QFILE_WRITEBUFFER_SIZE
(d->writeBuffe...ITEBUFFER_SIZEDescription
TRUEevaluated 542 times by 12 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFtp
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QStorageInfo
  • tst_QTextStream
  • tst_qnetworkreply - unknown status
FALSEevaluated 128278 times by 42 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
) {
542-128820
334 if (!flush()
!flush()Description
TRUEnever evaluated
FALSEevaluated 542 times by 12 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFtp
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QStorageInfo
  • tst_QTextStream
  • tst_qnetworkreply - unknown status
)
0-542
335 return
never executed: return -1;
-1;
never executed: return -1;
0
336 }
executed 542 times by 12 tests: end of block
Executed by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFtp
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QStorageInfo
  • tst_QTextStream
  • tst_qnetworkreply - unknown status
542
337-
338-
339-
340 if (!buffered
!bufferedDescription
TRUEevaluated 651 times by 5 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QFile
  • tst_QNetworkReply
  • tst_qfileopenevent
FALSEevaluated 128820 times by 43 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
|| len > QFILE_WRITEBUFFER_SIZE
len > QFILE_WRITEBUFFER_SIZEDescription
TRUEevaluated 53 times by 8 tests
Evaluated by:
  • tst_QFile
  • tst_QIODevice
  • tst_QImageWriter
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QStorageInfo
  • tst_QTextStream
  • tst_qnetworkreply - unknown status
FALSEevaluated 128767 times by 42 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
) {
53-128820
341 const qint64 ret = d->fileEngine->write(data, len);-
342 if (ret < 0
ret < 0Description
TRUEnever evaluated
FALSEevaluated 704 times by 11 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QFile
  • tst_QIODevice
  • tst_QImageWriter
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QStorageInfo
  • tst_QTextStream
  • tst_qfileopenevent
  • tst_qnetworkreply - unknown status
) {
0-704
343 QFileDevice::FileError err = d->fileEngine->error();-
344 if (err == QFileDevice::UnspecifiedError
err == QFileDe...specifiedErrorDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
345 err = QFileDevice::WriteError;
never executed: err = QFileDevice::WriteError;
0
346 d->setError(err, d->fileEngine->errorString());-
347 }
never executed: end of block
0
348 return
executed 704 times by 11 tests: return ret;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QFile
  • tst_QIODevice
  • tst_QImageWriter
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QStorageInfo
  • tst_QTextStream
  • tst_qfileopenevent
  • tst_qnetworkreply - unknown status
ret;
executed 704 times by 11 tests: return ret;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QFile
  • tst_QIODevice
  • tst_QImageWriter
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QStorageInfo
  • tst_QTextStream
  • tst_qfileopenevent
  • tst_qnetworkreply - unknown status
704
349 }-
350-
351-
352 char *writePointer = d->writeBuffer.reserve(len);-
353 if (len == 1
len == 1Description
TRUEevaluated 69761 times by 7 tests
Evaluated by:
  • tst_QDataStream
  • tst_QFile
  • tst_QNetworkDiskCache
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTextStream
  • tst_QXmlStream
FALSEevaluated 59006 times by 42 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
)
59006-69761
354 *
executed 69761 times by 7 tests: *writePointer = *data;
Executed by:
  • tst_QDataStream
  • tst_QFile
  • tst_QNetworkDiskCache
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTextStream
  • tst_QXmlStream
writePointer = *data;
executed 69761 times by 7 tests: *writePointer = *data;
Executed by:
  • tst_QDataStream
  • tst_QFile
  • tst_QNetworkDiskCache
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTextStream
  • tst_QXmlStream
69761
355 else if (len
lenDescription
TRUEevaluated 58996 times by 42 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
FALSEevaluated 10 times by 6 tests
Evaluated by:
  • tst_QFile
  • tst_QNetworkReply
  • tst_QSharedPointer
  • tst_QTextStream
  • tst_qmakelib
  • tst_qnetworkreply - unknown status
)
10-58996
356 ::
executed 58996 times by 42 tests: ::memcpy(writePointer, data, len);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
memcpy(writePointer, data, len);
executed 58996 times by 42 tests: ::memcpy(writePointer, data, len);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
58996
357 return
executed 128767 times by 42 tests: return len;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
len;
executed 128767 times by 42 tests: return len;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • ...
128767
358}-
359QFileDevice::FileError QFileDevice::error() const-
360{-
361 const QFileDevicePrivate * const d = d_func();-
362 return
executed 13373 times by 75 tests: return d->error;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QLockFile
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • ...
d->error;
executed 13373 times by 75 tests: return d->error;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QLockFile
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • ...
13373
363}-
364-
365-
366-
367-
368-
369-
370void QFileDevice::unsetError()-
371{-
372 QFileDevicePrivate * const d = d_func();-
373 d->setError(QFileDevice::NoError);-
374}
executed 649116 times by 216 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • ...
649116
375qint64 QFileDevice::size() const-
376{-
377 const QFileDevicePrivate * const d = d_func();-
378 if (!d->ensureFlushed()
!d->ensureFlushed()Description
TRUEnever evaluated
FALSEevaluated 164647 times by 162 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • ...
)
0-164647
379 return
never executed: return 0;
0;
never executed: return 0;
0
380 d->cachedSize = d->engine()->size();-
381 return
executed 164647 times by 162 tests: return d->cachedSize;
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • ...
d->cachedSize;
executed 164647 times by 162 tests: return d->cachedSize;
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • ...
164647
382}-
383bool QFileDevice::resize(qint64 sz)-
384{-
385 QFileDevicePrivate * const d = d_func();-
386 if (!d->ensureFlushed()
!d->ensureFlushed()Description
TRUEnever evaluated
FALSEevaluated 295 times by 7 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDirModel
  • tst_QFile
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QNetworkReply
  • tst_QTemporaryFile
)
0-295
387 return
never executed: return false;
false;
never executed: return false;
0
388 d->engine();-
389 if (isOpen()
isOpen()Description
TRUEevaluated 284 times by 7 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDirModel
  • tst_QFile
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QNetworkReply
  • tst_QTemporaryFile
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QFile
&& d->fileEngine->pos() > sz
d->fileEngine->pos() > szDescription
TRUEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QFile
  • tst_QNetworkReply
FALSEevaluated 279 times by 6 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDirModel
  • tst_QFile
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QTemporaryFile
)
5-284
390 seek(sz);
executed 5 times by 2 tests: seek(sz);
Executed by:
  • tst_QFile
  • tst_QNetworkReply
5
391 if (d->fileEngine->setSize(sz)
d->fileEngine->setSize(sz)Description
TRUEevaluated 295 times by 7 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDirModel
  • tst_QFile
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QNetworkReply
  • tst_QTemporaryFile
FALSEnever evaluated
) {
0-295
392 unsetError();-
393 d->cachedSize = sz;-
394 return
executed 295 times by 7 tests: return true;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDirModel
  • tst_QFile
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QNetworkReply
  • tst_QTemporaryFile
true;
executed 295 times by 7 tests: return true;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDirModel
  • tst_QFile
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QNetworkReply
  • tst_QTemporaryFile
295
395 }-
396 d->cachedSize = 0;-
397 d->setError(QFile::ResizeError, d->fileEngine->errorString());-
398 return
never executed: return false;
false;
never executed: return false;
0
399}-
400-
401-
402-
403-
404-
405-
406-
407QFile::Permissions QFileDevice::permissions() const-
408{-
409 const QFileDevicePrivate * const d = d_func();-
410 QAbstractFileEngine::FileFlags perms = d->engine()->fileFlags(QAbstractFileEngine::PermsMask) & QAbstractFileEngine::PermsMask;-
411 return
executed 198 times by 11 tests: return QFile::Permissions((int)perms);
Executed by:
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_qmakelib
  • tst_qstandardpaths
QFile::Permissions((int)perms);
executed 198 times by 11 tests: return QFile::Permissions((int)perms);
Executed by:
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_qmakelib
  • tst_qstandardpaths
198
412}-
413bool QFileDevice::setPermissions(Permissions permissions)-
414{-
415 QFileDevicePrivate * const d = d_func();-
416 if (d->engine()->setPermissions(permissions)
d->engine()->s...s(permissions)Description
TRUEevaluated 1070 times by 21 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
) {
1-1070
417 unsetError();-
418 return
executed 1070 times by 21 tests: return true;
Executed by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
true;
executed 1070 times by 21 tests: return true;
Executed by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
1070
419 }-
420 d->setError(QFile::PermissionsError, d->fileEngine->errorString());-
421 return
executed 1 time by 1 test: return false;
Executed by:
  • tst_QFile
false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_QFile
1
422}-
423uchar *QFileDevice::map(qint64 offset, qint64 size, MemoryMapFlags flags)-
424{-
425 QFileDevicePrivate * const d = d_func();-
426 if (d->engine()
d->engine()Description
TRUEevaluated 34289 times by 119 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
FALSEnever evaluated
0-34289
427 && d->fileEngine->supportsExtension(QAbstractFileEngine::MapExtension)
d->fileEngine-...:MapExtension)Description
TRUEevaluated 34289 times by 119 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
FALSEnever evaluated
) {
0-34289
428 unsetError();-
429 uchar *address = d->fileEngine->map(offset, size, flags);-
430 if (address == 0
address == 0Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 34265 times by 119 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
)
24-34265
431 d->setError(d->fileEngine->error(), d->fileEngine->errorString());
executed 24 times by 1 test: d->setError(d->fileEngine->error(), d->fileEngine->errorString());
Executed by:
  • tst_QFile
24
432 return
executed 34289 times by 119 tests: return address;
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
address;
executed 34289 times by 119 tests: return address;
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
34289
433 }-
434 return
never executed: return 0;
0;
never executed: return 0;
0
435}-
436bool QFileDevice::unmap(uchar *address)-
437{-
438 QFileDevicePrivate * const d = d_func();-
439 if (d->engine()
d->engine()Description
TRUEevaluated 32814 times by 2 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
FALSEnever evaluated
0-32814
440 && d->fileEngine->supportsExtension(QAbstractFileEngine::UnMapExtension)
d->fileEngine-...nMapExtension)Description
TRUEevaluated 32814 times by 2 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
FALSEnever evaluated
) {
0-32814
441 unsetError();-
442 bool success = d->fileEngine->unmap(address);-
443 if (!success
!successDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 32806 times by 2 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
)
8-32806
444 d->setError(d->fileEngine->error(), d->fileEngine->errorString());
executed 8 times by 1 test: d->setError(d->fileEngine->error(), d->fileEngine->errorString());
Executed by:
  • tst_QFile
8
445 return
executed 32814 times by 2 tests: return success;
Executed by:
  • tst_LargeFile
  • tst_QFile
success;
executed 32814 times by 2 tests: return success;
Executed by:
  • tst_LargeFile
  • tst_QFile
32814
446 }-
447 d->setError(PermissionsError, tr("No file engine available or engine does not support UnMapExtension"));-
448 return
never executed: return false;
false;
never executed: return false;
0
449}-
450-
451-
Switch to Source codePreprocessed file

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