Line | Source Code | Coverage |
---|
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | QResourceFileEngineIterator::QResourceFileEngineIterator(QDir::Filters filters, | - |
6 | const QStringList &filterNames) | - |
7 | : QAbstractFileEngineIterator(filters, filterNames), index(-1) | - |
8 | { | - |
9 | } executed: } Execution Count:17 | 17 |
10 | | - |
11 | QResourceFileEngineIterator::~QResourceFileEngineIterator() | - |
12 | { | - |
13 | } | - |
14 | | - |
15 | QString QResourceFileEngineIterator::next() | - |
16 | { | - |
17 | if (!hasNext()) partially evaluated: !hasNext() no Evaluation Count:0 | yes Evaluation Count:183 |
| 0-183 |
18 | return QString(); never executed: return QString(); | 0 |
19 | ++index; | - |
20 | return currentFilePath(); executed: return currentFilePath(); Execution Count:183 | 183 |
21 | } | - |
22 | | - |
23 | bool QResourceFileEngineIterator::hasNext() const | - |
24 | { | - |
25 | if (index == -1) { evaluated: index == -1 yes Evaluation Count:17 | yes Evaluation Count:366 |
| 17-366 |
26 | | - |
27 | QResource resource(path()); | - |
28 | if (!resource.isValid()) evaluated: !resource.isValid() yes Evaluation Count:1 | yes Evaluation Count:16 |
| 1-16 |
29 | return false; executed: return false; Execution Count:1 | 1 |
30 | | - |
31 | | - |
32 | entries = resource.children(); | - |
33 | index = 0; | - |
34 | } executed: } Execution Count:16 | 16 |
35 | | - |
36 | return index < entries.size(); executed: return index < entries.size(); Execution Count:382 | 382 |
37 | } | - |
38 | | - |
39 | QString QResourceFileEngineIterator::currentFileName() const | - |
40 | { | - |
41 | if (index <= 0 || index > entries.size()) partially evaluated: index <= 0 no Evaluation Count:0 | yes Evaluation Count:549 |
partially evaluated: index > entries.size() no Evaluation Count:0 | yes Evaluation Count:549 |
| 0-549 |
42 | return QString(); never executed: return QString(); | 0 |
43 | return entries.at(index - 1); executed: return entries.at(index - 1); Execution Count:549 | 549 |
44 | } | - |
45 | | - |
46 | | - |
47 | | - |
| | |