qabstractfileengine.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/io/qabstractfileengine.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7static bool qt_file_engine_handlers_in_use = false;-
8-
9-
10-
11-
12-
13namespace { namespace Q_QGS_fileEngineHandlerMutex { typedef QReadWriteLock Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEevaluated 3 times by 3 tests
Evaluated by:
  • tst_qabstractfileengine - unknown status
  • tst_qdiriterator - unknown status
  • tst_qfile - unknown status
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
executed 3 times by 3 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_qabstractfileengine - unknown status
  • tst_qdiriterator - unknown status
  • tst_qfile - unknown status
}
executed 3 times by 3 tests: end of block
Executed by:
  • tst_qabstractfileengine - unknown status
  • tst_qdiriterator - unknown status
  • tst_qfile - unknown status
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type (QReadWriteLock::Recursive))) : value (QReadWriteLock::Recursive) { guard.store(QtGlobalStatic::Initialized); } } holder; return
executed 120 times by 6 tests: return &holder.value;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDirIterator
  • tst_QFile
  • tst_qabstractfileengine - unknown status
  • tst_qdiriterator - unknown status
  • tst_qfile - unknown status
&holder.value;
executed 120 times by 6 tests: return &holder.value;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDirIterator
  • tst_QFile
  • tst_qabstractfileengine - unknown status
  • tst_qdiriterator - unknown status
  • tst_qfile - unknown status
} } } static QGlobalStatic<QReadWriteLock, Q_QGS_fileEngineHandlerMutex::innerFunction, Q_QGS_fileEngineHandlerMutex::guard> fileEngineHandlerMutex;
0-120
14static bool qt_abstractfileenginehandlerlist_shutDown = false;-
15class QAbstractFileEngineHandlerList : public QList<QAbstractFileEngineHandler *>-
16{-
17public:-
18 ~QAbstractFileEngineHandlerList()-
19 {-
20 QWriteLocker locker(fileEngineHandlerMutex());-
21 qt_abstractfileenginehandlerlist_shutDown = true;-
22 }
executed 3 times by 3 tests: end of block
Executed by:
  • tst_qabstractfileengine - unknown status
  • tst_qdiriterator - unknown status
  • tst_qfile - unknown status
3
23};-
24namespace { namespace Q_QGS_fileEngineHandlers { typedef QAbstractFileEngineHandlerList Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEevaluated 3 times by 3 tests
Evaluated by:
  • tst_qabstractfileengine - unknown status
  • tst_qdiriterator - unknown status
  • tst_qfile - unknown status
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
executed 3 times by 3 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_qabstractfileengine - unknown status
  • tst_qdiriterator - unknown status
  • tst_qfile - unknown status
}
executed 3 times by 3 tests: end of block
Executed by:
  • tst_qabstractfileengine - unknown status
  • tst_qdiriterator - unknown status
  • tst_qfile - unknown status
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return
executed 117 times by 3 tests: return &holder.value;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDirIterator
  • tst_QFile
&holder.value;
executed 117 times by 3 tests: return &holder.value;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDirIterator
  • tst_QFile
} } } static QGlobalStatic<QAbstractFileEngineHandlerList, Q_QGS_fileEngineHandlers::innerFunction, Q_QGS_fileEngineHandlers::guard> fileEngineHandlers;
0-117
25QAbstractFileEngineHandler::QAbstractFileEngineHandler()-
26{-
27 QWriteLocker locker(fileEngineHandlerMutex());-
28 qt_file_engine_handlers_in_use = true;-
29 fileEngineHandlers()->prepend(this);-
30}
executed 15 times by 3 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDirIterator
  • tst_QFile
15
31-
32-
33-
34-
35-
36QAbstractFileEngineHandler::~QAbstractFileEngineHandler()-
37{-
38 QWriteLocker locker(fileEngineHandlerMutex());-
39-
40 if (!qt_abstractfileenginehandlerlist_shutDown
!qt_abstractfi...rlist_shutDownDescription
TRUEevaluated 15 times by 3 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDirIterator
  • tst_QFile
FALSEnever evaluated
) {
0-15
41 QAbstractFileEngineHandlerList *handlers = fileEngineHandlers();-
42 handlers->removeOne(this);-
43 if (handlers->isEmpty()
handlers->isEmpty()Description
TRUEevaluated 14 times by 3 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDirIterator
  • tst_QFile
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
)
1-14
44 qt_file_engine_handlers_in_use = false;
executed 14 times by 3 tests: qt_file_engine_handlers_in_use = false;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDirIterator
  • tst_QFile
14
45 }
executed 15 times by 3 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDirIterator
  • tst_QFile
15
46}
executed 15 times by 3 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDirIterator
  • tst_QFile
