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

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