OpenCoverage

qresource_iterator.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/io/qresource_iterator.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5QResourceFileEngineIterator::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:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
174
10-
11QResourceFileEngineIterator::~QResourceFileEngineIterator()-
12{-
13}-
14-
15QString QResourceFileEngineIterator::next()-
16{-
17 if (!hasNext()
!hasNext()Description
TRUEnever evaluated
FALSEevaluated 514 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
)
0-514
18 return
never executed: return QString();
QString();
never executed: return QString();
0
19 ++index;-
20 return
executed 514 times by 6 tests: return currentFilePath();
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
currentFilePath();
executed 514 times by 6 tests: return currentFilePath();
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
514
21}-
22-
23bool QResourceFileEngineIterator::hasNext() const-
24{-
25 if (index == -1
index == -1Description
TRUEevaluated 174 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEevaluated 1028 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
) {
174-1028
26-
27 QResource resource(path());-
28 if (!resource.isValid()
!resource.isValid()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDirIterator
FALSEevaluated 173 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
)
1-173
29 return
executed 1 time by 1 test: return false;
Executed by:
  • tst_QDirIterator
false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_QDirIterator
1
30-
31-
32 entries = resource.children();-
33 index = 0;-
34 }
executed 173 times by 6 tests: end of block
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
173
35-
36 return
executed 1201 times by 6 tests: return index < entries.size();
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
index < entries.size();
executed 1201 times by 6 tests: return index < entries.size();
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
1201
37}-
38-
39QString QResourceFileEngineIterator::currentFileName() const-
40{-
41 if (index <= 0
index <= 0Description
TRUEnever evaluated
FALSEevaluated 1542 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
|| index > entries.size()
index > entries.size()Description
TRUEnever evaluated
FALSEevaluated 1542 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
)
0-1542
42 return
never executed: return QString();
QString();
never executed: return QString();
0
43 return
executed 1542 times by 6 tests: return entries.at(index - 1);
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
entries.at(index - 1);
executed 1542 times by 6 tests: return entries.at(index - 1);
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
1542
44}-
45-
46-
Switch to Source codePreprocessed file

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