OpenCoverage

qfsfileengine.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/io/qfsfileengine.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Copyright (C) 2016 Intel Corporation.-
5** Contact: https://www.qt.io/licensing/-
6**-
7** This file is part of the QtCore module of the Qt Toolkit.-
8**-
9** $QT_BEGIN_LICENSE:LGPL$-
10** Commercial License Usage-
11** Licensees holding valid commercial Qt licenses may use this file in-
12** accordance with the commercial license agreement provided with the-
13** Software or, alternatively, in accordance with the terms contained in-
14** a written agreement between you and The Qt Company. For licensing terms-
15** and conditions see https://www.qt.io/terms-conditions. For further-
16** information use the contact form at https://www.qt.io/contact-us.-
17**-
18** GNU Lesser General Public License Usage-
19** Alternatively, this file may be used under the terms of the GNU Lesser-
20** General Public License version 3 as published by the Free Software-
21** Foundation and appearing in the file LICENSE.LGPL3 included in the-
22** packaging of this file. Please review the following information to-
23** ensure the GNU Lesser General Public License version 3 requirements-
24** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
25**-
26** GNU General Public License Usage-
27** Alternatively, this file may be used under the terms of the GNU-
28** General Public License version 2.0 or (at your option) the GNU General-
29** Public license version 3 or any later version approved by the KDE Free-
30** Qt Foundation. The licenses are as published by the Free Software-
31** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
32** included in the packaging of this file. Please review the following-
33** information to ensure the GNU General Public License requirements will-
34** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
35** https://www.gnu.org/licenses/gpl-3.0.html.-
36**-
37** $QT_END_LICENSE$-
38**-
39****************************************************************************/-
40-
41#include "qfsfileengine_p.h"-
42#include "qfsfileengine_iterator_p.h"-
43#include "qfilesystemengine_p.h"-
44#include "qdatetime.h"-
45#include "qdiriterator.h"-
46#include "qset.h"-
47#include <QtCore/qdebug.h>-
48-
49#ifndef QT_NO_FSFILEENGINE-
50-
51#if !defined(Q_OS_WINCE)-
52#include <errno.h>-
53#endif-
54#if defined(Q_OS_UNIX)-
55#include "private/qcore_unix_p.h"-
56#endif-
57#include <stdio.h>-
58#include <stdlib.h>-
59#if defined(Q_OS_MAC)-
60# include <private/qcore_mac_p.h>-
61#endif-
62-
63QT_BEGIN_NAMESPACE-
64-
65#ifdef Q_OS_WIN-
66# ifndef S_ISREG-
67# define S_ISREG(x) (((x) & S_IFMT) == S_IFREG)-
68# endif-
69# ifndef S_ISCHR-
70# define S_ISCHR(x) (((x) & S_IFMT) == S_IFCHR)-
71# endif-
72# ifndef S_ISFIFO-
73# define S_ISFIFO(x) false-
74# endif-
75# ifndef S_ISSOCK-
76# define S_ISSOCK(x) false-
77# endif-
78# ifndef INVALID_FILE_ATTRIBUTES-
79# define INVALID_FILE_ATTRIBUTES (DWORD (-1))-
80# endif-
81#endif-
82-
83#ifdef Q_OS_WIN-
84// on Windows, read() and write() use int and unsigned int-
85typedef int SignedIOType;-
86typedef unsigned int UnsignedIOType;-
87#else-
88typedef ssize_t SignedIOType;-
89typedef size_t UnsignedIOType;-
90Q_STATIC_ASSERT_X(sizeof(SignedIOType) == sizeof(UnsignedIOType),-
91 "Unsupported: read/write return a type with different size as the len parameter");-
92#endif-
93-
94/*! \class QFSFileEngine-
95 \inmodule QtCore-
96 \brief The QFSFileEngine class implements Qt's default file engine.-
97 \since 4.1-
98 \internal-
99-
100 This class is part of the file engine framework in Qt. If you only want to-
101 access files or directories, use QFile, QFileInfo or QDir instead.-
102-
103 QFSFileEngine is the default file engine for accessing regular files. It-
104 is provided for convenience; by subclassing this class, you can alter its-
105 behavior slightly, without having to write a complete QAbstractFileEngine-
106 subclass. To install your custom file engine, you must also subclass-
107 QAbstractFileEngineHandler and create an instance of your handler.-
108-
109 It can also be useful to create a QFSFileEngine object directly if you-
110 need to use the local file system inside QAbstractFileEngine::create(), in-
111 order to avoid recursion (as higher-level classes tend to call-
112 QAbstractFileEngine::create()).-
113*/-
114-
115//**************** QFSFileEnginePrivate-
116QFSFileEnginePrivate::QFSFileEnginePrivate() : QAbstractFileEnginePrivate()-
117{-
118 init();-
119}
executed 49634 times by 211 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
  • ...
49634
120-
121/*!-
122 \internal-
123*/-
124void QFSFileEnginePrivate::init()-
125{-
126 is_sequential = 0;-
127 tried_stat = 0;-
128#if !defined(Q_OS_WINCE)-
129 need_lstat = 1;-
130 is_link = 0;-
131#endif-
132 openMode = QIODevice::NotOpen;-
133 fd = -1;-
134 fh = 0;-
135 lastIOCommand = IOFlushCommand;-
136 lastFlushFailed = false;-
137 closeFileHandle = false;-
138#ifdef Q_OS_WIN-
139 fileAttrib = INVALID_FILE_ATTRIBUTES;-
140 fileHandle = INVALID_HANDLE_VALUE;-
141 mapHandle = NULL;-
142#ifndef Q_OS_WINCE-
143 cachedFd = -1;-
144#endif-
145#endif-
146}
executed 49888 times by 211 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
  • ...
49888
147-
148/*!-
149 Constructs a QFSFileEngine for the file name \a file.-
150*/-
151QFSFileEngine::QFSFileEngine(const QString &file)-
152 : QAbstractFileEngine(*new QFSFileEnginePrivate)-
153{-
154 Q_D(QFSFileEngine);-
155 d->fileEntry = QFileSystemEntry(file);-
156}
executed 47082 times by 207 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
  • ...
47082
157-
158/*!-
159 Constructs a QFSFileEngine.-
160*/-
161QFSFileEngine::QFSFileEngine() : QAbstractFileEngine(*new QFSFileEnginePrivate)-
162{-
163}
executed 2552 times by 31 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDBusMarshall
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPdfWriter
  • tst_QPixmap
  • tst_QPrinterInfo
  • tst_QSaveFile
  • tst_QSettings
  • tst_QStorageInfo
  • ...
