io/qfsfileengine_iterator.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6QFSFileEngineIterator::QFSFileEngineIterator(QDir::Filters filters, const QStringList &filterNames) -
7 : QAbstractFileEngineIterator(filters, filterNames) -
8 , done(false) -
9{ -
10}
never executed: }
0
11 -
12QFSFileEngineIterator::~QFSFileEngineIterator() -
13{ -
14} -
15 -
16bool QFSFileEngineIterator::hasNext() const -
17{ -
18 if (!done && !nativeIterator) {
never evaluated: !done
never evaluated: !nativeIterator
0
19 nativeIterator.reset(new QFileSystemIterator(QFileSystemEntry(path()), -
20 filters(), nameFilters())); -
21 advance(); -
22 }
never executed: }
0
23 -
24 return !done;
never executed: return !done;
0
25} -
26 -
27QString QFSFileEngineIterator::next() -
28{ -
29 if (!hasNext())
never evaluated: !hasNext()
0
30 return QString();
never executed: return QString();
0
31 -
32 advance(); -
33 return currentFilePath();
never executed: return currentFilePath();
0
34} -
35 -
36void QFSFileEngineIterator::advance() const -
37{ -
38 currentInfo = nextInfo; -
39 -
40 QFileSystemEntry entry; -
41 QFileSystemMetaData data; -
42 if (nativeIterator->advance(entry, data)) {
never evaluated: nativeIterator->advance(entry, data)
0
43 nextInfo = QFileInfo(new QFileInfoPrivate(entry, data)); -
44 } else {
never executed: }
0
45 done = true; -
46 nativeIterator.reset(); -
47 }
never executed: }
0
48} -
49 -
50QString QFSFileEngineIterator::currentFileName() const -
51{ -
52 return currentInfo.fileName();
never executed: return currentInfo.fileName();
0
53} -
54 -
55QFileInfo QFSFileEngineIterator::currentFileInfo() const -
56{ -
57 return currentInfo;
never executed: return currentInfo;
0
58} -
59 -
60 -
61 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial