qdiriterator.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/io/qdiriterator.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtCore module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40/*!-
41 \since 4.3-
42 \class QDirIterator-
43 \inmodule QtCore-
44 \brief The QDirIterator class provides an iterator for directory entrylists.-
45-
46 You can use QDirIterator to navigate entries of a directory one at a time.-
47 It is similar to QDir::entryList() and QDir::entryInfoList(), but because-
48 it lists entries one at a time instead of all at once, it scales better-
49 and is more suitable for large directories. It also supports listing-
50 directory contents recursively, and following symbolic links. Unlike-
51 QDir::entryList(), QDirIterator does not support sorting.-
52-
53 The QDirIterator constructor takes a QDir or a directory as-
54 argument. After construction, the iterator is located before the first-
55 directory entry. Here's how to iterate over all the entries sequentially:-
56-
57 \snippet code/src_corelib_io_qdiriterator.cpp 0-
58-
59 The next() function returns the path to the next directory entry and-
60 advances the iterator. You can also call filePath() to get the current-
61 file path without advancing the iterator. The fileName() function returns-
62 only the name of the file, similar to how QDir::entryList() works. You can-
63 also call fileInfo() to get a QFileInfo for the current entry.-
64-
65 Unlike Qt's container iterators, QDirIterator is uni-directional (i.e.,-
66 you cannot iterate directories in reverse order) and does not allow random-
67 access.-
68-
69 \sa QDir, QDir::entryList()-
70*/-
71-
72/*! \enum QDirIterator::IteratorFlag-
73-
74 This enum describes flags that you can combine to configure the behavior-
75 of QDirIterator.-
76-
77 \value NoIteratorFlags The default value, representing no flags. The-
78 iterator will return entries for the assigned path.-
79-
80 \value Subdirectories List entries inside all subdirectories as well.-
81-
82 \value FollowSymlinks When combined with Subdirectories, this flag-
83 enables iterating through all subdirectories of the assigned path,-
84 following all symbolic links. Symbolic link loops (e.g., "link" => "." or-
85 "link" => "..") are automatically detected and ignored.-
86*/-
87-
88#include "qdiriterator.h"-
89#include "qdir_p.h"-
90#include "qabstractfileengine_p.h"-
91-
92#include <QtCore/qset.h>-
93#include <QtCore/qstack.h>-
94#include <QtCore/qvariant.h>-
95-
96#include <QtCore/private/qfilesystemiterator_p.h>-
97#include <QtCore/private/qfilesystementry_p.h>-
98#include <QtCore/private/qfilesystemmetadata_p.h>-
99#include <QtCore/private/qfilesystemengine_p.h>-
100#include <QtCore/private/qfileinfo_p.h>-
101-
102QT_BEGIN_NAMESPACE-
103-
104template <class Iterator>-
105class QDirIteratorPrivateIteratorStack : public QStack<Iterator *>-
106{-
107public:-
108 ~QDirIteratorPrivateIteratorStack()-
109 {-
110 qDeleteAll(*this);-
111 }
executed 10310 times by 169 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
10310
112};-
113-
114class QDirIteratorPrivate-
115{-
116public:-
117 QDirIteratorPrivate(const QFileSystemEntry &entry, const QStringList &nameFilters,-
118 QDir::Filters filters, QDirIterator::IteratorFlags flags, bool resolveEngine = true);-
119-
120 void advance();-
121-
122 bool entryMatches(const QString & fileName, const QFileInfo &fileInfo);-
123 void pushDirectory(const QFileInfo &fileInfo);-
124 void checkAndPushDirectory(const QFileInfo &);-
125 bool matchesFilters(const QString &fileName, const QFileInfo &fi) const;-
126-
127 QScopedPointer<QAbstractFileEngine> engine;-
128-
129 QFileSystemEntry dirEntry;-
130 const QStringList nameFilters;-
131 const QDir::Filters filters;-
132 const QDirIterator::IteratorFlags iteratorFlags;-
133-
134#ifndef QT_NO_REGEXP-
135 QVector<QRegExp> nameRegExps;-
136#endif-
137-
138 QDirIteratorPrivateIteratorStack<QAbstractFileEngineIterator> fileEngineIterators;-
139#ifndef QT_NO_FILESYSTEMITERATOR-
140 QDirIteratorPrivateIteratorStack<QFileSystemIterator> nativeIterators;-
141#endif-
142-
143 QFileInfo currentFileInfo;-
144 QFileInfo nextFileInfo;-
145-
146 // Loop protection-
147 QSet<QString> visitedLinks;-
148};-
149-
150/*!-
151 \internal-
152*/-
153QDirIteratorPrivate::QDirIteratorPrivate(const QFileSystemEntry &entry, const QStringList &nameFilters,-
154 QDir::Filters filters, QDirIterator::IteratorFlags flags, bool resolveEngine)-
155 : dirEntry(entry)-
156 , nameFilters(nameFilters.contains(QLatin1String("*")) ? QStringList() : nameFilters)-
157 , filters(QDir::NoFilter == filters ? QDir::AllEntries : filters)-
158 , iteratorFlags(flags)-
159{-
160#ifndef QT_NO_REGEXP-
161 nameRegExps.reserve(nameFilters.size());-
162 for (int i = 0; i < nameFilters.size(); ++i)
i < nameFilters.size()Description
TRUEevaluated 2477 times by 136 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 5155 times by 169 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
2477-5155
163 nameRegExps.append(
executed 2477 times by 136 tests: nameRegExps.append( QRegExp(nameFilters.at(i), (filters & QDir::CaseSensitive) ? Qt::CaseSensitive : Qt::CaseInsensitive, QRegExp::Wildcard));
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
2477
164 QRegExp(nameFilters.at(i),
executed 2477 times by 136 tests: nameRegExps.append( QRegExp(nameFilters.at(i), (filters & QDir::CaseSensitive) ? Qt::CaseSensitive : Qt::CaseInsensitive, QRegExp::Wildcard));
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
2477
165 (filters & QDir::CaseSensitive) ? Qt::CaseSensitive : Qt::CaseInsensitive,
executed 2477 times by 136 tests: nameRegExps.append( QRegExp(nameFilters.at(i), (filters & QDir::CaseSensitive) ? Qt::CaseSensitive : Qt::CaseInsensitive, QRegExp::Wildcard));
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
2477
166 QRegExp::Wildcard));
executed 2477 times by 136 tests: nameRegExps.append( QRegExp(nameFilters.at(i), (filters & QDir::CaseSensitive) ? Qt::CaseSensitive : Qt::CaseInsensitive, QRegExp::Wildcard));
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
2477
167#endif-
168 QFileSystemMetaData metaData;-
169 if (resolveEngine)
resolveEngineDescription
TRUEevaluated 4609 times by 169 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 546 times by 9 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirModel
  • tst_QFileSystemWatcher
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTemporaryDir
  • tst_qmakelib
546-4609
170 engine.reset(QFileSystemEngine::resolveEntryAndCreateLegacyEngine(dirEntry, metaData));
executed 4609 times by 169 tests: engine.reset(QFileSystemEngine::resolveEntryAndCreateLegacyEngine(dirEntry, metaData));
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
4609
171 QFileInfo fileInfo(new QFileInfoPrivate(dirEntry, metaData));-
172-
173 // Populate fields for hasNext() and next()-
174 pushDirectory(fileInfo);-
175 advance();-
176}
executed 5155 times by 169 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
5155
177-
178/*!-
179 \internal-
180*/-
181void QDirIteratorPrivate::pushDirectory(const QFileInfo &fileInfo)-
182{-
183 QString path = fileInfo.filePath();-
184-
185#ifdef Q_OS_WIN-
186 if (fileInfo.isSymLink())-
187 path = fileInfo.canonicalFilePath();-
188#endif-
189-
190 if (iteratorFlags & QDirIterator::FollowSymlinks)
iteratorFlags ...FollowSymlinksDescription
TRUEevaluated 277 times by 4 tests
Evaluated by:
  • tst_QDirIterator
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
FALSEevaluated 7278 times by 169 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
277-7278
191 visitedLinks << fileInfo.canonicalFilePath();
executed 277 times by 4 tests: visitedLinks << fileInfo.canonicalFilePath();
Executed by:
  • tst_QDirIterator
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
277
192-
193 if (engine) {
engineDescription
TRUEevaluated 177 times by 7 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEevaluated 7378 times by 166 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
177-7378
194 engine->setFileName(path);-
195 QAbstractFileEngineIterator *it = engine->beginEntryList(filters, nameFilters);-
196 if (it) {
itDescription
TRUEevaluated 176 times by 7 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDirIterator
1-176
197 it->setPath(path);-
198 fileEngineIterators << it;-
199 } else {
executed 176 times by 7 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
176
200 // No iterator; no entry list.-
201 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QDirIterator
1
202 } else {-
203#ifndef QT_NO_FILESYSTEMITERATOR-
204 QFileSystemIterator *it = new QFileSystemIterator(fileInfo.d_ptr->fileEntry,-
205 filters, nameFilters, iteratorFlags);-
206 nativeIterators << it;-
207#endif-
208 }
executed 7378 times by 166 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
7378
209}-
210-
211inline bool QDirIteratorPrivate::entryMatches(const QString & fileName, const QFileInfo &fileInfo)-
212{-
213 checkAndPushDirectory(fileInfo);-
214-
215 if (matchesFilters(fileName, fileInfo)) {
matchesFilters...ame, fileInfo)Description
TRUEevaluated 47325 times by 159 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 53725 times by 166 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
47325-53725
216 currentFileInfo = nextFileInfo;-
217 nextFileInfo = fileInfo;-
218-
219 //We found a matching entry.-
220 return true;
executed 47325 times by 159 tests: return true;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
47325
221 }-
222-
223 return false;
executed 53725 times by 166 tests: return false;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
53725
224}-
225-
226/*!-
227 \internal-
228*/-
229void QDirIteratorPrivate::advance()-
230{-
231 if (engine) {
engineDescription
TRUEevaluated 493 times by 7 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEevaluated 51970 times by 166 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
493-51970
232 while (!fileEngineIterators.isEmpty()) {
!fileEngineIterators.isEmpty()Description
TRUEevaluated 562 times by 7 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEevaluated 107 times by 7 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
107-562
233 // Find the next valid iterator that matches the filters.-
234 QAbstractFileEngineIterator *it;-
235 while (it = fileEngineIterators.top(), it->hasNext()) {
it = fileEngin... it->hasNext()Description
TRUEevaluated 518 times by 7 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEevaluated 176 times by 7 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
176-518
236 it->next();-
237 if (entryMatches(it->currentFileName(), it->currentFileInfo()))
entryMatches(i...entFileInfo())Description
TRUEevaluated 386 times by 7 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEevaluated 132 times by 3 tests
Evaluated by:
  • tst_QDir
  • tst_QResourceEngine
  • tst_rcc
132-386
238 return;
executed 386 times by 7 tests: return;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
386
239 }
executed 132 times by 3 tests: end of block
Executed by:
  • tst_QDir
  • tst_QResourceEngine
  • tst_rcc
132
240-
241 fileEngineIterators.pop();-
242 delete it;-
243 }
executed 176 times by 7 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
176
244 } else {
executed 107 times by 7 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
107
245#ifndef QT_NO_FILESYSTEMITERATOR-
246 QFileSystemEntry nextEntry;-
247 QFileSystemMetaData nextMetaData;-
248-
249 while (!nativeIterators.isEmpty()) {
!nativeIterators.isEmpty()Description
TRUEevaluated 54299 times by 166 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 5031 times by 161 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
5031-54299
250 // Find the next valid iterator that matches the filters.-
251 QFileSystemIterator *it;-
252 while (it = nativeIterators.top(), it->advance(nextEntry, nextMetaData)) {
it = nativeIte... nextMetaData)Description
TRUEevaluated 100532 times by 165 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 7360 times by 161 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
7360-100532
253 QFileInfo info(new QFileInfoPrivate(nextEntry, nextMetaData));-
254-
255 if (entryMatches(nextEntry.fileName(), info))
entryMatches(n...eName(), info)Description
TRUEevaluated 46939 times by 156 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 53593 times by 165 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
46939-53593
256 return;
executed 46939 times by 156 tests: return;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
46939
257 }
executed 53593 times by 165 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
53593
258-
259 nativeIterators.pop();-
260 delete it;-
261 }
executed 7360 times by 161 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
7360
262#endif-
263 }
executed 5031 times by 161 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
5031
264-
265 currentFileInfo = nextFileInfo;-
266 nextFileInfo = QFileInfo();-
267}
executed 5138 times by 164 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
5138
268-
269/*!-
270 \internal-
271 */-
272void QDirIteratorPrivate::checkAndPushDirectory(const QFileInfo &fileInfo)-
273{-
274 // If we're doing flat iteration, we're done.-
275 if (!(iteratorFlags & QDirIterator::Subdirectories))
!(iteratorFlag...ubdirectories)Description
TRUEevaluated 90650 times by 167 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 10400 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_rcc
10400-90650
276 return;
executed 90650 times by 167 tests: return;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
90650
277-
278 // Never follow non-directory entries-
279 if (!fileInfo.isDir())
!fileInfo.isDir()Description
TRUEevaluated 2928 times by 6 tests
Evaluated by:
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_rcc
FALSEevaluated 7472 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_rcc
2928-7472
280 return;
executed 2928 times by 6 tests: return;
Executed by:
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_rcc
2928
281-
282 // Follow symlinks only when asked-
283 if (!(iteratorFlags & QDirIterator::FollowSymlinks) && fileInfo.isSymLink())
!(iteratorFlag...ollowSymlinks)Description
TRUEevaluated 6939 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_rcc
FALSEevaluated 533 times by 2 tests
Evaluated by:
  • tst_QDirIterator
  • tst_QSslCertificate
fileInfo.isSymLink()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDirIterator
FALSEevaluated 6938 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_rcc
1-6939
284 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_QDirIterator
1
285-
286 // Never follow . and ..-
287 QString fileName = fileInfo.fileName();-
288 if (QLatin1String(".") == fileName || QLatin1String("..") == fileName)
QLatin1String(".") == fileNameDescription
TRUEevaluated 2487 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDirIterator
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSslCertificate
FALSEevaluated 4984 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_rcc
QLatin1String(...") == fileNameDescription
TRUEevaluated 2489 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDirIterator
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSslCertificate
FALSEevaluated 2495 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_rcc
2487-4984
289 return;
executed 4976 times by 5 tests: return;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDirIterator
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSslCertificate
4976
290-
291 // No hidden directories unless requested-
292 if (!(filters & QDir::AllDirs) && !(filters & QDir::Hidden) && fileInfo.isHidden())
!(filters & QDir::AllDirs)Description
TRUEevaluated 767 times by 5 tests
Evaluated by:
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_QSslCertificate
  • tst_rcc
FALSEevaluated 1728 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
!(filters & QDir::Hidden)Description
TRUEevaluated 755 times by 5 tests
Evaluated by:
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_QSslCertificate
  • tst_rcc
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QDirIterator
fileInfo.isHidden()Description
TRUEevaluated 84 times by 2 tests
Evaluated by:
  • tst_QDirIterator
  • tst_QSslCertificate
FALSEevaluated 671 times by 5 tests
Evaluated by:
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_QSslCertificate
  • tst_rcc
12-1728
293 return;
executed 84 times by 2 tests: return;
Executed by:
  • tst_QDirIterator
  • tst_QSslCertificate
84
294-
295 // Stop link loops-
296 if (!visitedLinks.isEmpty() &&
!visitedLinks.isEmpty()Description
TRUEevaluated 127 times by 2 tests
Evaluated by:
  • tst_QDirIterator
  • tst_QSslCertificate
FALSEevaluated 2284 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_rcc
127-2284
297 visitedLinks.contains(fileInfo.canonicalFilePath()))
visitedLinks.c...calFilePath())Description
TRUEevaluated 11 times by 1 test
Evaluated by:
  • tst_QDirIterator
FALSEevaluated 116 times by 2 tests
Evaluated by:
  • tst_QDirIterator
  • tst_QSslCertificate
11-116
298 return;
executed 11 times by 1 test: return;
Executed by:
  • tst_QDirIterator
11
299-
300 pushDirectory(fileInfo);-
301}
executed 2400 times by 7 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_rcc
2400
302-
303/*!-
304 \internal-
305-
306 This convenience function implements the iterator's filtering logics and-
307 applies then to the current directory entry.-
308-
309 It returns \c true if the current entry matches the filters (i.e., the-
310 current entry will be returned as part of the directory iteration);-
311 otherwise, false is returned.-
312*/-
313-
314bool QDirIteratorPrivate::matchesFilters(const QString &fileName, const QFileInfo &fi) const-
315{-
316 Q_ASSERT(!fileName.isEmpty());-
317-
318 // filter . and ..?-
319 const int fileNameSize = fileName.size();-
320 const bool dotOrDotDot = fileName[0] == QLatin1Char('.')
fileName[0] ==...atin1Char('.')Description
TRUEevaluated 16421 times by 165 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 84629 times by 159 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
16421-84629
321 && ((fileNameSize == 1)
(fileNameSize == 1)Description
TRUEevaluated 6901 times by 165 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 9520 times by 165 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
6901-9520
322 ||(fileNameSize == 2 && fileName[1] == QLatin1Char('.')));
fileNameSize == 2Description
TRUEevaluated 7092 times by 165 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 2428 times by 16 tests
Evaluated by:
  • tst_QCompleter
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSharedPointer
  • tst_QSslCertificate
  • tst_QUrl
  • tst_languageChange
  • tst_qfileinfo - unknown status
  • tst_uic
fileName[1] ==...atin1Char('.')Description
TRUEevaluated 6904 times by 165 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 188 times by 1 test
Evaluated by:
  • tst_QFileSystemModel
188-7092
323 if ((filters & QDir::NoDot) && dotOrDotDot && fileNameSize == 1)
dotOrDotDotDescription
TRUEevaluated 11458 times by 55 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QIcon
  • tst_QImageWriter
  • tst_QItemModel
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedPointer
  • tst_QSql
  • tst_QTemporaryDir
  • tst_QXmlStream
  • ...
FALSEevaluated 15863 times by 45 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QIcon
  • tst_QItemModel
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedPointer
  • tst_QSql
  • tst_QTemporaryDir
  • tst_QXmlStream
  • tst_languageChange
  • tst_qfile - unknown status
  • ...
fileNameSize == 1Description
TRUEevaluated 5729 times by 55 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QIcon
  • tst_QImageWriter
  • tst_QItemModel
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedPointer
  • tst_QSql
  • tst_QTemporaryDir
  • tst_QXmlStream
  • ...
FALSEevaluated 5729 times by 55 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QIcon
  • tst_QImageWriter
  • tst_QItemModel
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedPointer
  • tst_QSql
  • tst_QTemporaryDir
  • tst_QXmlStream
  • ...
5729-15863
324 return false;
executed 5729 times by 55 tests: return false;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QIcon
  • tst_QImageWriter
  • tst_QItemModel
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedPointer
  • tst_QSql
  • tst_QTemporaryDir
  • tst_QXmlStream
  • ...
5729
325 if ((filters & QDir::NoDotDot) && dotOrDotDot && fileNameSize == 2)
dotOrDotDotDescription
TRUEevaluated 5734 times by 56 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QIcon
  • tst_QImageWriter
  • tst_QItemModel
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedPointer
  • tst_QSql
  • tst_QTemporaryDir
  • tst_QUrl
  • ...
FALSEevaluated 15876 times by 46 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QIcon
  • tst_QItemModel
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedPointer
  • tst_QSql
  • tst_QTemporaryDir
  • tst_QUrl
  • tst_QXmlStream
  • tst_languageChange
  • ...
fileNameSize == 2Description
TRUEevaluated 5730 times by 56 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QIcon
  • tst_QImageWriter
  • tst_QItemModel
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedPointer
  • tst_QSql
  • tst_QTemporaryDir
  • tst_QUrl
  • ...
FALSEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QDirIterator
  • tst_QFileSystemModel
  • tst_QUrl
4-15876
326 return false;
executed 5730 times by 56 tests: return false;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QIcon
  • tst_QImageWriter
  • tst_QItemModel
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedPointer
  • tst_QSql
  • tst_QTemporaryDir
  • tst_QUrl
  • ...
5730
327-
328 // name filter-
329#ifndef QT_NO_REGEXP-
330 // Pass all entries through name filters, except dirs if the AllDirs-
331 if (!nameFilters.isEmpty() && !((filters & QDir::AllDirs) && fi.isDir())) {
!nameFilters.isEmpty()Description
TRUEevaluated 60150 times by 26 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFileSystemModel
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QPlugin
  • tst_QSslCertificate
  • tst_QSslEllipticCurve
  • tst_QSslError
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpSocket
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • tst_qmakelib
  • tst_rcc
  • ...
FALSEevaluated 29441 times by 148 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
fi.isDir()Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_QFileSystemModel
FALSEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_QFileSystemModel
7-60150
332 bool matched = false;-
333 for (QVector<QRegExp>::const_iterator iter = nameRegExps.constBegin(),-
334 end = nameRegExps.constEnd();-
335 iter != end; ++iter) {
iter != endDescription
TRUEevaluated 98761 times by 26 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFileSystemModel
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QPlugin
  • tst_QSslCertificate
  • tst_QSslEllipticCurve
  • tst_QSslError
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpSocket
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • tst_qmakelib
  • tst_rcc
  • ...
FALSEevaluated 39992 times by 25 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFileSystemModel
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QPlugin
  • tst_QSslCertificate
  • tst_QSslEllipticCurve
  • tst_QSslError
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpSocket
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • tst_qmakelib
  • tst_rcc
  • tst_uic
39992-98761
336-
337 QRegExp copy = *iter;-
338 if (copy.exactMatch(fileName)) {
copy.exactMatch(fileName)Description
TRUEevaluated 20151 times by 25 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileSystemModel
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QPlugin
  • tst_QSslCertificate
  • tst_QSslEllipticCurve
  • tst_QSslError
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpSocket
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • tst_qmakelib
  • tst_rcc
  • tst_uic
FALSEevaluated 78610 times by 25 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFileSystemModel
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QPlugin
  • tst_QSslCertificate
  • tst_QSslEllipticCurve
  • tst_QSslError
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpSocket
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • tst_qmakelib
  • tst_rcc
  • tst_uic
20151-78610
339 matched = true;-
340 break;
executed 20151 times by 25 tests: break;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileSystemModel
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QPlugin
  • tst_QSslCertificate
  • tst_QSslEllipticCurve
  • tst_QSslError
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpSocket
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • tst_qmakelib
  • tst_rcc
  • tst_uic
20151
341 }-
342 }
executed 78610 times by 25 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFileSystemModel
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QPlugin
  • tst_QSslCertificate
  • tst_QSslEllipticCurve
  • tst_QSslError
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpSocket
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • tst_qmakelib
  • tst_rcc
  • tst_uic
78610
343 if (!matched)
!matchedDescription
TRUEevaluated 39992 times by 25 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFileSystemModel
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QPlugin
  • tst_QSslCertificate
  • tst_QSslEllipticCurve
  • tst_QSslError
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpSocket
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • tst_qmakelib
  • tst_rcc
  • tst_uic
FALSEevaluated 20151 times by 25 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileSystemModel
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QPlugin
  • tst_QSslCertificate
  • tst_QSslEllipticCurve
  • tst_QSslError
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpSocket
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • tst_qmakelib
  • tst_rcc
  • tst_uic
20151-39992
344 return false;
executed 39992 times by 25 tests: return false;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFileSystemModel
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QPlugin
  • tst_QSslCertificate
  • tst_QSslEllipticCurve
  • tst_QSslError
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpSocket
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • tst_qmakelib
  • tst_rcc
  • tst_uic
39992
345 }
executed 20151 times by 25 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileSystemModel
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QPlugin
  • tst_QSslCertificate
  • tst_QSslEllipticCurve
  • tst_QSslError
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpSocket
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Spdy
  • tst_qmakelib
  • tst_rcc
  • tst_uic
20151
346#endif-
347 // skip symlinks-
348 const bool skipSymlinks = (filters & QDir::NoSymLinks);-
349 const bool includeSystem = (filters & QDir::System);-
350 if(skipSymlinks && fi.isSymLink()) {
skipSymlinksDescription
TRUEevaluated 90 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_QFileSystemWatcher
FALSEevaluated 49509 times by 159 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
fi.isSymLink()Description
TRUEevaluated 17 times by 1 test
Evaluated by:
  • tst_QDir
FALSEevaluated 73 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_QFileSystemWatcher
17-49509
351 // The only reason to save this file is if it is a broken link and we are requesting system files.-
352 if(!includeSystem || fi.exists())
!includeSystemDescription
TRUEevaluated 17 times by 1 test
Evaluated by:
  • tst_QDir
FALSEnever evaluated
fi.exists()Description
TRUEnever evaluated
FALSEnever evaluated
0-17
353 return false;
executed 17 times by 1 test: return false;
Executed by:
  • tst_QDir
17
354 }
never executed: end of block
0
355-
356 // filter hidden-
357 const bool includeHidden = (filters & QDir::Hidden);-
358 if (!includeHidden && !dotOrDotDot && fi.isHidden())
!includeHiddenDescription
TRUEevaluated 38150 times by 139 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 11432 times by 46 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QItemModel
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedPointer
  • tst_QSql
  • tst_QTemporaryDir
  • tst_QXmlStream
  • tst_languageChange
  • ...
!dotOrDotDotDescription
TRUEevaluated 37203 times by 138 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 947 times by 121 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • ...
fi.isHidden()Description
TRUEevaluated 831 times by 8 tests
Evaluated by:
  • tst_QCompleter
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QSslCertificate
  • tst_QUrl
FALSEevaluated 36372 times by 138 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
831-38150
359 return false;
executed 831 times by 8 tests: return false;
Executed by:
  • tst_QCompleter
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QSslCertificate
  • tst_QUrl
831
360-
361 // filter system files-
362 if (!includeSystem && (!(fi.isFile() || fi.isDir() || fi.isSymLink())
!includeSystemDescription
TRUEevaluated 38162 times by 139 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 10589 times by 44 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QItemModel
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedPointer
  • tst_QSql
  • tst_QTemporaryDir
  • tst_QXmlStream
  • tst_languageChange
  • tst_qfile - unknown status
  • tst_qfileinfo - unknown status
  • ...
fi.isFile()Description
TRUEevaluated 29407 times by 137 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFile
  • ...
FALSEevaluated 8755 times by 127 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
fi.isDir()Description
TRUEevaluated 8271 times by 127 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 484 times by 5 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QItemModel
  • tst_rcc
fi.isSymLink()Description
TRUEevaluated 306 times by 4 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QItemModel
FALSEevaluated 178 times by 2 tests
Evaluated by:
  • tst_QItemModel
  • tst_rcc
178-38162
363 || (!fi.exists() && fi.isSymLink())))
!fi.exists()Description
TRUEevaluated 129 times by 3 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
FALSEevaluated 37855 times by 139 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
fi.isSymLink()Description
TRUEevaluated 129 times by 3 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
FALSEnever evaluated
0-37855
364 return false;
executed 307 times by 5 tests: return false;
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QItemModel
  • tst_rcc
307
365-
366 // skip directories-
367 const bool skipDirs = !(filters & (QDir::Dirs | QDir::AllDirs));-
368 if (skipDirs && fi.isDir())
skipDirsDescription
TRUEevaluated 6448 times by 130 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
FALSEevaluated 41996 times by 55 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QItemModel
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedPointer
  • tst_QSql
  • ...
fi.isDir()Description
TRUEevaluated 1000 times by 119 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
FALSEevaluated 5448 times by 130 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
1000-41996
369 return false;
executed 1000 times by 119 tests: return false;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
1000
370-
371 // skip files-
372 const bool skipFiles = !(filters & QDir::Files);-
373 if (skipFiles && fi.isFile())
skipFilesDescription
TRUEevaluated 499 times by 6 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QResourceEngine
FALSEevaluated 46945 times by 158 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFile
  • ...
fi.isFile()Description
TRUEevaluated 117 times by 5 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QResourceEngine
FALSEevaluated 382 times by 6 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QResourceEngine
117-46945
374 // Basically we need a reason not to exclude this file otherwise we just eliminate it.-
375 return false;
executed 117 times by 5 tests: return false;
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QResourceEngine
117
376-
377 // filter permissions-
378 const bool filterPermissions = ((filters & QDir::PermissionMask)-
379 && (filters & QDir::PermissionMask) != QDir::PermissionMask);
(filters & QDi...PermissionMaskDescription
TRUEevaluated 109 times by 3 tests
Evaluated by:
  • tst_QDir
  • tst_QSslCertificate
  • tst_QSslKey
FALSEnever evaluated
0-109
380 const bool doWritable = !filterPermissions || (filters & QDir::Writable);
!filterPermissionsDescription
TRUEevaluated 47218 times by 158 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 109 times by 3 tests
Evaluated by:
  • tst_QDir
  • tst_QSslCertificate
  • tst_QSslKey
109-47218
381 const bool doExecutable = !filterPermissions || (filters & QDir::Executable);
!filterPermissionsDescription
TRUEevaluated 47218 times by 158 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 109 times by 3 tests
Evaluated by:
  • tst_QDir
  • tst_QSslCertificate
  • tst_QSslKey
109-47218
382 const bool doReadable = !filterPermissions || (filters & QDir::Readable);
!filterPermissionsDescription
TRUEevaluated 47218 times by 158 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
FALSEevaluated 109 times by 3 tests
Evaluated by:
  • tst_QDir
  • tst_QSslCertificate
  • tst_QSslKey
109-47218
383 if (filterPermissions
filterPermissionsDescription
TRUEevaluated 109 times by 3 tests
Evaluated by:
  • tst_QDir
  • tst_QSslCertificate
  • tst_QSslKey
FALSEevaluated 47218 times by 158 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
109-47218
384 && ((doReadable && !fi.isReadable())
doReadableDescription
TRUEevaluated 102 times by 3 tests
Evaluated by:
  • tst_QDir
  • tst_QSslCertificate
  • tst_QSslKey
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_QDir
!fi.isReadable()Description
TRUEnever evaluated
FALSEevaluated 102 times by 3 tests
Evaluated by:
  • tst_QDir
  • tst_QSslCertificate
  • tst_QSslKey
0-102
385 || (doWritable && !fi.isWritable())
doWritableDescription
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_QDir
FALSEevaluated 102 times by 3 tests
Evaluated by:
  • tst_QDir
  • tst_QSslCertificate
  • tst_QSslKey
!fi.isWritable()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDir
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_QDir
2-102
386 || (doExecutable && !fi.isExecutable()))) {
doExecutableDescription
TRUEnever evaluated
FALSEevaluated 107 times by 3 tests
Evaluated by:
  • tst_QDir
  • tst_QSslCertificate
  • tst_QSslKey
!fi.isExecutable()Description
TRUEnever evaluated
FALSEnever evaluated
0-107
387 return false;
executed 2 times by 1 test: return false;
Executed by:
  • tst_QDir
2
388 }-
389-
390 return true;
executed 47325 times by 159 tests: return true;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
47325
391}-
392-
393/*!-
394 Constructs a QDirIterator that can iterate over \a dir's entrylist, using-
395 \a dir's name filters and regular filters. You can pass options via \a-
396 flags to decide how the directory should be iterated.-
397-
398 By default, \a flags is NoIteratorFlags, which provides the same behavior-
399 as in QDir::entryList().-
400-
401 The sorting in \a dir is ignored.-
402-
403 \note To list symlinks that point to non existing files, QDir::System must be-
404 passed to the flags.-
405-
406 \sa hasNext(), next(), IteratorFlags-
407*/-
408QDirIterator::QDirIterator(const QDir &dir, IteratorFlags flags)-
409{-
410 const QDirPrivate *other = dir.d_ptr.constData();-
411 d.reset(new QDirIteratorPrivate(other->dirEntry, other->nameFilters, other->filters, flags, !other->fileEngine.isNull()));-
412}
executed 552 times by 10 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFileSystemWatcher
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTemporaryDir
  • tst_qmakelib
552
413-
414/*!-
415 Constructs a QDirIterator that can iterate over \a path, with no name-
416 filtering and \a filters for entry filtering. You can pass options via \a-
417 flags to decide how the directory should be iterated.-
418-
419 By default, \a filters is QDir::NoFilter, and \a flags is NoIteratorFlags,-
420 which provides the same behavior as in QDir::entryList().-
421-
422 \note To list symlinks that point to non existing files, QDir::System must be-
423 passed to the flags.-
424-
425 \sa hasNext(), next(), IteratorFlags-
426*/-
427QDirIterator::QDirIterator(const QString &path, QDir::Filters filters, IteratorFlags flags)-
428 : d(new QDirIteratorPrivate(QFileSystemEntry(path), QStringList(), filters, flags))-
429{-
430}
executed 3160 times by 61 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageWriter
  • tst_QItemModel
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedPointer
  • tst_QSql
  • tst_QSslCertificate
  • tst_QSslSocket
  • ...
3160
431-
432/*!-
433 Constructs a QDirIterator that can iterate over \a path. You can pass-
434 options via \a flags to decide how the directory should be iterated.-
435-
436 By default, \a flags is NoIteratorFlags, which provides the same behavior-
437 as in QDir::entryList().-
438-
439 \note To list symlinks that point to non existing files, QDir::System must be-
440 passed to the flags.-
441-
442 \sa hasNext(), next(), IteratorFlags-
443*/-
444QDirIterator::QDirIterator(const QString &path, IteratorFlags flags)-
445 : d(new QDirIteratorPrivate(QFileSystemEntry(path), QStringList(), QDir::NoFilter, flags))-
446{-
447}
executed 5 times by 3 tests: end of block
Executed by:
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QUrl
5
448-
449/*!-
450 Constructs a QDirIterator that can iterate over \a path, using \a-
451 nameFilters and \a filters. You can pass options via \a flags to decide-
452 how the directory should be iterated.-
453-
454 By default, \a flags is NoIteratorFlags, which provides the same behavior-
455 as QDir::entryList().-
456-
457 \note To list symlinks that point to non existing files, QDir::System must be-
458 passed to the flags.-
459-
460 \sa hasNext(), next(), IteratorFlags-
461*/-
462QDirIterator::QDirIterator(const QString &path, const QStringList &nameFilters,-
463 QDir::Filters filters, IteratorFlags flags)-
464 : d(new QDirIteratorPrivate(QFileSystemEntry(path), nameFilters, filters, flags))-
465{-
466}
executed 1438 times by 134 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFile
  • ...
1438
467-
468/*!-
469 Destroys the QDirIterator.-
470*/-
471QDirIterator::~QDirIterator()-
472{-
473}-
474-
475/*!-
476 Advances the iterator to the next entry, and returns the file path of this-
477 new entry. If hasNext() returns \c false, this function does nothing, and-
478 returns an empty QString.-
479-
480 You can call fileName() or filePath() to get the current entry file name-
481 or path, or fileInfo() to get a QFileInfo for the current entry.-
482-
483 \sa hasNext(), fileName(), filePath(), fileInfo()-
484*/-
485QString QDirIterator::next()-
486{-
487 d->advance();-
488 return filePath();
executed 47308 times by 154 tests: return filePath();
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
47308
489}-
490-
491/*!-
492 Returns \c true if there is at least one more entry in the directory;-
493 otherwise, false is returned.-
494-
495 \sa next(), fileName(), filePath(), fileInfo()-
496*/-
497bool QDirIterator::hasNext() const-
498{-
499 if (d->engine)
d->engineDescription
TRUEevaluated 494 times by 7 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEevaluated 51968 times by 166 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
494-51968
500 return !d->fileEngineIterators.isEmpty();
executed 494 times by 7 tests: return !d->fileEngineIterators.isEmpty();
Executed by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
494
501 else-
502#ifndef QT_NO_FILESYSTEMITERATOR-
503 return !d->nativeIterators.isEmpty();
executed 51968 times by 166 tests: return !d->nativeIterators.isEmpty();
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
51968
504#else-
505 return false;-
506#endif-
507}-
508-
509/*!-
510 Returns the file name for the current directory entry, without the path-
511 prepended.-
512-
513 This function is convenient when iterating a single directory. When using-
514 the QDirIterator::Subdirectories flag, you can use filePath() to get the-
515 full path.-
516-
517 \sa filePath(), fileInfo()-
518*/-
519QString QDirIterator::fileName() const-
520{-
521 return d->currentFileInfo.fileName();
executed 64 times by 2 tests: return d->currentFileInfo.fileName();
Executed by:
  • tst_QDirIterator
  • tst_QUrl
64
522}-
523-
524/*!-
525 Returns the full file path for the current directory entry.-
526-
527 \sa fileInfo(), fileName()-
528*/-
529QString QDirIterator::filePath() const-
530{-
531 return d->currentFileInfo.filePath();
executed 50745 times by 154 tests: return d->currentFileInfo.filePath();
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
50745
532}-
533-
534/*!-
535 Returns a QFileInfo for the current directory entry.-
536-
537 \sa filePath(), fileName()-
538*/-
539QFileInfo QDirIterator::fileInfo() const-
540{-
541 return d->currentFileInfo;
executed 43994 times by 153 tests: return d->currentFileInfo;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • ...
43994
542}-
543-
544/*!-
545 Returns the base directory of the iterator.-
546*/-
547QString QDirIterator::path() const-
548{-
549 return d->dirEntry.filePath();
executed 44 times by 1 test: return d->dirEntry.filePath();
Executed by:
  • tst_QDirIterator
44
550}-
551-
552QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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