2552
164-
165/*!-
166 \internal-
167*/-
168QFSFileEngine::QFSFileEngine(QFSFileEnginePrivate &dd)-
169 : QAbstractFileEngine(dd)-
170{-
171}
never executed: end of block
0
172-
173/*!-
174 Destructs the QFSFileEngine.-
175*/-
176QFSFileEngine::~QFSFileEngine()-
177{-
178 Q_D(QFSFileEngine);-
179 if (d->closeFileHandle) {
d->closeFileHandleDescription
TRUEevaluated 30589 times by 208 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 19035 times by 119 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • ...
19035-30589
180 if (d->fh) {
d->fhDescription
TRUEnever evaluated
FALSEevaluated 30589 times by 208 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-30589
181 fclose(d->fh);-
182 } else if (d->fd != -1) {
never executed: end of block
d->fd != -1Description
TRUEnever evaluated
FALSEevaluated 30589 times by 208 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-30589
183 QT_CLOSE(d->fd);-
184 }
never executed: end of block
0
185 }
executed 30589 times by 208 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
  • ...
30589
186 d->unmapAll();-
187}
executed 49624 times by 244 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
  • ...
49624
188-
189/*!-
190 \reimp-
191*/-
192void QFSFileEngine::setFileName(const QString &file)-
193{-
194 Q_D(QFSFileEngine);-
195 d->init();-
196 d->fileEntry = QFileSystemEntry(file);-
197}
executed 254 times by 16 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QIcon
  • tst_QImageReader
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_QTemporaryFile
254
198-
199/*!-
200 \reimp-
201*/-
202bool QFSFileEngine::open(QIODevice::OpenMode openMode)-
203{-
204 Q_D(QFSFileEngine);-
205 if (d->fileEntry.isEmpty()) {
d->fileEntry.isEmpty()Description
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QFile
  • tst_QNetworkDiskCache
FALSEevaluated 32417 times by 185 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_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • ...
3-32417
206 qWarning("QFSFileEngine::open: No file name specified");-
207 setError(QFile::OpenError, QLatin1String("No file name specified"));-
208 return false;
executed 3 times by 2 tests: return false;
Executed by:
  • tst_QFile
  • tst_QNetworkDiskCache
3
209 }-
210-
211 // Append implies WriteOnly.-
212 if (openMode & QFile::Append)
openMode & QFile::AppendDescription
TRUEevaluated 257 times by 6 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QFile
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_qfileopenevent
  • tst_qmakelib
FALSEevaluated 32160 times by 185 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_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • ...
257-32160
213 openMode |= QFile::WriteOnly;
executed 257 times by 6 tests: openMode |= QFile::WriteOnly;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QFile
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_qfileopenevent
  • tst_qmakelib
257
214-
215 // WriteOnly implies Truncate if neither ReadOnly nor Append are sent.-
216 if ((openMode & QFile::WriteOnly) && !(openMode & (QFile::ReadOnly | QFile::Append)))
!(openMode & (...File::Append))Description
TRUEevaluated 1528 times by 38 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QDataStream
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QIcon
  • tst_QImage
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QLoggingRegistry
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • tst_QSaveFile
  • tst_QSettings
  • ...
FALSEevaluated 892 times by 20 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QColorDialog
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_QTextStream
  • tst_languageChange
  • tst_qfileopenevent
  • tst_qmakelib
892-1528
217 openMode |= QFile::Truncate;
executed 1528 times by 38 tests: openMode |= QFile::Truncate;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QDataStream
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QIcon
  • tst_QImage
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QLoggingRegistry
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • tst_QPixmap
  • tst_QPrinter
  • tst_QProcess
  • tst_QSaveFile
  • tst_QSettings
  • ...
1528
218-
219 d->openMode = openMode;-
220 d->lastFlushFailed = false;-
221 d->tried_stat = 0;-
222 d->fh = 0;-
223 d->fd = -1;-
224-
225 return d->nativeOpen(openMode);
executed 32417 times by 185 tests: return d->nativeOpen(openMode);
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
  • ...
32417
226}-
227-
228/*!-
229 Opens the file handle \a fh in \a openMode mode. Returns \c true on-
230 success; otherwise returns \c false.-
231*/-
232bool QFSFileEngine::open(QIODevice::OpenMode openMode, FILE *fh)-
233{-
234 return open(openMode, fh, QFile::DontCloseHandle);
never executed: return open(openMode, fh, QFile::DontCloseHandle);
0
235}-
236-
237bool QFSFileEngine::open(QIODevice::OpenMode openMode, FILE *fh, QFile::FileHandleFlags handleFlags)-
238{-
239 Q_D(QFSFileEngine);-
240-
241 // Append implies WriteOnly.-
242 if (openMode & QFile::Append)
openMode & QFile::AppendDescription
TRUEnever evaluated
FALSEevaluated 364 times by 5 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
0-364
243 openMode |= QFile::WriteOnly;
never executed: openMode |= QFile::WriteOnly;
0
244-
245 // WriteOnly implies Truncate if neither ReadOnly nor Append are sent.-
246 if ((openMode & QFile::WriteOnly) && !(openMode & (QFile::ReadOnly | QFile::Append)))
!(openMode & (...File::Append))Description
TRUEevaluated 212 times by 4 tests
Evaluated by:
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
FALSEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QFile
  • tst_qnetworkreply - unknown status
9-212
247 openMode |= QFile::Truncate;
executed 212 times by 4 tests: openMode |= QFile::Truncate;
Executed by:
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
212
248-
249 d->openMode = openMode;-
250 d->lastFlushFailed = false;-
251 d->closeFileHandle = (handleFlags & QFile::AutoCloseHandle);-
252 d->fileEntry.clear();-
253 d->tried_stat = 0;-
254 d->fd = -1;-
255-
256 return d->openFh(openMode, fh);
executed 364 times by 5 tests: return d->openFh(openMode, fh);
Executed by:
  • tst_LargeFile
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
364
257}-
258-
259/*!-
260 Opens the file handle \a fh using the open mode \a flags.-
261*/-
262bool QFSFileEnginePrivate::openFh(QIODevice::OpenMode openMode, FILE *fh)-
263{-
264 Q_Q(QFSFileEngine);-
265 this->fh = fh;-
266 fd = -1;-
267-
268 // Seek to the end when in Append mode.-
269 if (openMode & QIODevice::Append) {
openMode & QIODevice::AppendDescription
TRUEnever evaluated
FALSEevaluated 364 times by 5 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
0-364
270 int ret;-
271 do {-
272 ret = QT_FSEEK(fh, 0, SEEK_END);-
273 } while (ret != 0 && errno == EINTR);
never executed: end of block
ret != 0Description
TRUEnever evaluated
FALSEnever evaluated
(*__errno_location ()) == 4Description
TRUEnever evaluated
FALSEnever evaluated
0
274-
275 if (ret != 0) {
ret != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
276 q->setError(errno == EMFILE ? QFile::ResourceError : QFile::OpenError,-
277 qt_error_string(int(errno)));-
278-
279 this->openMode = QIODevice::NotOpen;-
280 this->fh = 0;-
281-
282 return false;
never executed: return false;
0
283 }-
284 }
never executed: end of block
0
285-
286 return true;
executed 364 times by 5 tests: return true;
Executed by:
  • tst_LargeFile
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
364
287}-
288-
289/*!-
290 Opens the file descriptor \a fd in \a openMode mode. Returns \c true-
291 on success; otherwise returns \c false.-
292*/-
293bool QFSFileEngine::open(QIODevice::OpenMode openMode, int fd)-
294{-
295 return open(openMode, fd, QFile::DontCloseHandle);
never executed: return open(openMode, fd, QFile::DontCloseHandle);
0
296}-
297-
298bool QFSFileEngine::open(QIODevice::OpenMode openMode, int fd, QFile::FileHandleFlags handleFlags)-
299{-
300 Q_D(QFSFileEngine);-
301-
302 // Append implies WriteOnly.-
303 if (openMode & QFile::Append)
openMode & QFile::AppendDescription
TRUEnever evaluated
FALSEevaluated 29 times by 3 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
  • tst_QPrinterInfo
0-29
304 openMode |= QFile::WriteOnly;
never executed: openMode |= QFile::WriteOnly;
0
305-
306 // WriteOnly implies Truncate if neither ReadOnly nor Append are sent.-
307 if ((openMode & QFile::WriteOnly) && !(openMode & (QFile::ReadOnly | QFile::Append)))
!(openMode & (...File::Append))Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
1-4
308 openMode |= QFile::Truncate;
executed 4 times by 1 test: openMode |= QFile::Truncate;
Executed by:
  • tst_QFile
4
309-
310 d->openMode = openMode;-
311 d->lastFlushFailed = false;-
312 d->closeFileHandle = (handleFlags & QFile::AutoCloseHandle);-
313 d->fileEntry.clear();-
314 d->fh = 0;-
315 d->fd = -1;-
316 d->tried_stat = 0;-
317-
318 return d->openFd(openMode, fd);
executed 29 times by 3 tests: return d->openFd(openMode, fd);
Executed by:
  • tst_LargeFile
  • tst_QFile
  • tst_QPrinterInfo
29
319}-
320-
321-
322/*!-
323 Opens the file descriptor \a fd to the file engine, using the open mode \a-
324 flags.-
325*/-
326bool QFSFileEnginePrivate::openFd(QIODevice::OpenMode openMode, int fd)-
327{-
328 Q_Q(QFSFileEngine);-
329 this->fd = fd;-
330 fh = 0;-
331-
332 // Seek to the end when in Append mode.-
333 if (openMode & QFile::Append) {
openMode & QFile::AppendDescription
TRUEnever evaluated
FALSEevaluated 29 times by 3 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
  • tst_QPrinterInfo
0-29
334 int ret;-
335 do {-
336 ret = QT_LSEEK(fd, 0, SEEK_END);-
337 } while (ret == -1 && errno == EINTR);
never executed: end of block
ret == -1Description
TRUEnever evaluated
FALSEnever evaluated
(*__errno_location ()) == 4Description
TRUEnever evaluated
FALSEnever evaluated
0
338-
339 if (ret == -1) {
ret == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
340 q->setError(errno == EMFILE ? QFile::ResourceError : QFile::OpenError,-
341 qt_error_string(int(errno)));-
342-
343 this->openMode = QIODevice::NotOpen;-
344 this->fd = -1;-
345-
346 return false;
never executed: return false;
0
347 }-
348 }
never executed: end of block
0
349-
350 return true;
executed 29 times by 3 tests: return true;
Executed by:
  • tst_LargeFile
  • tst_QFile
  • tst_QPrinterInfo
29
351}-
352-
353/*!-
354 \reimp-
355*/-
356bool QFSFileEngine::close()-
357{-
358 Q_D(QFSFileEngine);-
359 d->openMode = QIODevice::NotOpen;-
360 return d->nativeClose();
executed 33415 times by 208 tests: return d->nativeClose();
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
  • ...
33415
361}-
362-
363/*!-
364 \internal-
365*/-
366bool QFSFileEnginePrivate::closeFdFh()-
367{-
368 Q_Q(QFSFileEngine);-
369 if (fd == -1 && !fh)
fd == -1Description
TRUEevaluated 2314 times by 30 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPdfWriter
  • tst_QPixmap
  • tst_QSaveFile
  • tst_QSettings
  • tst_QStorageInfo
  • tst_QTemporaryFile
  • tst_languageChange
  • ...
FALSEevaluated 31101 times by 207 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
  • ...
!fhDescription
TRUEevaluated 1950 times by 26 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPdfWriter
  • tst_QPixmap
  • tst_QSaveFile
  • tst_QSettings
  • tst_QStorageInfo
  • tst_QTemporaryFile
  • tst_languageChange
  • tst_qdbusmarshall - unknown status
  • ...
FALSEevaluated 364 times by 5 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
364-31101
370 return false;
executed 1950 times by 26 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPdfWriter
  • tst_QPixmap
  • tst_QSaveFile
  • tst_QSettings
  • tst_QStorageInfo
  • tst_QTemporaryFile
  • tst_languageChange
  • tst_qdbusmarshall - unknown status
  • ...
1950
371-
372 // Flush the file if it's buffered, and if the last flush didn't fail.-
373 bool flushed = !fh || (!lastFlushFailed && q->flush());
!fhDescription
TRUEevaluated 31101 times by 207 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 364 times by 5 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
!lastFlushFailedDescription
TRUEevaluated 364 times by 5 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
FALSEnever evaluated
q->flush()Description
TRUEevaluated 364 times by 5 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
FALSEnever evaluated
0-31101
374 bool closed = true;-
375 tried_stat = 0;-
376-
377 // Close the file if we created the handle.-
378 if (closeFileHandle) {
closeFileHandleDescription
TRUEevaluated 31074 times by 207 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 391 times by 6 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
  • tst_QPrinterInfo
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
391-31074
379 int ret;-
380-
381 if (fh) {
fhDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 31073 times by 207 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
  • ...
1-31073
382 // Close buffered file.-
383 ret = fclose(fh);-
384 } else {
executed 1 time by 1 test: end of block
Executed by:
  • tst_QFile
1
385 // Close unbuffered file.-
386 ret = QT_CLOSE(fd);-
387 }
executed 31073 times by 207 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
  • ...
31073
388-
389 // We must reset these guys regardless; calling close again after a-
390 // failed close causes crashes on some systems.-
391 fh = 0;-
392 fd = -1;-
393 closed = (ret == 0);-
394 }
executed 31074 times by 207 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
  • ...
31074
395-
396 // Report errors.-
397 if (!flushed || !closed) {
!flushedDescription
TRUEnever evaluated
FALSEevaluated 31465 times by 208 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
  • ...
!closedDescription
TRUEnever evaluated
FALSEevaluated 31465 times by 208 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-31465
398 if (flushed) {
flushedDescription
TRUEnever evaluated
FALSEnever evaluated
0
399 // If not flushed, we want the flush error to fall through.-
400 q->setError(QFile::UnspecifiedError, qt_error_string(errno));-
401 }
never executed: end of block
0
402 return false;
never executed: return false;
0
403 }-
404-
405 return true;
executed 31465 times by 208 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
  • ...
31465
406}-
407-
408/*!-
409 \reimp-
410*/-
411bool QFSFileEngine::flush()-
412{-
413 Q_D(QFSFileEngine);-
414 if ((d->openMode & QIODevice::WriteOnly) == 0) {
(d->openMode &...riteOnly) == 0Description
TRUEevaluated 189324 times by 200 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 28697 times by 53 tests
Evaluated 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • ...
28697-189324
415 // Nothing in the write buffers, so flush succeeds in doing-
416 // nothing.-
417 return true;
executed 189324 times by 200 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
  • ...
189324
418 }-
419 return d->nativeFlush();
executed 28697 times by 53 tests: return d->nativeFlush();
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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • ...
28697
420}-
421-
422/*!-
423 \reimp-
424*/-
425bool QFSFileEngine::syncToDisk()-
426{-
427 Q_D(QFSFileEngine);-
428 if ((d->openMode & QIODevice::WriteOnly) == 0)
(d->openMode &...riteOnly) == 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QSaveFile
FALSEevaluated 574 times by 7 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QSaveFile
  • tst_QSettings
  • tst_languageChange
2-574
429 return true;
executed 2 times by 1 test: return true;
Executed by:
  • tst_QSaveFile
2
430 return d->nativeSyncToDisk();
executed 574 times by 7 tests: return d->nativeSyncToDisk();
Executed by:
  • tst_QColorDialog
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QSaveFile
  • tst_QSettings
  • tst_languageChange
574
431}-
432-
433/*!-
434 \internal-
435*/-
436bool QFSFileEnginePrivate::flushFh()-
437{-
438 Q_Q(QFSFileEngine);-
439-
440 // Never try to flush again if the last flush failed. Otherwise you can-
441 // get crashes on some systems (AIX).-
442 if (lastFlushFailed)
lastFlushFailedDescription
TRUEnever evaluated
FALSEevaluated 459 times by 4 tests
Evaluated by:
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
0-459
443 return false;
never executed: return false;
0
444-
445 int ret = fflush(fh);-
446-
447 lastFlushFailed = (ret != 0);-
448 lastIOCommand = QFSFileEnginePrivate::IOFlushCommand;-
449-
450 if (ret != 0) {
ret != 0Description
TRUEnever evaluated
FALSEevaluated 459 times by 4 tests
Evaluated by:
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
0-459
451 q->setError(errno == ENOSPC ? QFile::ResourceError : QFile::WriteError,-
452 qt_error_string(errno));-
453 return false;
never executed: return false;
0
454 }-
455 return true;
executed 459 times by 4 tests: return true;
Executed by:
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
459
456}-
457-
458/*!-
459 \reimp-
460*/-
461qint64 QFSFileEngine::size() const-
462{-
463 Q_D(const QFSFileEngine);-
464 return d->nativeSize();
executed 133807 times by 159 tests: return d->nativeSize();
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
  • ...
133807
465}-
466-
467/*!-
468 \internal-
469*/-
470void QFSFileEnginePrivate::unmapAll()-
471{-
472 if (!maps.isEmpty()) {
!maps.isEmpty()Description
TRUEevaluated 1563 times by 152 tests
Evaluated by:
  • 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_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
FALSEevaluated 50574 times by 156 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • ...
1563-50574
473 const QList<uchar*> keys = maps.keys(); // Make a copy since unmap() modifies the map.-
474 for (int i = 0; i < keys.count(); ++i)
i < keys.count()Description
TRUEevaluated 1566 times by 152 tests
Evaluated by:
  • 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_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
FALSEevaluated 1563 times by 152 tests
Evaluated by:
  • 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_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
1563-1566
475 unmap(keys.at(i));
executed 1566 times by 152 tests: unmap(keys.at(i));
Executed by:
  • 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_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
1566
476 }
executed 1563 times by 152 tests: end of block
Executed by:
  • 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_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
1563
477}
executed 52137 times by 244 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
  • ...
52137
478-
479#ifndef Q_OS_WIN-
480/*!-
481 \internal-
482*/-
483qint64 QFSFileEnginePrivate::sizeFdFh() const-
484{-
485 Q_Q(const QFSFileEngine);-
486 const_cast<QFSFileEngine *>(q)->flush();-
487-
488 tried_stat = 0;-
489 metaData.clearFlags(QFileSystemMetaData::SizeAttribute);-
490 if (!doStat(QFileSystemMetaData::SizeAttribute))
!doStat(QFileS...SizeAttribute)Description
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QFile
  • tst_QNetworkDiskCache
FALSEevaluated 133804 times by 159 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
  • ...
3-133804
491 return 0;
executed 3 times by 2 tests: return 0;
Executed by:
  • tst_QFile
  • tst_QNetworkDiskCache
3
492 return metaData.size();
executed 133804 times by 159 tests: return metaData.size();
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
  • ...
133804
493}-
494#endif-
495-
496/*!-
497 \reimp-
498*/-
499qint64 QFSFileEngine::pos() const-
500{-
501 Q_D(const QFSFileEngine);-
502 return d->nativePos();
executed 282 times by 7 tests: return d->nativePos();
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDirModel
  • tst_QFile
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QNetworkReply
  • tst_QTemporaryFile
282
503}-
504-
505/*!-
506 \internal-
507*/-
508qint64 QFSFileEnginePrivate::posFdFh() const-
509{-
510 if (fh)
fhDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 281 times by 7 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDirModel
  • tst_QFile
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QNetworkReply
  • tst_QTemporaryFile
1-281
511 return qint64(QT_FTELL(fh));
executed 1 time by 1 test: return qint64(::ftello64(fh));
Executed by:
  • tst_QFile
1
512 return QT_LSEEK(fd, 0, SEEK_CUR);
executed 281 times by 7 tests: return ::lseek64(fd, 0, 1);
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDirModel
  • tst_QFile
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QNetworkReply
  • tst_QTemporaryFile
281
513}-
514-
515/*!-
516 \reimp-
517*/-
518bool QFSFileEngine::seek(qint64 pos)-
519{-
520 Q_D(QFSFileEngine);-
521 return d->nativeSeek(pos);
executed 224254 times by 50 tests: return d->nativeSeek(pos);
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFrame
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLockFile
  • tst_QMimeDatabase
  • ...
224254
522}-
523-
524/*!-
525 \internal-
526*/-
527bool QFSFileEnginePrivate::seekFdFh(qint64 pos)-
528{-
529 Q_Q(QFSFileEngine);-
530-
531 // On Windows' stdlib implementation, the results of calling fread and-
532 // fwrite are undefined if not called either in sequence, or if preceded-
533 // with a call to fflush().-
534 if (lastIOCommand != QFSFileEnginePrivate::IOFlushCommand && !q->flush())
lastIOCommand ...IOFlushCommandDescription
TRUEevaluated 7797 times by 41 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QDataStream
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFrame
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QMimeDatabase
  • tst_QMovie
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • ...
FALSEevaluated 216457 times by 33 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QColorDialog
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcoImageFormat
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMovie
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPdfWriter
  • tst_QPixmap
  • tst_QRawFont
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedPointer
  • ...
!q->flush()Description
TRUEnever evaluated
FALSEevaluated 7797 times by 41 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QDataStream
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFrame
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QMimeDatabase
  • tst_QMovie
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • ...
0-216457
535 return false;
never executed: return false;
0
536-
537 if (pos < 0 || pos != qint64(QT_OFF_T(pos)))
pos < 0Description
TRUEnever evaluated
FALSEevaluated 224254 times by 50 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFrame
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLockFile
  • tst_QMimeDatabase
  • ...
pos != qint64(off64_t(pos))Description
TRUEnever evaluated
FALSEevaluated 224254 times by 50 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFrame
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLockFile
  • tst_QMimeDatabase
  • ...
0-224254
538 return false;
never executed: return false;
0
539-
540 if (fh) {
fhDescription
TRUEevaluated 19 times by 2 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
FALSEevaluated 224235 times by 50 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFrame
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLockFile
  • tst_QMimeDatabase
  • ...
19-224235
541 // Buffered stdlib mode.-
542 int ret;-
543 do {-
544 ret = QT_FSEEK(fh, QT_OFF_T(pos), SEEK_SET);-
545 } while (ret != 0 && errno == EINTR);
executed 19 times by 2 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QFile
ret != 0Description
TRUEnever evaluated
FALSEevaluated 19 times by 2 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
(*__errno_location ()) == 4Description
TRUEnever evaluated
FALSEnever evaluated
0-19
546-
547 if (ret != 0) {
ret != 0Description
TRUEnever evaluated
FALSEevaluated 19 times by 2 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
0-19
548 q->setError(QFile::ReadError, qt_error_string(int(errno)));-
549 return false;
never executed: return false;
0
550 }-
551 } else {
executed 19 times by 2 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QFile
19
552 // Unbuffered stdio mode.-
553 if (QT_LSEEK(fd, QT_OFF_T(pos), SEEK_SET) == -1) {
::lseek64(fd, ...pos), 0) == -1Description
TRUEnever evaluated
FALSEevaluated 224235 times by 50 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFrame
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLockFile
  • tst_QMimeDatabase
  • ...
0-224235
554 qWarning() << "QFile::at: Cannot set file position" << pos;-
555 q->setError(QFile::PositionError, qt_error_string(errno));-
556 return false;
never executed: return false;
0
557 }-
558 }
executed 224235 times by 50 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFrame
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLockFile
  • tst_QMimeDatabase
  • ...
