Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/corelib/io/qresource_iterator.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | - | |||||||||||||
5 | QResourceFileEngineIterator::QResourceFileEngineIterator(QDir::Filters filters, | - | ||||||||||||
6 | const QStringList &filterNames) | - | ||||||||||||
7 | : QAbstractFileEngineIterator(filters, filterNames), index(-1) | - | ||||||||||||
8 | { | - | ||||||||||||
9 | } executed 174 times by 6 tests: end of block Executed by:
| 174 | ||||||||||||
10 | - | |||||||||||||
11 | QResourceFileEngineIterator::~QResourceFileEngineIterator() | - | ||||||||||||
12 | { | - | ||||||||||||
13 | } | - | ||||||||||||
14 | - | |||||||||||||
15 | QString QResourceFileEngineIterator::next() | - | ||||||||||||
16 | { | - | ||||||||||||
17 | if (!hasNext()
| 0-514 | ||||||||||||
18 | return never executed: QString();return QString(); never executed: return QString(); | 0 | ||||||||||||
19 | ++index; | - | ||||||||||||
20 | return executed 514 times by 6 tests: currentFilePath();return currentFilePath(); Executed by:
executed 514 times by 6 tests: return currentFilePath(); Executed by:
| 514 | ||||||||||||
21 | } | - | ||||||||||||
22 | - | |||||||||||||
23 | bool QResourceFileEngineIterator::hasNext() const | - | ||||||||||||
24 | { | - | ||||||||||||
25 | if (index == -1
| 174-1028 | ||||||||||||
26 | - | |||||||||||||
27 | QResource resource(path()); | - | ||||||||||||
28 | if (!resource.isValid()
| 1-173 | ||||||||||||
29 | return executed 1 time by 1 test: false;return false; Executed by:
executed 1 time by 1 test: return false; Executed by:
| 1 | ||||||||||||
30 | - | |||||||||||||
31 | - | |||||||||||||
32 | entries = resource.children(); | - | ||||||||||||
33 | index = 0; | - | ||||||||||||
34 | } executed 173 times by 6 tests: end of block Executed by:
| 173 | ||||||||||||
35 | - | |||||||||||||
36 | return executed 1201 times by 6 tests: index < entries.size();return index < entries.size(); Executed by:
executed 1201 times by 6 tests: return index < entries.size(); Executed by:
| 1201 | ||||||||||||
37 | } | - | ||||||||||||
38 | - | |||||||||||||
39 | QString QResourceFileEngineIterator::currentFileName() const | - | ||||||||||||
40 | { | - | ||||||||||||
41 | if (index <= 0
| 0-1542 | ||||||||||||
42 | return never executed: QString();return QString(); never executed: return QString(); | 0 | ||||||||||||
43 | return executed 1542 times by 6 tests: entries.at(index - 1);return entries.at(index - 1); Executed by:
executed 1542 times by 6 tests: return entries.at(index - 1); Executed by:
| 1542 | ||||||||||||
44 | } | - | ||||||||||||
45 | - | |||||||||||||
46 | - | |||||||||||||
Switch to Source code | Preprocessed file |