15
47-
48-
49-
50-
51-
52-
53QAbstractFileEngine *qt_custom_file_engine_handler_create(const QString &path)-
54{-
55 QAbstractFileEngine *engine = 0;-
56-
57 if (qt_file_engine_handlers_in_use
qt_file_engine_handlers_in_useDescription
TRUEevaluated 87 times by 3 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDirIterator
  • tst_QFile
FALSEevaluated 305828 times by 303 tests
Evaluated by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • ...
) {
87-305828
58 QReadLocker locker(fileEngineHandlerMutex());-
59-
60-
61 QAbstractFileEngineHandlerList *handlers = fileEngineHandlers();-
62 for (int i = 0; i < handlers->size()
i < handlers->size()Description
TRUEevaluated 87 times by 3 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDirIterator
  • tst_QFile
FALSEevaluated 34 times by 2 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QFile
; i++) {
34-87
63 if ((
(engine = hand...>create(path))Description
TRUEevaluated 53 times by 3 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDirIterator
  • tst_QFile
FALSEevaluated 34 times by 2 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QFile
engine = handlers->at(i)->create(path))
(engine = hand...>create(path))Description
TRUEevaluated 53 times by 3 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDirIterator
  • tst_QFile
FALSEevaluated 34 times by 2 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QFile
)
34-53
64 break;
executed 53 times by 3 tests: break;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDirIterator
  • tst_QFile
53
65 }
executed 34 times by 2 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QFile
34
66 }
executed 87 times by 3 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDirIterator
  • tst_QFile
87
67-
68 return
executed 305915 times by 303 tests: return engine;
Executed by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • ...
engine;
executed 305915 times by 303 tests: return engine;
Executed by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • ...
305915
69}-
70QAbstractFileEngine *QAbstractFileEngine::create(const QString &fileName)-
71{-
72 QFileSystemEntry entry(fileName);-
73 QFileSystemMetaData metaData;-
74 QAbstractFileEngine *engine = QFileSystemEngine::resolveEntryAndCreateLegacyEngine(entry, metaData);-
75-
76-
77 if (!engine
!engineDescription
TRUEevaluated 47048 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_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • ...
FALSEevaluated 14942 times by 83 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
)
14942-47048
78-
79 return
executed 47048 times by 207 tests: return new QFSFileEngine(entry.filePath());
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
  • ...
new QFSFileEngine(entry.filePath());
executed 47048 times by 207 tests: return new QFSFileEngine(entry.filePath());
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
  • ...
47048
80-
81-
82 return
executed 14942 times by 83 tests: return engine;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
engine;
executed 14942 times by 83 tests: return engine;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
14942
83}-
84QAbstractFileEngine::QAbstractFileEngine() : d_ptr(new QAbstractFileEnginePrivate)-
85{-
86 d_ptr->q_ptr = this;-
87}
executed 18 times by 2 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QFile
18
88-
89-
90-
91-
92-
93-
94QAbstractFileEngine::QAbstractFileEngine(QAbstractFileEnginePrivate &dd) : d_ptr(&dd)-
95{-
96 d_ptr->q_ptr = this;-
97}
executed 98631 times by 217 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
  • ...