224235
559 return true;
executed 224254 times by 50 tests: return true;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QDataStream
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFrame
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLockFile
  • tst_QMimeDatabase
  • ...
224254
560}-
561-
562/*!-
563 \reimp-
564*/-
565int QFSFileEngine::handle() const-
566{-
567 Q_D(const QFSFileEngine);-
568 return d->nativeHandle();
executed 57 times by 13 tests: return d->nativeHandle();
Executed by:
  • tst_QColorDialog
  • tst_QDBusMarshall
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLockFile
  • tst_QSettings
  • tst_QTemporaryFile
  • tst_QTranslator
  • tst_languageChange
  • tst_qlockfile - unknown status
57
569}-
570-
571/*!-
572 \reimp-
573*/-
574qint64 QFSFileEngine::read(char *data, qint64 maxlen)-
575{-
576 Q_D(QFSFileEngine);-
577-
578 // On Windows' stdlib implementation, the results of calling fread and-
579 // fwrite are undefined if not called either in sequence, or if preceded-
580 // with a call to fflush().-
581 if (d->lastIOCommand != QFSFileEnginePrivate::IOReadCommand) {
d->lastIOComma...:IOReadCommandDescription
TRUEevaluated 24029 times by 103 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
FALSEevaluated 62883 times by 44 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QChar
  • tst_QComboBox
  • tst_QCryptographicHash
  • tst_QDataStream
  • tst_QFile
  • tst_QFrame
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLayout
  • tst_QMimeDatabase
  • tst_QMovie
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPixmap
  • tst_QPixmapFilter
  • ...
24029-62883
582 flush();-
583 d->lastIOCommand = QFSFileEnginePrivate::IOReadCommand;-
584 }
executed 24029 times by 103 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
24029
585-
586 return d->nativeRead(data, maxlen);
executed 86912 times by 103 tests: return d->nativeRead(data, maxlen);
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
86912
587}-
588-
589/*!-
590 \internal-
591*/-
592qint64 QFSFileEnginePrivate::readFdFh(char *data, qint64 len)-
593{-
594 Q_Q(QFSFileEngine);-
595-
596 if (len < 0 || len != qint64(size_t(len))) {
len < 0Description
TRUEnever evaluated
FALSEevaluated 86523 times by 102 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
len != qint64(size_t(len))Description
TRUEnever evaluated
FALSEevaluated 86523 times by 102 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
0-86523
597 q->setError(QFile::ReadError, qt_error_string(EINVAL));-
598 return -1;
never executed: return -1;
0
599 }-
600-
601 qint64 readBytes = 0;-
602 bool eof = false;-
603-
604 if (fh) {
fhDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 86518 times by 102 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
5-86518
605 // Buffered stdlib mode.-
606-
607 size_t result;-
608 bool retry = true;-
609 do {-
610 result = fread(data + readBytes, 1, size_t(len - readBytes), fh);-
611 eof = feof(fh);-
612 if (retry && eof && result == 0) {
retryDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QFile
FALSEnever evaluated
eofDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
result == 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QFile
0-5
613 // On OS X, this is needed, e.g., if a file was written to-
614 // through another stream since our last read. See test-
615 // tst_QFile::appendAndRead-
616 QT_FSEEK(fh, QT_FTELL(fh), SEEK_SET); // re-sync stream.-
617 retry = false;-
618 continue;
never executed: continue;
0
619 }-
620 readBytes += result;-
621 } while (!eof && (result == 0 ? errno == EINTR : readBytes < len));
executed 5 times by 1 test: end of block
Executed by:
  • tst_QFile
result == 0Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
!eofDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QFile
(result == 0 ?...adBytes < len)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
0-5
622-
623 } else if (fd != -1) {
executed 5 times by 1 test: end of block
Executed by:
  • tst_QFile
fd != -1Description
TRUEevaluated 86518 times by 102 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
FALSEnever evaluated
0-86518
624 // Unbuffered stdio mode.-
625-
626 SignedIOType result;-
627 do {-
628 // calculate the chunk size-
629 // on Windows or 32-bit no-largefile Unix, we'll need to read in chunks-
630 // we limit to the size of the signed type, otherwise we could get a negative number as a result-
631 quint64 wantedBytes = quint64(len) - quint64(readBytes);-
632 UnsignedIOType chunkSize = std::numeric_limits<SignedIOType>::max();-
633 if (chunkSize > wantedBytes)
chunkSize > wantedBytesDescription
TRUEevaluated 113071 times by 102 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
FALSEnever evaluated
0-113071
634 chunkSize = wantedBytes;
executed 113071 times by 102 tests: chunkSize = wantedBytes;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
113071
635 result = QT_READ(fd, data + readBytes, chunkSize);-
636 } while (result > 0 && (readBytes += result) < len);
executed 113071 times by 102 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
result > 0Description
TRUEevaluated 41490 times by 102 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
FALSEevaluated 71581 times by 86 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDatabase
  • tst_QFrame
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • ...
(readBytes += result) < lenDescription
TRUEevaluated 26553 times by 86 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDatabase
  • tst_QFrame
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • ...
FALSEevaluated 14937 times by 63 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_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
14937-113071
637-
638 eof = !(result == -1);-
639 }
executed 86518 times by 102 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
86518
640-
641 if (!eof && readBytes == 0) {
!eofDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 86522 times by 102 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
readBytes == 0Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
0-86522
642 readBytes = -1;-
643 q->setError(QFile::ReadError, qt_error_string(errno));-
644 }
never executed: end of block
0
645-
646 return readBytes;
executed 86523 times by 102 tests: return readBytes;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
86523
647}-
648-
649/*!-
650 \reimp-
651*/-
652qint64 QFSFileEngine::readLine(char *data, qint64 maxlen)-
653{-
654 Q_D(QFSFileEngine);-
655-
656 // On Windows' stdlib implementation, the results of calling fread and-
657 // fwrite are undefined if not called either in sequence, or if preceded-
658 // with a call to fflush().-
659 if (d->lastIOCommand != QFSFileEnginePrivate::IOReadCommand) {
d->lastIOComma...:IOReadCommandDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QFile
4
660 flush();-
661 d->lastIOCommand = QFSFileEnginePrivate::IOReadCommand;-
662 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QFile
4
663-
664 return d->nativeReadLine(data, maxlen);
executed 8 times by 1 test: return d->nativeReadLine(data, maxlen);
Executed by:
  • tst_QFile
8
665}-
666-
667/*!-
668 \internal-
669*/-
670qint64 QFSFileEnginePrivate::readLineFdFh(char *data, qint64 maxlen)-
671{-
672 Q_Q(QFSFileEngine);-
673 if (!fh)
!fhDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QFile
FALSEnever evaluated
0-8
674 return q->QAbstractFileEngine::readLine(data, maxlen);
executed 8 times by 1 test: return q->QAbstractFileEngine::readLine(data, maxlen);
Executed by:
  • tst_QFile
8
675-
676 QT_OFF_T oldPos = 0;-
677#ifdef Q_OS_WIN-
678 bool seq = q->isSequential();-
679 if (!seq)-
680#endif-
681 oldPos = QT_FTELL(fh);-
682-
683 // QIODevice::readLine() passes maxlen - 1 to QFile::readLineData()-
684 // because it has made space for the '\0' at the end of data. But fgets-
685 // does the same, so we'd get two '\0' at the end - passing maxlen + 1-
686 // solves this.-
687 if (!fgets(data, int(maxlen + 1), fh)) {
!fgets(data, i...xlen + 1), fh)Description
TRUEnever evaluated
FALSEnever evaluated
0
688 if (!feof(fh))
!feof(fh)Description
TRUEnever evaluated
FALSEnever evaluated
0
689 q->setError(QFile::ReadError, qt_error_string(int(errno)));
never executed: q->setError(QFile::ReadError, qt_error_string(int((*__errno_location ()))));
0
690 return -1; // error
never executed: return -1;
0
691 }-
692-
693#ifdef Q_OS_WIN-
694 if (seq)-
695 return qstrlen(data);-
696#endif-
697-
698 qint64 lineLength = QT_FTELL(fh) - oldPos;-
699 return lineLength > 0 ? lineLength : qstrlen(data);
never executed: return lineLength > 0 ? lineLength : qstrlen(data);
0
700}-
701-
702/*!-
703 \reimp-
704*/-
705qint64 QFSFileEngine::write(const char *data, qint64 len)-
706{-
707 Q_D(QFSFileEngine);-
708-
709 // On Windows' stdlib implementation, the results of calling fread and-
710 // fwrite are undefined if not called either in sequence, or if preceded-
711 // with a call to fflush().-
712 if (d->lastIOCommand != QFSFileEnginePrivate::IOWriteCommand) {
d->lastIOComma...IOWriteCommandDescription
TRUEevaluated 2396 times by 46 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
FALSEevaluated 16743 times by 15 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QDataStream
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QFtp
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QTextStream
2396-16743
713 flush();-
714 d->lastIOCommand = QFSFileEnginePrivate::IOWriteCommand;-
715 }
executed 2396 times by 46 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
2396
716-
717 return d->nativeWrite(data, len);
executed 19139 times by 46 tests: return d->nativeWrite(data, len);
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
19139
718}-
719-
720/*!-
721 \internal-
722*/-
723qint64 QFSFileEnginePrivate::writeFdFh(const char *data, qint64 len)-
724{-
725 Q_Q(QFSFileEngine);-
726-
727 if (len < 0 || len != qint64(size_t(len))) {
len < 0Description
TRUEnever evaluated
FALSEevaluated 19139 times by 46 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
len != qint64(size_t(len))Description
TRUEnever evaluated
FALSEevaluated 19139 times by 46 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
0-19139
728 q->setError(QFile::WriteError, qt_error_string(EINVAL));-
729 return -1;
never executed: return -1;
0
730 }-
731-
732 qint64 writtenBytes = 0;-
733-
734 if (len) { // avoid passing nullptr to fwrite() or QT_WRITE() (UB)
lenDescription
TRUEevaluated 19136 times by 46 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QFile
3-19136
735-
736 if (fh) {
fhDescription
TRUEevaluated 210 times by 4 tests
Evaluated by:
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
FALSEevaluated 18926 times by 43 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
210-18926
737 // Buffered stdlib mode.-
738-
739 size_t result;-
740 do {-
741 result = fwrite(data + writtenBytes, 1, size_t(len - writtenBytes), fh);-
742 writtenBytes += result;-
743 } while (result == 0 ? errno == EINTR : writtenBytes < len);
executed 210 times by 4 tests: end of block
Executed by:
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
result == 0 ? ...tenBytes < lenDescription
TRUEnever evaluated
FALSEevaluated 210 times by 4 tests
Evaluated by:
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
result == 0Description
TRUEnever evaluated
FALSEevaluated 210 times by 4 tests
Evaluated by:
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
0-210
744-
745 } else if (fd != -1) {
executed 210 times by 4 tests: end of block
Executed by:
  • tst_QFile
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qnetworkreply - unknown status
fd != -1Description
TRUEevaluated 18926 times by 43 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
FALSEnever evaluated
0-18926
746 // Unbuffered stdio mode.-
747-
748 SignedIOType result;-
749 do {-
750 // calculate the chunk size-
751 // on Windows or 32-bit no-largefile Unix, we'll need to read in chunks-
752 // we limit to the size of the signed type, otherwise we could get a negative number as a result-
753 quint64 wantedBytes = quint64(len) - quint64(writtenBytes);-
754 UnsignedIOType chunkSize = std::numeric_limits<SignedIOType>::max();-
755 if (chunkSize > wantedBytes)
chunkSize > wantedBytesDescription
TRUEevaluated 18926 times by 43 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
FALSEnever evaluated
0-18926
756 chunkSize = wantedBytes;
executed 18926 times by 43 tests: chunkSize = wantedBytes;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
18926
757 result = QT_WRITE(fd, data + writtenBytes, chunkSize);-
758 } while (result > 0 && (writtenBytes += result) < len);
executed 18926 times by 43 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
result > 0Description
TRUEevaluated 18920 times by 43 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QFile
(writtenBytes += result) < lenDescription
TRUEnever evaluated
FALSEevaluated 18920 times by 43 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
0-18926
759 }
executed 18926 times by 43 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
18926
760-
761 }
executed 19136 times by 46 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
19136
762-
763 if (len && writtenBytes == 0) {
lenDescription
TRUEevaluated 19136 times by 46 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QFile
writtenBytes == 0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 19130 times by 46 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
3-19136
764 writtenBytes = -1;-
765 q->setError(errno == ENOSPC ? QFile::ResourceError : QFile::WriteError, qt_error_string(errno));-
766 } else {
executed 6 times by 1 test: end of block
Executed by:
  • tst_QFile
6
767 // reset the cached size, if any-
768 metaData.clearFlags(QFileSystemMetaData::SizeAttribute);-
769 }
executed 19133 times by 46 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
19133
770-
771 return writtenBytes;
executed 19139 times by 46 tests: return writtenBytes;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • 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_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPainterPath
  • ...
19139
772}-
773-
774#ifndef QT_NO_FILESYSTEMITERATOR-
775/*!-
776 \internal-
777*/-
778QAbstractFileEngine::Iterator *QFSFileEngine::beginEntryList(QDir::Filters filters, const QStringList &filterNames)-
779{-
780 return new QFSFileEngineIterator(filters, filterNames);
never executed: return new QFSFileEngineIterator(filters, filterNames);
0
781}-
782-
783/*!-
784 \internal-
785*/-
786QAbstractFileEngine::Iterator *QFSFileEngine::endEntryList()-
787{-
788 return 0;
never executed: return 0;
0
789}-
790#endif // QT_NO_FILESYSTEMITERATOR-
791-
792/*!-
793 \internal-
794*/-
795QStringList QFSFileEngine::entryList(QDir::Filters filters, const QStringList &filterNames) const-
796{-
797 return QAbstractFileEngine::entryList(filters, filterNames);
never executed: return QAbstractFileEngine::entryList(filters, filterNames);
0
798}-
799-
800/*!-
801 \reimp-
802*/-
803bool QFSFileEngine::isSequential() const-
804{-
805 Q_D(const QFSFileEngine);-
806 if (d->is_sequential == 0)
d->is_sequential == 0Description
TRUEevaluated 26550 times by 109 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • ...
FALSEevaluated 18450 times by 58 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFrame
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcoImageFormat
  • ...
18450-26550
807 d->is_sequential = d->nativeIsSequential() ? 1 : 2;
executed 26550 times by 109 tests: d->is_sequential = d->nativeIsSequential() ? 1 : 2;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • ...
d->nativeIsSequential()Description
TRUEevaluated 360 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 26190 times by 104 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • ...
360-26550
808 return d->is_sequential == 1;
executed 45000 times by 109 tests: return d->is_sequential == 1;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • ...
45000
809}-
810-
811/*!-
812 \internal-
813*/-
814#ifdef Q_OS_UNIX-
815bool QFSFileEnginePrivate::isSequentialFdFh() const-
816{-
817 if (doStat(QFileSystemMetaData::SequentialType))
doStat(QFileSy...equentialType)Description
TRUEevaluated 26944 times by 109 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • ...
FALSEnever evaluated
0-26944
818 return metaData.isSequential();
executed 26944 times by 109 tests: return metaData.isSequential();
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • ...
26944
819 return true;
never executed: return true;
0
820}-
821#endif-
822-
823/*!-
824 \reimp-
825*/-
826bool QFSFileEngine::extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output)-
827{-
828 Q_D(QFSFileEngine);-
829 if (extension == AtEndExtension && d->fh && isSequential())
extension == AtEndExtensionDescription
TRUEnever evaluated
FALSEevaluated 67184 times by 121 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_QErrorMessage
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • ...
d->fhDescription
TRUEnever evaluated
FALSEnever evaluated
isSequential()Description
TRUEnever evaluated
FALSEnever evaluated
0-67184
830 return feof(d->fh);
never executed: return feof(d->fh);
0
831-
832 if (extension == MapExtension) {
extension == MapExtensionDescription
TRUEevaluated 34379 times by 121 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_QErrorMessage
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • ...
FALSEevaluated 32805 times by 2 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
32805-34379
833 const MapExtensionOption *options = (const MapExtensionOption*)(option);-
834 MapExtensionReturn *returnValue = static_cast<MapExtensionReturn*>(output);-
835 returnValue->address = d->map(options->offset, options->size, options->flags);-
836 return (returnValue->address != 0);
executed 34379 times by 121 tests: return (returnValue->address != 0);
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_QErrorMessage
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • ...
34379
837 }-
838 if (extension == UnMapExtension) {
extension == UnMapExtensionDescription
TRUEevaluated 32805 times by 2 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
FALSEnever evaluated
0-32805
839 const UnMapExtensionOption *options = (const UnMapExtensionOption*)option;-
840 return d->unmap(options->address);
executed 32805 times by 2 tests: return d->unmap(options->address);
Executed by:
  • tst_LargeFile
  • tst_QFile
32805
841 }-
842-
843 return false;
never executed: return false;
0
844}-
845-
846/*!-
847 \reimp-
848*/-
849bool QFSFileEngine::supportsExtension(Extension extension) const-
850{-
851 Q_D(const QFSFileEngine);-
852 if (extension == AtEndExtension && d->fh && isSequential())
extension == AtEndExtensionDescription
TRUEevaluated 4194 times by 44 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • tst_QImageReader
  • tst_QLayout
  • tst_QLoggingRegistry
  • ...
FALSEevaluated 67831 times by 128 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_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFactoryLoader
  • ...
d->fhDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 4190 times by 44 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • tst_QImageReader
  • tst_QLayout
  • tst_QLoggingRegistry
  • ...
isSequential()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QFile
0-67831
853 return true;
never executed: return true;
0
854 if (extension == FastReadLineExtension && d->fh)
extension == F...dLineExtensionDescription
TRUEevaluated 647 times by 37 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • ...
FALSEevaluated 71378 times by 136 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_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_QErrorMessage
  • ...
d->fhDescription
TRUEnever evaluated
FALSEevaluated 647 times by 37 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • ...
0-71378
855 return true;
never executed: return true;
0
856 if (extension == FastReadLineExtension && d->fd != -1 && isSequential())
extension == F...dLineExtensionDescription
TRUEevaluated 647 times by 37 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • ...
FALSEevaluated 71378 times by 136 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_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_QErrorMessage
  • ...
d->fd != -1Description
TRUEevaluated 647 times by 37 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • ...
FALSEnever evaluated
isSequential()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 639 times by 37 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • ...
0-71378
857 return true;
executed 8 times by 1 test: return true;
Executed by:
  • tst_QFile
8
858 if (extension == UnMapExtension || extension == MapExtension)
extension == UnMapExtensionDescription
TRUEevaluated 32805 times by 2 tests
Evaluated by:
  • tst_LargeFile
  • tst_QFile
FALSEevaluated 39212 times by 138 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_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_QErrorMessage
  • ...
extension == MapExtensionDescription
TRUEevaluated 34379 times by 121 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_QErrorMessage
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • ...
FALSEevaluated 4833 times by 49 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
4833-39212
859 return true;
executed 67184 times by 121 tests: return true;
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_QErrorMessage
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • ...
67184
860 return false;
executed 4833 times by 49 tests: return false;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • ...
4833
861}-
862-
863/*! \fn bool QFSFileEngine::caseSensitive() const-
864 Returns \c true for Windows, false for Unix.-
865*/-
866-
867/*! \fn bool QFSFileEngine::copy(const QString &copyName)-
868-
869 For windows, copy the file to file \a copyName.-
870-
871 Not implemented for Unix.-
872*/-
873-
874/*! \fn QString QFSFileEngine::currentPath(const QString &fileName)-
875 For Unix, returns the current working directory for the file-
876 engine.-
877-
878 For Windows, returns the canonicalized form of the current path used-
879 by the file engine for the drive specified by \a fileName. On-
880 Windows, each drive has its own current directory, so a different-
881 path is returned for file names that include different drive names-
882 (e.g. A: or C:).-
883-
884 \sa setCurrentPath()-
885*/-
886-
887/*! \fn QFileInfoList QFSFileEngine::drives()-
888 For Windows, returns the list of drives in the file system as a list-
889 of QFileInfo objects. On Unix, only the root path is returned.-
890 On Windows, this function returns all drives (A:\, C:\, D:\, and so on).-
891-
892 For Unix, the list contains just the root path "/".-
893*/-
894-
895/*! \fn QString QFSFileEngine::fileName(FileName file) const-
896 \reimp-
897*/-
898-
899/*! \fn QDateTime QFSFileEngine::fileTime(FileTime time) const-
900 \reimp-
901*/-
902-
903/*! \fn QString QFSFileEngine::homePath()-
904 Returns the home path of the current user.-
905-
906 \sa rootPath()-
907*/-
908-
909/*! \fn bool QFSFileEngine::isRelativePath() const-
910 \reimp-
911*/-
912-
913/*! \fn bool QFSFileEngine::link(const QString &newName)-
914-
915 Creates a link from the file currently specified by fileName() to-
916 \a newName. What a link is depends on the underlying filesystem-
917 (be it a shortcut on Windows or a symbolic link on Unix). Returns-
918 true if successful; otherwise returns \c false.-
919*/-
920-
921/*! \fn bool QFSFileEngine::mkdir(const QString &name, bool createParentDirectories) const-
922 \reimp-
923*/-
924-
925/*! \fn uint QFSFileEngine::ownerId(FileOwner own) const-
926 In Unix, if stat() is successful, the \c uid is returned if-
927 \a own is the owner. Otherwise the \c gid is returned. If stat()-
928 is unsuccessful, -2 is reuturned.-
929-
930 For Windows, -2 is always returned.-
931*/-
932-
933/*! \fn QString QFSFileEngine::owner(FileOwner own) const-
934 \reimp-
935*/-
936-
937/*! \fn bool QFSFileEngine::remove()-
938 \reimp-
939*/-
940-
941/*! \fn bool QFSFileEngine::rename(const QString &newName)-
942 \reimp-
943*/-
944-
945-
946/*! \fn bool QFSFileEngine::renameOverwrite(const QString &newName)-
947 \reimp-
948*/-
949-
950/*! \fn bool QFSFileEngine::rmdir(const QString &name, bool recurseParentDirectories) const-
951 \reimp-
952*/-
953-
954/*! \fn QString QFSFileEngine::rootPath()-
955 Returns the root path.-
956-
957 \sa homePath()-
958*/-
959-
960/*! \fn bool QFSFileEngine::setCurrentPath(const QString &path)-
961 Sets the current path (e.g., for QDir), to \a path. Returns \c true if the-
962 new path exists; otherwise this function does nothing, and returns \c false.-
963-
964 \sa currentPath()-
965*/-
966-
967/*! \fn bool QFSFileEngine::setPermissions(uint perms)-
968 \reimp-
969*/-
970-
971/*! \fn bool QFSFileEngine::setSize(qint64 size)-
972 \reimp-
973*/-
974-
975/*! \fn QString QFSFileEngine::tempPath()-
976 Returns the temporary path (i.e., a path in which it is safe-
977 to store temporary files).-
978*/-
979-
980/*! \fn QAbstractFileEngine::FileFlags QFSFileEnginePrivate::getPermissions(QAbstractFileEngine::FileFlags type) const-
981 \internal-
982*/-
983-
984QT_END_NAMESPACE-
985-
986#endif // QT_NO_FSFILEENGINE-
Source codeSwitch to Preprocessed file

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