Line | Source Code | Coverage |
---|
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | QFSFileEngineIterator::QFSFileEngineIterator(QDir::Filters filters, const QStringList &filterNames) | - |
7 | : QAbstractFileEngineIterator(filters, filterNames) | - |
8 | , done(false) | - |
9 | { | - |
10 | } | 0 |
11 | | - |
12 | QFSFileEngineIterator::~QFSFileEngineIterator() | - |
13 | { | - |
14 | } | - |
15 | | - |
16 | bool QFSFileEngineIterator::hasNext() const | - |
17 | { | - |
18 | if (!done && !nativeIterator) { never evaluated: !nativeIterator | 0 |
19 | nativeIterator.reset(new QFileSystemIterator(QFileSystemEntry(path()), | - |
20 | filters(), nameFilters())); | - |
21 | advance(); | - |
22 | } | 0 |
23 | | - |
24 | return !done; never executed: return !done; | 0 |
25 | } | - |
26 | | - |
27 | QString 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 | | - |
36 | void 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 { | 0 |
45 | done = true; | - |
46 | nativeIterator.reset(); | - |
47 | } | 0 |
48 | } | - |
49 | | - |
50 | QString QFSFileEngineIterator::currentFileName() const | - |
51 | { | - |
52 | return currentInfo.fileName(); never executed: return currentInfo.fileName(); | 0 |
53 | } | - |
54 | | - |
55 | QFileInfo QFSFileEngineIterator::currentFileInfo() const | - |
56 | { | - |
57 | return currentInfo; never executed: return currentInfo; | 0 |
58 | } | - |
59 | | - |
60 | | - |
61 | | - |
| | |