98631
98-
99-
100-
101-
102QAbstractFileEngine::~QAbstractFileEngine()-
103{-
104}-
105bool QAbstractFileEngine::open(QIODevice::OpenMode openMode)-
106{-
107 (void)openMode;;-
108 return
never executed: return false;
false;
never executed: return false;
0
109}-
110-
111-
112-
113-
114-
115-
116bool QAbstractFileEngine::close()-
117{-
118 return
never executed: return false;
false;
never executed: return false;
0
119}-
120bool QAbstractFileEngine::syncToDisk()-
121{-
122 return
never executed: return false;
false;
never executed: return false;
0
123}-
124-
125-
126-
127-
128-
129-
130-
131bool QAbstractFileEngine::flush()-
132{-
133 return
never executed: return false;
false;
never executed: return false;
0
134}-
135-
136-
137-
138-
139qint64 QAbstractFileEngine::size() const-
140{-
141 return
never executed: return 0;
0;
never executed: return 0;
0
142}-
143-
144-
145-
146-
147-
148-
149qint64 QAbstractFileEngine::pos() const-
150{-
151 return
never executed: return 0;
0;
never executed: return 0;
0
152}-
153bool QAbstractFileEngine::seek(qint64 pos)-
154{-
155 (void)pos;;-
156 return
never executed: return false;
false;
never executed: return false;
0
157}-
158bool QAbstractFileEngine::isSequential() const-
159{-
160 return
executed 13 times by 1 test: return false;
Executed by:
  • tst_QAbstractFileEngine
false;
executed 13 times by 1 test: return false;
Executed by:
  • tst_QAbstractFileEngine
13
161}-
162bool QAbstractFileEngine::remove()-
163{-
164 return
never executed: return false;
false;
never executed: return false;
0
165}-
166-
167-
168-
169-
170-
171bool QAbstractFileEngine::copy(const QString &newName)-
172{-
173 (void)newName;;-
174 return
never executed: return false;
false;
never executed: return false;
0
175}-
176bool QAbstractFileEngine::rename(const QString &newName)-
177{-
178 (void)newName;;-
179 return
never executed: return false;
false;
never executed: return false;
0
180}-
181bool QAbstractFileEngine::renameOverwrite(const QString &newName)-
182{-
183 (void)newName;;-
184 return
never executed: return false;
false;
never executed: return false;
0
185}-
186-
187-
188-
189-
190-
191-
192-
193bool QAbstractFileEngine::link(const QString &newName)-
194{-
195 (void)newName;;-
196 return
never executed: return false;
false;
never executed: return false;
0
197}-
198bool QAbstractFileEngine::mkdir(const QString &dirName, bool createParentDirectories) const-
199{-
200 (void)dirName;;-
201 (void)createParentDirectories;;-
202 return
never executed: return false;
false;
never executed: return false;
0
203}-
204bool QAbstractFileEngine::rmdir(const QString &dirName, bool recurseParentDirectories) const-
205{-
206 (void)dirName;;-
207 (void)recurseParentDirectories;;-
208 return
never executed: return false;
false;
never executed: return false;
0
209}-
210bool QAbstractFileEngine::setSize(qint64 size)-
211{-
212 (void)size;;-
213 return
never executed: return false;
false;
never executed: return false;
0
214}-
215-
216-
217-
218-
219-
220-
221-
222bool QAbstractFileEngine::caseSensitive() const-
223{-
224 return
never executed: return false;
false;
never executed: return false;
0
225}-
226bool QAbstractFileEngine::isRelativePath() const-
227{-
228 return
never executed: return false;
false;
never executed: return false;
0
229}-
230QStringList QAbstractFileEngine::entryList(QDir::Filters filters, const QStringList &filterNames) const-
231{-
232 QStringList ret;-
233 QDirIterator it(fileName(), filterNames, filters);-
234 while (it.hasNext()
it.hasNext()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
235 it.next();-
236 ret << it.fileName();-
237 }
never executed: end of block
0
238 return
never executed: return ret;
ret;
never executed: return ret;
0
239}-
240QAbstractFileEngine::FileFlags QAbstractFileEngine::fileFlags(FileFlags type) const-
241{-
242 (void)type;;-
243 return
never executed: return 0;
0;
never executed: return 0;
0
244}-
245bool QAbstractFileEngine::setPermissions(uint perms)-
246{-
247 (void)perms;;-
248 return
never executed: return false;
false;
never executed: return false;
0
249}-
250QString QAbstractFileEngine::fileName(FileName file) const-
251{-
252 (void)file;;-
253 return
never executed: return QString();
QString();
never executed: return QString();
0
254}-
255uint QAbstractFileEngine::ownerId(FileOwner owner) const-
256{-
257 (void)owner;;-
258 return
never executed: return 0;
0;
never executed: return 0;
0
259}-
260QString QAbstractFileEngine::owner(FileOwner owner) const-
261{-
262 (void)owner;;-
263 return
never executed: return QString();
QString();
never executed: return QString();
0
264}-
265QDateTime QAbstractFileEngine::fileTime(FileTime time) const-
266{-
267 (void)time;;-
268 return
never executed: return QDateTime();
QDateTime();
never executed: return QDateTime();
0
269}-
270void QAbstractFileEngine::setFileName(const QString &file)-
271{-
272 (void)file;;-
273}
never executed: end of block
0
274-
275-
276-
277-
278-
279-
280int QAbstractFileEngine::handle() const-
281{-
282 return
executed 1 time by 1 test: return -1;
Executed by:
  • tst_QKeySequence
-1;
executed 1 time by 1 test: return -1;
Executed by:
  • tst_QKeySequence
1
283}-
284bool QAbstractFileEngine::atEnd() const-
285{-
286 return
never executed: return const_cast<QAbstractFileEngine *>(this)->extension(AtEndExtension);
const_cast<QAbstractFileEngine *>(this)->extension(AtEndExtension);
never executed: return const_cast<QAbstractFileEngine *>(this)->extension(AtEndExtension);
0
287}-
288uchar *QAbstractFileEngine::map(qint64 offset, qint64 size, QFile::MemoryMapFlags flags)-
289{-
290 MapExtensionOption option;-
291 option.offset = offset;-
292 option.size = size;-
293 option.flags = flags;-
294 MapExtensionReturn r;-
295 if (!extension(MapExtension, &option, &r)
!extension(Map..., &option, &r)Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 34366 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
  • ...
)
24-34366
296 return
executed 24 times by 1 test: return 0;
Executed by:
  • tst_QFile
0;
executed 24 times by 1 test: return 0;
Executed by:
  • tst_QFile
24
297 return
executed 34366 times by 121 tests: return r.address;
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • ...
r.address;
executed 34366 times by 121 tests: return r.address;
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • ...
34366
298}-
299bool QAbstractFileEngine::unmap(uchar *address)-
300{-
301 UnMapExtensionOption options;-
302 options.address = address;-
303 return
executed 32814 times by 2 tests: return extension(UnMapExtension, &options);
Executed by:
  • tst_LargeFile
  • tst_QFile
extension(UnMapExtension, &options);
executed 32814 times by 2 tests: return extension(UnMapExtension, &options);
Executed by:
  • tst_LargeFile
  • tst_QFile
32814
304}-
305class QAbstractFileEngineIteratorPrivate-
306{-
307public:-
308 QString path;-
309 QDir::Filters filters;-
310 QStringList nameFilters;-
311 QFileInfo fileInfo;-
312};-
313-
314-
315-
316-
317-
318QAbstractFileEngineIterator::QAbstractFileEngineIterator(QDir::Filters filters,-
319 const QStringList &nameFilters)-
320 : d(new QAbstractFileEngineIteratorPrivate)-
321{-
322 d->nameFilters = nameFilters;-
323 d->filters = filters;-
324}
executed 176 times by 7 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
176
325-
326-
327-
328-
329-
330-
331QAbstractFileEngineIterator::~QAbstractFileEngineIterator()-
332{-
333}-
334-
335-
336-
337-
338-
339-
340-
341QString QAbstractFileEngineIterator::path() const-
342{-
343 return
executed 1210 times by 7 tests: return d->path;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
d->path;
executed 1210 times by 7 tests: return d->path;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
1210
344}-
345-
346-
347-
348-
349-
350-
351-
352void QAbstractFileEngineIterator::setPath(const QString &path)-
353{-
354 d->path = path;-
355}
executed 176 times by 7 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
176
356-
357-
358-
359-
360-
361-
362QStringList QAbstractFileEngineIterator::nameFilters() const-
363{-
364 return
never executed: return d->nameFilters;
d->nameFilters;
never executed: return d->nameFilters;
0
365}-
366-
367-
368-
369-
370-
371-
372QDir::Filters QAbstractFileEngineIterator::filters() const-
373{-
374 return
never executed: return d->filters;
d->filters;
never executed: return d->filters;
0
375}-
376QString QAbstractFileEngineIterator::currentFilePath() const-
377{-
378 QString name = currentFileName();-
379 if (!name.isNull()
!name.isNull()Description
TRUEevaluated 1036 times by 7 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEnever evaluated
) {
0-1036
380 QString tmp = path();-
381 if (!tmp.isEmpty()
!tmp.isEmpty()Description
TRUEevaluated 1036 times by 7 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEnever evaluated
) {
0-1036
382 if (!tmp.endsWith(QLatin1Char('/'))
!tmp.endsWith(...tin1Char('/'))Description
TRUEevaluated 894 times by 7 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEevaluated 142 times by 2 tests
Evaluated by:
  • tst_QDirIterator
  • tst_rcc
)
142-894
383 tmp.append(QLatin1Char('/'));
executed 894 times by 7 tests: tmp.append(QLatin1Char('/'));
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
894
384 name.prepend(tmp);-
385 }
executed 1036 times by 7 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
1036
386 }
executed 1036 times by 7 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
1036
387 return
executed 1036 times by 7 tests: return name;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
name;
executed 1036 times by 7 tests: return name;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
1036
388}-
389QFileInfo QAbstractFileEngineIterator::currentFileInfo() const-
390{-
391 QString path = currentFilePath();-
392 if (d->fileInfo.filePath() != path
d->fileInfo.filePath() != pathDescription
TRUEevaluated 518 times by 7 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEnever evaluated
)
0-518
393 d->fileInfo.setFile(path);
executed 518 times by 7 tests: d->fileInfo.setFile(path);
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
518
394-
395-
396 return
executed 518 times by 7 tests: return d->fileInfo;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
d->fileInfo;
executed 518 times by 7 tests: return d->fileInfo;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
518
397}-
398QVariant QAbstractFileEngineIterator::entryInfo(EntryInfoType type) const-
399{-
400 (void)type;-
401 return
never executed: return QVariant();
QVariant();
never executed: return QVariant();
0
402}-
403QAbstractFileEngine::Iterator *QAbstractFileEngine::beginEntryList(QDir::Filters filters, const QStringList &filterNames)-
404{-
405 (void)filters;;-
406 (void)filterNames;;-
407 return
never executed: return 0;
0;
never executed: return 0;
0
408}-
409-
410-
411-
412-
413QAbstractFileEngine::Iterator *QAbstractFileEngine::endEntryList()-
414{-
415 return
never executed: return 0;
0;
never executed: return 0;
0
416}-
417qint64 QAbstractFileEngine::read(char *data, qint64 maxlen)-
418{-
419 (void)data;;-
420 (void)maxlen;;-
421 return
never executed: return -1;
-1;
never executed: return -1;
0
422}-
423-
424-
425-
426-
427-
428qint64 QAbstractFileEngine::write(const char *data, qint64 len)-
429{-
430 (void)data;;-
431 (void)len;;-
432 return
never executed: return -1;
-1;
never executed: return -1;
0
433}-
434-
435-
436-
437-
438-
439-
440qint64 QAbstractFileEngine::readLine(char *data, qint64 maxlen)-
441{-
442 qint64 readSoFar = 0;-
443 while (readSoFar < maxlen
readSoFar < maxlenDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QFile
FALSEnever evaluated
) {
0-8
444 char c;-
445 qint64 readResult = read(&c, 1);-
446 if (readResult <= 0
readResult <= 0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QFile
FALSEnever evaluated
)
0-8
447 return
executed 8 times by 1 test: return (readSoFar > 0) ? readSoFar : -1;
Executed by:
  • tst_QFile
(readSoFar > 0) ? readSoFar : -1;
executed 8 times by 1 test: return (readSoFar > 0) ? readSoFar : -1;
Executed by:
  • tst_QFile
8
448 ++readSoFar;-
449 *data++ = c;-
450 if (c == '\n'
c == '\n'Description
TRUEnever evaluated
FALSEnever evaluated
)
0
451 return
never executed: return readSoFar;
readSoFar;
never executed: return readSoFar;
0
452 }
never executed: end of block
0
453 return
never executed: return readSoFar;
readSoFar;
never executed: return readSoFar;
0
454}-
455bool QAbstractFileEngine::extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output)-
456{-
457 (void)extension;;-
458 (void)option;;-
459 (void)output;;-
460 return
never executed: return false;
false;
never executed: return false;
0
461}-
462bool QAbstractFileEngine::supportsExtension(Extension extension) const-
463{-
464 (void)extension;;-
465 return
never executed: return false;
false;
never executed: return false;
0
466}-
467QFile::FileError QAbstractFileEngine::error() const-
468{-
469 const QAbstractFileEnginePrivate * const d = d_func();-
470 return
executed 3754 times by 53 tests: return d->fileError;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTime
  • tst_QDir
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QGlobal
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPixmap
  • ...
d->fileError;
executed 3754 times by 53 tests: return d->fileError;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTime
  • tst_QDir
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QGlobal
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPixmap
  • ...
3754
471}-
472QString QAbstractFileEngine::errorString() const-
473{-
474 const QAbstractFileEnginePrivate * const d = d_func();-
475 return
executed 4349 times by 63 tests: return d->errorString;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTime
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QGlobal
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLocalSocket
  • ...
d->errorString;
executed 4349 times by 63 tests: return d->errorString;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTime
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QGlobal
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLocalSocket
  • ...
4349
476}-
477void QAbstractFileEngine::setError(QFile::FileError error, const QString &errorString)-
478{-
479 QAbstractFileEnginePrivate * const d = d_func();-
480 d->fileError = error;-
481 d->errorString = errorString;-
482}
executed 6409 times by 71 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTime
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIODevice
  • tst_QIcon
  • ...
6409
483-
484-
Switch to Source codePreprocessed file

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