Line | Source Code | Coverage |
---|
1 | | - |
2 | | - |
3 | | - |
4 | QString QFileInfoPrivate::getFileName(QAbstractFileEngine::FileName name) const | - |
5 | { | - |
6 | if (cache_enabled && !fileNames[(int)name].isNull()) partially evaluated: cache_enabled yes Evaluation Count:11805 | no Evaluation Count:0 |
evaluated: !fileNames[(int)name].isNull() yes Evaluation Count:612 | yes Evaluation Count:11193 |
| 0-11805 |
7 | return fileNames[(int)name]; executed: return fileNames[(int)name]; Execution Count:612 | 612 |
8 | | - |
9 | QString ret; | - |
10 | if (fileEngine == 0) { evaluated: fileEngine == 0 yes Evaluation Count:9539 | yes Evaluation Count:1654 |
| 1654-9539 |
11 | switch (name) { | - |
12 | case QAbstractFileEngine::CanonicalName: | - |
13 | case QAbstractFileEngine::CanonicalPathName: { | - |
14 | QFileSystemEntry entry = QFileSystemEngine::canonicalName(fileEntry, metaData); | - |
15 | if (cache_enabled) { partially evaluated: cache_enabled yes Evaluation Count:1635 | no Evaluation Count:0 |
| 0-1635 |
16 | fileNames[QAbstractFileEngine::CanonicalName] = entry.filePath(); | - |
17 | fileNames[QAbstractFileEngine::CanonicalPathName] = entry.path(); | - |
18 | } executed: } Execution Count:1635 | 1635 |
19 | if (name == QAbstractFileEngine::CanonicalName) partially evaluated: name == QAbstractFileEngine::CanonicalName yes Evaluation Count:1635 | no Evaluation Count:0 |
| 0-1635 |
20 | ret = entry.filePath(); executed: ret = entry.filePath(); Execution Count:1635 | 1635 |
21 | else | - |
22 | ret = entry.path(); never executed: ret = entry.path(); | 0 |
23 | break; executed: break; Execution Count:1635 | 1635 |
24 | } | - |
25 | case QAbstractFileEngine::LinkName: | - |
26 | ret = QFileSystemEngine::getLinkTarget(fileEntry, metaData).filePath(); | - |
27 | break; executed: break; Execution Count:8 | 8 |
28 | case QAbstractFileEngine::BundleName: | - |
29 | ret = QFileSystemEngine::bundleName(fileEntry); | - |
30 | break; | 0 |
31 | case QAbstractFileEngine::AbsoluteName: | - |
32 | case QAbstractFileEngine::AbsolutePathName: { | - |
33 | QFileSystemEntry entry = QFileSystemEngine::absoluteName(fileEntry); | - |
34 | if (cache_enabled) { partially evaluated: cache_enabled yes Evaluation Count:7896 | no Evaluation Count:0 |
| 0-7896 |
35 | fileNames[QAbstractFileEngine::AbsoluteName] = entry.filePath(); | - |
36 | fileNames[QAbstractFileEngine::AbsolutePathName] = entry.path(); | - |
37 | } executed: } Execution Count:7896 | 7896 |
38 | if (name == QAbstractFileEngine::AbsoluteName) evaluated: name == QAbstractFileEngine::AbsoluteName yes Evaluation Count:7447 | yes Evaluation Count:449 |
| 449-7447 |
39 | ret = entry.filePath(); executed: ret = entry.filePath(); Execution Count:7447 | 7447 |
40 | else | - |
41 | ret = entry.path(); executed: ret = entry.path(); Execution Count:449 | 449 |
42 | break; executed: break; Execution Count:7896 | 7896 |
43 | } | - |
44 | default: break; | 0 |
45 | } | - |
46 | } else { executed: } Execution Count:9539 | 9539 |
47 | ret = fileEngine->fileName(name); | - |
48 | } executed: } Execution Count:1654 | 1654 |
49 | if (ret.isNull()) evaluated: ret.isNull() yes Evaluation Count:10 | yes Evaluation Count:11183 |
| 10-11183 |
50 | ret = QLatin1String(""); executed: ret = QLatin1String(""); Execution Count:10 | 10 |
51 | if (cache_enabled) partially evaluated: cache_enabled yes Evaluation Count:11193 | no Evaluation Count:0 |
| 0-11193 |
52 | fileNames[(int)name] = ret; executed: fileNames[(int)name] = ret; Execution Count:11193 | 11193 |
53 | return ret; executed: return ret; Execution Count:11193 | 11193 |
54 | } | - |
55 | | - |
56 | QString QFileInfoPrivate::getFileOwner(QAbstractFileEngine::FileOwner own) const | - |
57 | { | - |
58 | if (cache_enabled && !fileOwners[(int)own].isNull()) never evaluated: cache_enabled never evaluated: !fileOwners[(int)own].isNull() | 0 |
59 | return fileOwners[(int)own]; never executed: return fileOwners[(int)own]; | 0 |
60 | QString ret; | - |
61 | if (fileEngine == 0) { never evaluated: fileEngine == 0 | 0 |
62 | switch (own) { | - |
63 | case QAbstractFileEngine::OwnerUser: | - |
64 | ret = QFileSystemEngine::resolveUserName(fileEntry, metaData); | - |
65 | break; | 0 |
66 | case QAbstractFileEngine::OwnerGroup: | - |
67 | ret = QFileSystemEngine::resolveGroupName(fileEntry, metaData); | - |
68 | break; | 0 |
69 | } | - |
70 | } else { | 0 |
71 | ret = fileEngine->owner(own); | - |
72 | } | 0 |
73 | if (ret.isNull()) never evaluated: ret.isNull() | 0 |
74 | ret = QLatin1String(""); never executed: ret = QLatin1String(""); | 0 |
75 | if (cache_enabled) never evaluated: cache_enabled | 0 |
76 | fileOwners[(int)own] = ret; never executed: fileOwners[(int)own] = ret; | 0 |
77 | return ret; never executed: return ret; | 0 |
78 | } | - |
79 | | - |
80 | uint QFileInfoPrivate::getFileFlags(QAbstractFileEngine::FileFlags request) const | - |
81 | { | - |
82 | qt_noop(); | - |
83 | QAbstractFileEngine::FileFlags req = 0; | - |
84 | uint cachedFlags = 0; | - |
85 | | - |
86 | if (request & (QAbstractFileEngine::FlagsMask | QAbstractFileEngine::TypesMask)) { evaluated: request & (QAbstractFileEngine::FlagsMask | QAbstractFileEngine::TypesMask) yes Evaluation Count:3156 | yes Evaluation Count:4 |
| 4-3156 |
87 | if (!getCachedFlag(CachedFileFlags)) { evaluated: !getCachedFlag(CachedFileFlags) yes Evaluation Count:2771 | yes Evaluation Count:385 |
| 385-2771 |
88 | req |= QAbstractFileEngine::FlagsMask; | - |
89 | req |= QAbstractFileEngine::TypesMask; | - |
90 | req &= (~QAbstractFileEngine::LinkType); | - |
91 | req &= (~QAbstractFileEngine::BundleType); | - |
92 | | - |
93 | cachedFlags |= CachedFileFlags; | - |
94 | } executed: } Execution Count:2771 | 2771 |
95 | | - |
96 | if (request & QAbstractFileEngine::LinkType) { evaluated: request & QAbstractFileEngine::LinkType yes Evaluation Count:4 | yes Evaluation Count:3152 |
| 4-3152 |
97 | if (!getCachedFlag(CachedLinkTypeFlag)) { partially evaluated: !getCachedFlag(CachedLinkTypeFlag) yes Evaluation Count:4 | no Evaluation Count:0 |
| 0-4 |
98 | req |= QAbstractFileEngine::LinkType; | - |
99 | cachedFlags |= CachedLinkTypeFlag; | - |
100 | } executed: } Execution Count:4 | 4 |
101 | } executed: } Execution Count:4 | 4 |
102 | | - |
103 | if (request & QAbstractFileEngine::BundleType) { partially evaluated: request & QAbstractFileEngine::BundleType no Evaluation Count:0 | yes Evaluation Count:3156 |
| 0-3156 |
104 | if (!getCachedFlag(CachedBundleTypeFlag)) { never evaluated: !getCachedFlag(CachedBundleTypeFlag) | 0 |
105 | req |= QAbstractFileEngine::BundleType; | - |
106 | cachedFlags |= CachedBundleTypeFlag; | - |
107 | } | 0 |
108 | } | 0 |
109 | } executed: } Execution Count:3156 | 3156 |
110 | | - |
111 | if (request & QAbstractFileEngine::PermsMask) { evaluated: request & QAbstractFileEngine::PermsMask yes Evaluation Count:4 | yes Evaluation Count:3156 |
| 4-3156 |
112 | if (!getCachedFlag(CachedPerms)) { partially evaluated: !getCachedFlag(CachedPerms) yes Evaluation Count:4 | no Evaluation Count:0 |
| 0-4 |
113 | req |= QAbstractFileEngine::PermsMask; | - |
114 | cachedFlags |= CachedPerms; | - |
115 | } executed: } Execution Count:4 | 4 |
116 | } executed: } Execution Count:4 | 4 |
117 | | - |
118 | if (req) { evaluated: req yes Evaluation Count:2779 | yes Evaluation Count:381 |
| 381-2779 |
119 | if (cache_enabled) partially evaluated: cache_enabled yes Evaluation Count:2779 | no Evaluation Count:0 |
| 0-2779 |
120 | req &= (~QAbstractFileEngine::Refresh); executed: req &= (~QAbstractFileEngine::Refresh); Execution Count:2779 | 2779 |
121 | else | - |
122 | req |= QAbstractFileEngine::Refresh; never executed: req |= QAbstractFileEngine::Refresh; | 0 |
123 | | - |
124 | QAbstractFileEngine::FileFlags flags = fileEngine->fileFlags(req); | - |
125 | fileFlags |= uint(flags); | - |
126 | setCachedFlag(cachedFlags); | - |
127 | } executed: } Execution Count:2779 | 2779 |
128 | | - |
129 | return fileFlags & request; executed: return fileFlags & request; Execution Count:3160 | 3160 |
130 | } | - |
131 | | - |
132 | QDateTime &QFileInfoPrivate::getFileTime(QAbstractFileEngine::FileTime request) const | - |
133 | { | - |
134 | qt_noop(); | - |
135 | if (!cache_enabled) partially evaluated: !cache_enabled no Evaluation Count:0 | yes Evaluation Count:1658 |
| 0-1658 |
136 | clearFlags(); never executed: clearFlags(); | 0 |
137 | uint cf; | - |
138 | if (request == QAbstractFileEngine::CreationTime) partially evaluated: request == QAbstractFileEngine::CreationTime no Evaluation Count:0 | yes Evaluation Count:1658 |
| 0-1658 |
139 | cf = CachedCTime; never executed: cf = CachedCTime; | 0 |
140 | else if (request == QAbstractFileEngine::ModificationTime) partially evaluated: request == QAbstractFileEngine::ModificationTime yes Evaluation Count:1658 | no Evaluation Count:0 |
| 0-1658 |
141 | cf = CachedMTime; executed: cf = CachedMTime; Execution Count:1658 | 1658 |
142 | else | - |
143 | cf = CachedATime; never executed: cf = CachedATime; | 0 |
144 | if (!getCachedFlag(cf)) { partially evaluated: !getCachedFlag(cf) yes Evaluation Count:1658 | no Evaluation Count:0 |
| 0-1658 |
145 | fileTimes[request] = fileEngine->fileTime(request); | - |
146 | setCachedFlag(cf); | - |
147 | } executed: } Execution Count:1658 | 1658 |
148 | return fileTimes[request]; executed: return fileTimes[request]; Execution Count:1658 | 1658 |
149 | } | - |
150 | QFileInfo::QFileInfo(QFileInfoPrivate *p) : d_ptr(p) | - |
151 | { | - |
152 | } executed: } Execution Count:90608 | 90608 |
153 | QFileInfo::QFileInfo() : d_ptr(new QFileInfoPrivate()) | - |
154 | { | - |
155 | } executed: } Execution Count:37406 | 37406 |
156 | | - |
157 | | - |
158 | | - |
159 | | - |
160 | | - |
161 | | - |
162 | | - |
163 | QFileInfo::QFileInfo(const QString &file) : d_ptr(new QFileInfoPrivate(file)) | - |
164 | { | - |
165 | } executed: } Execution Count:31703 | 31703 |
166 | QFileInfo::QFileInfo(const QFile &file) : d_ptr(new QFileInfoPrivate(file.fileName())) | - |
167 | { | - |
168 | } executed: } Execution Count:155 | 155 |
169 | QFileInfo::QFileInfo(const QDir &dir, const QString &file) | - |
170 | : d_ptr(new QFileInfoPrivate(dir.filePath(file))) | - |
171 | { | - |
172 | } executed: } Execution Count:223 | 223 |
173 | | - |
174 | | - |
175 | | - |
176 | | - |
177 | QFileInfo::QFileInfo(const QFileInfo &fileinfo) | - |
178 | : d_ptr(fileinfo.d_ptr) | - |
179 | { | - |
180 | | - |
181 | } executed: } Execution Count:354145 | 354145 |
182 | | - |
183 | | - |
184 | | - |
185 | | - |
186 | | - |
187 | QFileInfo::~QFileInfo() | - |
188 | { | - |
189 | } | - |
190 | bool QFileInfo::operator==(const QFileInfo &fileinfo) const | - |
191 | { | - |
192 | const QFileInfoPrivate * const d = d_func(); | - |
193 | | - |
194 | | - |
195 | if (fileinfo.d_ptr == d_ptr) evaluated: fileinfo.d_ptr == d_ptr yes Evaluation Count:21930 | yes Evaluation Count:4078 |
| 4078-21930 |
196 | return true; executed: return true; Execution Count:21930 | 21930 |
197 | if (d->isDefaultConstructed || fileinfo.d_ptr->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:4078 |
partially evaluated: fileinfo.d_ptr->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:4078 |
| 0-4078 |
198 | return false; never executed: return false; | 0 |
199 | | - |
200 | | - |
201 | if (d->fileEntry.filePath() == fileinfo.d_ptr->fileEntry.filePath()) evaluated: d->fileEntry.filePath() == fileinfo.d_ptr->fileEntry.filePath() yes Evaluation Count:4044 | yes Evaluation Count:34 |
| 34-4044 |
202 | return true; executed: return true; Execution Count:4044 | 4044 |
203 | | - |
204 | Qt::CaseSensitivity sensitive; | - |
205 | if (d->fileEngine == 0 || fileinfo.d_ptr->fileEngine == 0) { partially evaluated: d->fileEngine == 0 yes Evaluation Count:34 | no Evaluation Count:0 |
never evaluated: fileinfo.d_ptr->fileEngine == 0 | 0-34 |
206 | if (d->fileEngine != fileinfo.d_ptr->fileEngine) partially evaluated: d->fileEngine != fileinfo.d_ptr->fileEngine no Evaluation Count:0 | yes Evaluation Count:34 |
| 0-34 |
207 | return false; never executed: return false; | 0 |
208 | | - |
209 | sensitive = QFileSystemEngine::isCaseSensitive() ? Qt::CaseSensitive : Qt::CaseInsensitive; partially evaluated: QFileSystemEngine::isCaseSensitive() yes Evaluation Count:34 | no Evaluation Count:0 |
| 0-34 |
210 | } else { executed: } Execution Count:34 | 34 |
211 | if (d->fileEngine->caseSensitive() != fileinfo.d_ptr->fileEngine->caseSensitive()) never evaluated: d->fileEngine->caseSensitive() != fileinfo.d_ptr->fileEngine->caseSensitive() | 0 |
212 | return false; never executed: return false; | 0 |
213 | sensitive = d->fileEngine->caseSensitive() ? Qt::CaseSensitive : Qt::CaseInsensitive; never evaluated: d->fileEngine->caseSensitive() | 0 |
214 | } | 0 |
215 | | - |
216 | | - |
217 | return canonicalFilePath().compare(fileinfo.canonicalFilePath(), sensitive) == 0; executed: return canonicalFilePath().compare(fileinfo.canonicalFilePath(), sensitive) == 0; Execution Count:34 | 34 |
218 | } | - |
219 | | - |
220 | | - |
221 | | - |
222 | | - |
223 | QFileInfo &QFileInfo::operator=(const QFileInfo &fileinfo) | - |
224 | { | - |
225 | d_ptr = fileinfo.d_ptr; | - |
226 | return *this; executed: return *this; Execution Count:284679 | 284679 |
227 | } | - |
228 | void QFileInfo::setFile(const QString &file) | - |
229 | { | - |
230 | bool caching = d_ptr.constData()->cache_enabled; | - |
231 | *this = QFileInfo(file); | - |
232 | d_ptr->cache_enabled = caching; | - |
233 | } executed: } Execution Count:321 | 321 |
234 | void QFileInfo::setFile(const QFile &file) | - |
235 | { | - |
236 | setFile(file.fileName()); | - |
237 | } | 0 |
238 | void QFileInfo::setFile(const QDir &dir, const QString &file) | - |
239 | { | - |
240 | setFile(dir.filePath(file)); | - |
241 | } | 0 |
242 | QString QFileInfo::absoluteFilePath() const | - |
243 | { | - |
244 | const QFileInfoPrivate * const d = d_func(); | - |
245 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:9581 |
| 0-9581 |
246 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
247 | return d->getFileName(QAbstractFileEngine::AbsoluteName); executed: return d->getFileName(QAbstractFileEngine::AbsoluteName); Execution Count:9581 | 9581 |
248 | } | - |
249 | QString QFileInfo::canonicalFilePath() const | - |
250 | { | - |
251 | const QFileInfoPrivate * const d = d_func(); | - |
252 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:1764 |
| 0-1764 |
253 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
254 | return d->getFileName(QAbstractFileEngine::CanonicalName); executed: return d->getFileName(QAbstractFileEngine::CanonicalName); Execution Count:1764 | 1764 |
255 | } | - |
256 | QString QFileInfo::absolutePath() const | - |
257 | { | - |
258 | const QFileInfoPrivate * const d = d_func(); | - |
259 | | - |
260 | if (d->isDefaultConstructed) { partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:452 |
| 0-452 |
261 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
262 | } else if (d->fileEntry.isEmpty()) { partially evaluated: d->fileEntry.isEmpty() no Evaluation Count:0 | yes Evaluation Count:452 |
| 0-452 |
263 | QMessageLogger("io/qfileinfo.cpp", 566, __PRETTY_FUNCTION__).warning("QFileInfo::absolutePath: Constructed with empty filename"); | - |
264 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
265 | } | - |
266 | return d->getFileName(QAbstractFileEngine::AbsolutePathName); executed: return d->getFileName(QAbstractFileEngine::AbsolutePathName); Execution Count:452 | 452 |
267 | } | - |
268 | QString QFileInfo::canonicalPath() const | - |
269 | { | - |
270 | const QFileInfoPrivate * const d = d_func(); | - |
271 | if (d->isDefaultConstructed) never evaluated: d->isDefaultConstructed | 0 |
272 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
273 | return d->getFileName(QAbstractFileEngine::CanonicalPathName); never executed: return d->getFileName(QAbstractFileEngine::CanonicalPathName); | 0 |
274 | } | - |
275 | QString QFileInfo::path() const | - |
276 | { | - |
277 | const QFileInfoPrivate * const d = d_func(); | - |
278 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:246 |
| 0-246 |
279 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
280 | return d->fileEntry.path(); executed: return d->fileEntry.path(); Execution Count:246 | 246 |
281 | } | - |
282 | bool QFileInfo::isRelative() const | - |
283 | { | - |
284 | const QFileInfoPrivate * const d = d_func(); | - |
285 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:8198 |
| 0-8198 |
286 | return true; never executed: return true; | 0 |
287 | if (d->fileEngine == 0) evaluated: d->fileEngine == 0 yes Evaluation Count:8186 | yes Evaluation Count:12 |
| 12-8186 |
288 | return d->fileEntry.isRelative(); executed: return d->fileEntry.isRelative(); Execution Count:8186 | 8186 |
289 | return d->fileEngine->isRelativePath(); executed: return d->fileEngine->isRelativePath(); Execution Count:12 | 12 |
290 | } | - |
291 | bool QFileInfo::makeAbsolute() | - |
292 | { | - |
293 | if (d_ptr.constData()->isDefaultConstructed never evaluated: d_ptr.constData()->isDefaultConstructed | 0 |
294 | || !d_ptr.constData()->fileEntry.isRelative()) never evaluated: !d_ptr.constData()->fileEntry.isRelative() | 0 |
295 | return false; never executed: return false; | 0 |
296 | | - |
297 | setFile(absoluteFilePath()); | - |
298 | return true; never executed: return true; | 0 |
299 | } | - |
300 | | - |
301 | | - |
302 | | - |
303 | | - |
304 | | - |
305 | | - |
306 | | - |
307 | bool QFileInfo::exists() const | - |
308 | { | - |
309 | const QFileInfoPrivate * const d = d_func(); | - |
310 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:149183 |
| 0-149183 |
311 | return false; never executed: return false; | 0 |
312 | if (d->fileEngine == 0) { evaluated: d->fileEngine == 0 yes Evaluation Count:146419 | yes Evaluation Count:2764 |
| 2764-146419 |
313 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::ExistsAttribute)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:146419 |
evaluated: !d->metaData.hasFlags(QFileSystemMetaData::ExistsAttribute) yes Evaluation Count:6321 | yes Evaluation Count:140098 |
| 0-146419 |
314 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::ExistsAttribute); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::ExistsAttribute); Execution Count:6321 | 6321 |
315 | return d->metaData.exists(); executed: return d->metaData.exists(); Execution Count:146419 | 146419 |
316 | } | - |
317 | return d->getFileFlags(QAbstractFileEngine::ExistsFlag); executed: return d->getFileFlags(QAbstractFileEngine::ExistsFlag); Execution Count:2764 | 2764 |
318 | } | - |
319 | void QFileInfo::refresh() | - |
320 | { | - |
321 | QFileInfoPrivate * const d = d_func(); | - |
322 | d->clear(); | - |
323 | } executed: } Execution Count:4 | 4 |
324 | | - |
325 | | - |
326 | | - |
327 | | - |
328 | | - |
329 | | - |
330 | | - |
331 | QString QFileInfo::filePath() const | - |
332 | { | - |
333 | const QFileInfoPrivate * const d = d_func(); | - |
334 | if (d->isDefaultConstructed) evaluated: d->isDefaultConstructed yes Evaluation Count:16 | yes Evaluation Count:82109 |
| 16-82109 |
335 | return QLatin1String(""); executed: return QLatin1String(""); Execution Count:16 | 16 |
336 | return d->fileEntry.filePath(); executed: return d->fileEntry.filePath(); Execution Count:82109 | 82109 |
337 | } | - |
338 | QString QFileInfo::fileName() const | - |
339 | { | - |
340 | const QFileInfoPrivate * const d = d_func(); | - |
341 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:134901 |
| 0-134901 |
342 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
343 | return d->fileEntry.fileName(); executed: return d->fileEntry.fileName(); Execution Count:134900 | 134900 |
344 | } | - |
345 | QString QFileInfo::bundleName() const | - |
346 | { | - |
347 | const QFileInfoPrivate * const d = d_func(); | - |
348 | if (d->isDefaultConstructed) never evaluated: d->isDefaultConstructed | 0 |
349 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
350 | return d->getFileName(QAbstractFileEngine::BundleName); never executed: return d->getFileName(QAbstractFileEngine::BundleName); | 0 |
351 | } | - |
352 | QString QFileInfo::baseName() const | - |
353 | { | - |
354 | const QFileInfoPrivate * const d = d_func(); | - |
355 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:1956 |
| 0-1956 |
356 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
357 | return d->fileEntry.baseName(); executed: return d->fileEntry.baseName(); Execution Count:1956 | 1956 |
358 | } | - |
359 | QString QFileInfo::completeBaseName() const | - |
360 | { | - |
361 | const QFileInfoPrivate * const d = d_func(); | - |
362 | if (d->isDefaultConstructed) never evaluated: d->isDefaultConstructed | 0 |
363 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
364 | return d->fileEntry.completeBaseName(); never executed: return d->fileEntry.completeBaseName(); | 0 |
365 | } | - |
366 | QString QFileInfo::completeSuffix() const | - |
367 | { | - |
368 | const QFileInfoPrivate * const d = d_func(); | - |
369 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:1727 |
| 0-1727 |
370 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
371 | return d->fileEntry.completeSuffix(); executed: return d->fileEntry.completeSuffix(); Execution Count:1727 | 1727 |
372 | } | - |
373 | QString QFileInfo::suffix() const | - |
374 | { | - |
375 | const QFileInfoPrivate * const d = d_func(); | - |
376 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:42829 |
| 0-42829 |
377 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
378 | return d->fileEntry.suffix(); executed: return d->fileEntry.suffix(); Execution Count:42829 | 42829 |
379 | } | - |
380 | QDir QFileInfo::dir() const | - |
381 | { | - |
382 | const QFileInfoPrivate * const d = d_func(); | - |
383 | | - |
384 | return QDir(d->fileEntry.path()); executed: return QDir(d->fileEntry.path()); Execution Count:10 | 10 |
385 | } | - |
386 | | - |
387 | | - |
388 | | - |
389 | | - |
390 | | - |
391 | | - |
392 | QDir QFileInfo::absoluteDir() const | - |
393 | { | - |
394 | return QDir(absolutePath()); executed: return QDir(absolutePath()); Execution Count:37 | 37 |
395 | } | - |
396 | | - |
397 | | - |
398 | | - |
399 | | - |
400 | | - |
401 | | - |
402 | bool QFileInfo::isReadable() const | - |
403 | { | - |
404 | const QFileInfoPrivate * const d = d_func(); | - |
405 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:107 |
| 0-107 |
406 | return false; never executed: return false; | 0 |
407 | if (d->fileEngine == 0) { evaluated: d->fileEngine == 0 yes Evaluation Count:103 | yes Evaluation Count:4 |
| 4-103 |
408 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::UserReadPermission)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:103 |
partially evaluated: !d->metaData.hasFlags(QFileSystemMetaData::UserReadPermission) yes Evaluation Count:103 | no Evaluation Count:0 |
| 0-103 |
409 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::UserReadPermission); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::UserReadPermission); Execution Count:103 | 103 |
410 | return (d->metaData.permissions() & QFile::ReadUser) != 0; executed: return (d->metaData.permissions() & QFile::ReadUser) != 0; Execution Count:103 | 103 |
411 | } | - |
412 | return d->getFileFlags(QAbstractFileEngine::ReadUserPerm); executed: return d->getFileFlags(QAbstractFileEngine::ReadUserPerm); Execution Count:4 | 4 |
413 | } | - |
414 | | - |
415 | | - |
416 | | - |
417 | | - |
418 | | - |
419 | | - |
420 | bool QFileInfo::isWritable() const | - |
421 | { | - |
422 | const QFileInfoPrivate * const d = d_func(); | - |
423 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:7 |
| 0-7 |
424 | return false; never executed: return false; | 0 |
425 | if (d->fileEngine == 0) { partially evaluated: d->fileEngine == 0 yes Evaluation Count:7 | no Evaluation Count:0 |
| 0-7 |
426 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::UserWritePermission)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:7 |
partially evaluated: !d->metaData.hasFlags(QFileSystemMetaData::UserWritePermission) yes Evaluation Count:7 | no Evaluation Count:0 |
| 0-7 |
427 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::UserWritePermission); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::UserWritePermission); Execution Count:7 | 7 |
428 | return (d->metaData.permissions() & QFile::WriteUser) != 0; executed: return (d->metaData.permissions() & QFile::WriteUser) != 0; Execution Count:7 | 7 |
429 | } | - |
430 | return d->getFileFlags(QAbstractFileEngine::WriteUserPerm); never executed: return d->getFileFlags(QAbstractFileEngine::WriteUserPerm); | 0 |
431 | } | - |
432 | | - |
433 | | - |
434 | | - |
435 | | - |
436 | | - |
437 | | - |
438 | bool QFileInfo::isExecutable() const | - |
439 | { | - |
440 | const QFileInfoPrivate * const d = d_func(); | - |
441 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:12 |
| 0-12 |
442 | return false; never executed: return false; | 0 |
443 | if (d->fileEngine == 0) { partially evaluated: d->fileEngine == 0 yes Evaluation Count:12 | no Evaluation Count:0 |
| 0-12 |
444 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::UserExecutePermission)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:12 |
partially evaluated: !d->metaData.hasFlags(QFileSystemMetaData::UserExecutePermission) yes Evaluation Count:12 | no Evaluation Count:0 |
| 0-12 |
445 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::UserExecutePermission); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::UserExecutePermission); Execution Count:12 | 12 |
446 | return (d->metaData.permissions() & QFile::ExeUser) != 0; executed: return (d->metaData.permissions() & QFile::ExeUser) != 0; Execution Count:12 | 12 |
447 | } | - |
448 | return d->getFileFlags(QAbstractFileEngine::ExeUserPerm); never executed: return d->getFileFlags(QAbstractFileEngine::ExeUserPerm); | 0 |
449 | } | - |
450 | | - |
451 | | - |
452 | | - |
453 | | - |
454 | | - |
455 | | - |
456 | | - |
457 | bool QFileInfo::isHidden() const | - |
458 | { | - |
459 | const QFileInfoPrivate * const d = d_func(); | - |
460 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:55441 |
| 0-55441 |
461 | return false; never executed: return false; | 0 |
462 | if (d->fileEngine == 0) { evaluated: d->fileEngine == 0 yes Evaluation Count:55257 | yes Evaluation Count:184 |
| 184-55257 |
463 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::HiddenAttribute)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:55257 |
evaluated: !d->metaData.hasFlags(QFileSystemMetaData::HiddenAttribute) yes Evaluation Count:38354 | yes Evaluation Count:16903 |
| 0-55257 |
464 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::HiddenAttribute); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::HiddenAttribute); Execution Count:38354 | 38354 |
465 | return d->metaData.isHidden(); executed: return d->metaData.isHidden(); Execution Count:55257 | 55257 |
466 | } | - |
467 | return d->getFileFlags(QAbstractFileEngine::HiddenFlag); executed: return d->getFileFlags(QAbstractFileEngine::HiddenFlag); Execution Count:184 | 184 |
468 | } | - |
469 | bool QFileInfo::isNativePath() const | - |
470 | { | - |
471 | const QFileInfoPrivate * const d = d_func(); | - |
472 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:658 |
| 0-658 |
473 | return false; never executed: return false; | 0 |
474 | if (d->fileEngine == 0) evaluated: d->fileEngine == 0 yes Evaluation Count:656 | yes Evaluation Count:2 |
| 2-656 |
475 | return true; executed: return true; Execution Count:656 | 656 |
476 | return d->getFileFlags(QAbstractFileEngine::LocalDiskFlag); executed: return d->getFileFlags(QAbstractFileEngine::LocalDiskFlag); Execution Count:2 | 2 |
477 | } | - |
478 | bool QFileInfo::isFile() const | - |
479 | { | - |
480 | const QFileInfoPrivate * const d = d_func(); | - |
481 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:947531 |
| 0-947531 |
482 | return false; never executed: return false; | 0 |
483 | if (d->fileEngine == 0) { evaluated: d->fileEngine == 0 yes Evaluation Count:947348 | yes Evaluation Count:183 |
| 183-947348 |
484 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::FileType)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:947348 |
evaluated: !d->metaData.hasFlags(QFileSystemMetaData::FileType) yes Evaluation Count:2030 | yes Evaluation Count:945318 |
| 0-947348 |
485 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::FileType); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::FileType); Execution Count:2030 | 2030 |
486 | return d->metaData.isFile(); executed: return d->metaData.isFile(); Execution Count:947348 | 947348 |
487 | } | - |
488 | return d->getFileFlags(QAbstractFileEngine::FileType); executed: return d->getFileFlags(QAbstractFileEngine::FileType); Execution Count:183 | 183 |
489 | } | - |
490 | | - |
491 | | - |
492 | | - |
493 | | - |
494 | | - |
495 | | - |
496 | | - |
497 | bool QFileInfo::isDir() const | - |
498 | { | - |
499 | const QFileInfoPrivate * const d = d_func(); | - |
500 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:974545 |
| 0-974545 |
501 | return false; never executed: return false; | 0 |
502 | if (d->fileEngine == 0) { evaluated: d->fileEngine == 0 yes Evaluation Count:974526 | yes Evaluation Count:19 |
| 19-974526 |
503 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::DirectoryType)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:974526 |
evaluated: !d->metaData.hasFlags(QFileSystemMetaData::DirectoryType) yes Evaluation Count:1198 | yes Evaluation Count:973328 |
| 0-974526 |
504 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::DirectoryType); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::DirectoryType); Execution Count:1198 | 1198 |
505 | return d->metaData.isDirectory(); executed: return d->metaData.isDirectory(); Execution Count:974526 | 974526 |
506 | } | - |
507 | return d->getFileFlags(QAbstractFileEngine::DirectoryType); executed: return d->getFileFlags(QAbstractFileEngine::DirectoryType); Execution Count:19 | 19 |
508 | } | - |
509 | bool QFileInfo::isBundle() const | - |
510 | { | - |
511 | const QFileInfoPrivate * const d = d_func(); | - |
512 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:122 |
| 0-122 |
513 | return false; never executed: return false; | 0 |
514 | if (d->fileEngine == 0) { partially evaluated: d->fileEngine == 0 yes Evaluation Count:122 | no Evaluation Count:0 |
| 0-122 |
515 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::BundleType)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:122 |
partially evaluated: !d->metaData.hasFlags(QFileSystemMetaData::BundleType) no Evaluation Count:0 | yes Evaluation Count:122 |
| 0-122 |
516 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::BundleType); never executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::BundleType); | 0 |
517 | return d->metaData.isBundle(); executed: return d->metaData.isBundle(); Execution Count:122 | 122 |
518 | } | - |
519 | return d->getFileFlags(QAbstractFileEngine::BundleType); never executed: return d->getFileFlags(QAbstractFileEngine::BundleType); | 0 |
520 | } | - |
521 | bool QFileInfo::isSymLink() const | - |
522 | { | - |
523 | const QFileInfoPrivate * const d = d_func(); | - |
524 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:76750 |
| 0-76750 |
525 | return false; never executed: return false; | 0 |
526 | if (d->fileEngine == 0) { evaluated: d->fileEngine == 0 yes Evaluation Count:76746 | yes Evaluation Count:4 |
| 4-76746 |
527 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::LegacyLinkType)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:76746 |
evaluated: !d->metaData.hasFlags(QFileSystemMetaData::LegacyLinkType) yes Evaluation Count:2590 | yes Evaluation Count:74156 |
| 0-76746 |
528 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::LegacyLinkType); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::LegacyLinkType); Execution Count:2590 | 2590 |
529 | return d->metaData.isLegacyLink(); executed: return d->metaData.isLegacyLink(); Execution Count:76746 | 76746 |
530 | } | - |
531 | return d->getFileFlags(QAbstractFileEngine::LinkType); executed: return d->getFileFlags(QAbstractFileEngine::LinkType); Execution Count:4 | 4 |
532 | } | - |
533 | | - |
534 | | - |
535 | | - |
536 | | - |
537 | | - |
538 | | - |
539 | bool QFileInfo::isRoot() const | - |
540 | { | - |
541 | const QFileInfoPrivate * const d = d_func(); | - |
542 | if (d->isDefaultConstructed) evaluated: d->isDefaultConstructed yes Evaluation Count:2 | yes Evaluation Count:58244 |
| 2-58244 |
543 | return true; executed: return true; Execution Count:2 | 2 |
544 | if (d->fileEngine == 0) { partially evaluated: d->fileEngine == 0 yes Evaluation Count:58244 | no Evaluation Count:0 |
| 0-58244 |
545 | if (d->fileEntry.isRoot()) { evaluated: d->fileEntry.isRoot() yes Evaluation Count:77 | yes Evaluation Count:58167 |
| 77-58167 |
546 | | - |
547 | | - |
548 | | - |
549 | | - |
550 | | - |
551 | | - |
552 | | - |
553 | return true; executed: return true; Execution Count:77 | 77 |
554 | | - |
555 | } | - |
556 | return false; executed: return false; Execution Count:58167 | 58167 |
557 | } | - |
558 | return d->getFileFlags(QAbstractFileEngine::RootFlag); never executed: return d->getFileFlags(QAbstractFileEngine::RootFlag); | 0 |
559 | } | - |
560 | QString QFileInfo::readLink() const | - |
561 | { | - |
562 | const QFileInfoPrivate * const d = d_func(); | - |
563 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
564 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
565 | return d->getFileName(QAbstractFileEngine::LinkName); executed: return d->getFileName(QAbstractFileEngine::LinkName); Execution Count:8 | 8 |
566 | } | - |
567 | QString QFileInfo::owner() const | - |
568 | { | - |
569 | const QFileInfoPrivate * const d = d_func(); | - |
570 | if (d->isDefaultConstructed) never evaluated: d->isDefaultConstructed | 0 |
571 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
572 | return d->getFileOwner(QAbstractFileEngine::OwnerUser); never executed: return d->getFileOwner(QAbstractFileEngine::OwnerUser); | 0 |
573 | } | - |
574 | uint QFileInfo::ownerId() const | - |
575 | { | - |
576 | const QFileInfoPrivate * const d = d_func(); | - |
577 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:45 |
| 0-45 |
578 | return 0; never executed: return 0; | 0 |
579 | if (d->fileEngine == 0) { partially evaluated: d->fileEngine == 0 yes Evaluation Count:45 | no Evaluation Count:0 |
| 0-45 |
580 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::UserId)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:45 |
evaluated: !d->metaData.hasFlags(QFileSystemMetaData::UserId) yes Evaluation Count:7 | yes Evaluation Count:38 |
| 0-45 |
581 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::UserId); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::UserId); Execution Count:7 | 7 |
582 | return d->metaData.userId(); executed: return d->metaData.userId(); Execution Count:45 | 45 |
583 | } | - |
584 | return d->fileEngine->ownerId(QAbstractFileEngine::OwnerUser); never executed: return d->fileEngine->ownerId(QAbstractFileEngine::OwnerUser); | 0 |
585 | } | - |
586 | QString QFileInfo::group() const | - |
587 | { | - |
588 | const QFileInfoPrivate * const d = d_func(); | - |
589 | if (d->isDefaultConstructed) never evaluated: d->isDefaultConstructed | 0 |
590 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
591 | return d->getFileOwner(QAbstractFileEngine::OwnerGroup); never executed: return d->getFileOwner(QAbstractFileEngine::OwnerGroup); | 0 |
592 | } | - |
593 | uint QFileInfo::groupId() const | - |
594 | { | - |
595 | const QFileInfoPrivate * const d = d_func(); | - |
596 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:41 |
| 0-41 |
597 | return 0; never executed: return 0; | 0 |
598 | if (d->fileEngine == 0) { partially evaluated: d->fileEngine == 0 yes Evaluation Count:41 | no Evaluation Count:0 |
| 0-41 |
599 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::GroupId)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:41 |
partially evaluated: !d->metaData.hasFlags(QFileSystemMetaData::GroupId) no Evaluation Count:0 | yes Evaluation Count:41 |
| 0-41 |
600 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::GroupId); never executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::GroupId); | 0 |
601 | return d->metaData.groupId(); executed: return d->metaData.groupId(); Execution Count:41 | 41 |
602 | } | - |
603 | return d->fileEngine->ownerId(QAbstractFileEngine::OwnerGroup); never executed: return d->fileEngine->ownerId(QAbstractFileEngine::OwnerGroup); | 0 |
604 | } | - |
605 | bool QFileInfo::permission(QFile::Permissions permissions) const | - |
606 | { | - |
607 | const QFileInfoPrivate * const d = d_func(); | - |
608 | if (d->isDefaultConstructed) never evaluated: d->isDefaultConstructed | 0 |
609 | return false; never executed: return false; | 0 |
610 | if (d->fileEngine == 0) { never evaluated: d->fileEngine == 0 | 0 |
611 | | - |
612 | QFileSystemMetaData::MetaDataFlag permissionFlags = static_cast<QFileSystemMetaData::MetaDataFlag>((int)permissions); | - |
613 | if (!d->cache_enabled || !d->metaData.hasFlags(permissionFlags)) never evaluated: !d->cache_enabled never evaluated: !d->metaData.hasFlags(permissionFlags) | 0 |
614 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, permissionFlags); never executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, permissionFlags); | 0 |
615 | return (d->metaData.permissions() & permissions) == permissions; never executed: return (d->metaData.permissions() & permissions) == permissions; | 0 |
616 | } | - |
617 | return d->getFileFlags(QAbstractFileEngine::FileFlags((int)permissions)) == (uint)permissions; never executed: return d->getFileFlags(QAbstractFileEngine::FileFlags((int)permissions)) == (uint)permissions; | 0 |
618 | } | - |
619 | | - |
620 | | - |
621 | | - |
622 | | - |
623 | | - |
624 | QFile::Permissions QFileInfo::permissions() const | - |
625 | { | - |
626 | const QFileInfoPrivate * const d = d_func(); | - |
627 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:13321 |
| 0-13321 |
628 | return 0; never executed: return 0; | 0 |
629 | if (d->fileEngine == 0) { partially evaluated: d->fileEngine == 0 yes Evaluation Count:13321 | no Evaluation Count:0 |
| 0-13321 |
630 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::Permissions)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:13321 |
evaluated: !d->metaData.hasFlags(QFileSystemMetaData::Permissions) yes Evaluation Count:9832 | yes Evaluation Count:3489 |
| 0-13321 |
631 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::Permissions); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::Permissions); Execution Count:9832 | 9832 |
632 | return d->metaData.permissions(); executed: return d->metaData.permissions(); Execution Count:13321 | 13321 |
633 | } | - |
634 | return QFile::Permissions(d->getFileFlags(QAbstractFileEngine::PermsMask) & QAbstractFileEngine::PermsMask); never executed: return QFile::Permissions(d->getFileFlags(QAbstractFileEngine::PermsMask) & QAbstractFileEngine::PermsMask); | 0 |
635 | } | - |
636 | qint64 QFileInfo::size() const | - |
637 | { | - |
638 | const QFileInfoPrivate * const d = d_func(); | - |
639 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:126309 |
| 0-126309 |
640 | return 0; never executed: return 0; | 0 |
641 | if (d->fileEngine == 0) { evaluated: d->fileEngine == 0 yes Evaluation Count:124648 | yes Evaluation Count:1661 |
| 1661-124648 |
642 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::SizeAttribute)) evaluated: !d->cache_enabled yes Evaluation Count:2 | yes Evaluation Count:124646 |
evaluated: !d->metaData.hasFlags(QFileSystemMetaData::SizeAttribute) yes Evaluation Count:28685 | yes Evaluation Count:95961 |
| 2-124646 |
643 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::SizeAttribute); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::SizeAttribute); Execution Count:28687 | 28687 |
644 | return d->metaData.size(); executed: return d->metaData.size(); Execution Count:124648 | 124648 |
645 | } | - |
646 | if (!d->getCachedFlag(QFileInfoPrivate::CachedSize)) { evaluated: !d->getCachedFlag(QFileInfoPrivate::CachedSize) yes Evaluation Count:1658 | yes Evaluation Count:3 |
| 3-1658 |
647 | d->setCachedFlag(QFileInfoPrivate::CachedSize); | - |
648 | d->fileSize = d->fileEngine->size(); | - |
649 | } executed: } Execution Count:1658 | 1658 |
650 | return d->fileSize; executed: return d->fileSize; Execution Count:1661 | 1661 |
651 | } | - |
652 | QDateTime QFileInfo::created() const | - |
653 | { | - |
654 | const QFileInfoPrivate * const d = d_func(); | - |
655 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:93 |
| 0-93 |
656 | return QDateTime(); never executed: return QDateTime(); | 0 |
657 | if (d->fileEngine == 0) { partially evaluated: d->fileEngine == 0 yes Evaluation Count:93 | no Evaluation Count:0 |
| 0-93 |
658 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::CreationTime)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:93 |
partially evaluated: !d->metaData.hasFlags(QFileSystemMetaData::CreationTime) yes Evaluation Count:93 | no Evaluation Count:0 |
| 0-93 |
659 | if (!QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::CreationTime)) partially evaluated: !QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::CreationTime) no Evaluation Count:0 | yes Evaluation Count:93 |
| 0-93 |
660 | return QDateTime(); never executed: return QDateTime(); | 0 |
661 | return d->metaData.creationTime(); executed: return d->metaData.creationTime(); Execution Count:93 | 93 |
662 | } | - |
663 | return d->getFileTime(QAbstractFileEngine::CreationTime); never executed: return d->getFileTime(QAbstractFileEngine::CreationTime); | 0 |
664 | } | - |
665 | | - |
666 | | - |
667 | | - |
668 | | - |
669 | | - |
670 | | - |
671 | QDateTime QFileInfo::lastModified() const | - |
672 | { | - |
673 | const QFileInfoPrivate * const d = d_func(); | - |
674 | if (d->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:8320 |
| 0-8320 |
675 | return QDateTime(); never executed: return QDateTime(); | 0 |
676 | if (d->fileEngine == 0) { evaluated: d->fileEngine == 0 yes Evaluation Count:6662 | yes Evaluation Count:1658 |
| 1658-6662 |
677 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::ModificationTime)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:6662 |
evaluated: !d->metaData.hasFlags(QFileSystemMetaData::ModificationTime) yes Evaluation Count:2235 | yes Evaluation Count:4427 |
| 0-6662 |
678 | if (!QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::ModificationTime)) evaluated: !QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::ModificationTime) yes Evaluation Count:1777 | yes Evaluation Count:458 |
| 458-1777 |
679 | return QDateTime(); executed: return QDateTime(); Execution Count:1777 | 1777 |
680 | return d->metaData.modificationTime(); executed: return d->metaData.modificationTime(); Execution Count:4885 | 4885 |
681 | } | - |
682 | return d->getFileTime(QAbstractFileEngine::ModificationTime); executed: return d->getFileTime(QAbstractFileEngine::ModificationTime); Execution Count:1658 | 1658 |
683 | } | - |
684 | QDateTime QFileInfo::lastRead() const | - |
685 | { | - |
686 | const QFileInfoPrivate * const d = d_func(); | - |
687 | if (d->isDefaultConstructed) never evaluated: d->isDefaultConstructed | 0 |
688 | return QDateTime(); never executed: return QDateTime(); | 0 |
689 | if (d->fileEngine == 0) { never evaluated: d->fileEngine == 0 | 0 |
690 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::AccessTime)) never evaluated: !d->cache_enabled never evaluated: !d->metaData.hasFlags(QFileSystemMetaData::AccessTime) | 0 |
691 | if (!QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::AccessTime)) never evaluated: !QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::AccessTime) | 0 |
692 | return QDateTime(); never executed: return QDateTime(); | 0 |
693 | return d->metaData.accessTime(); never executed: return d->metaData.accessTime(); | 0 |
694 | } | - |
695 | return d->getFileTime(QAbstractFileEngine::AccessTime); never executed: return d->getFileTime(QAbstractFileEngine::AccessTime); | 0 |
696 | } | - |
697 | | - |
698 | | - |
699 | | - |
700 | | - |
701 | QFileInfoPrivate* QFileInfo::d_func() | - |
702 | { | - |
703 | return d_ptr.data(); executed: return d_ptr.data(); Execution Count:17 | 17 |
704 | } | - |
705 | | - |
706 | | - |
707 | | - |
708 | | - |
709 | | - |
710 | | - |
711 | bool QFileInfo::caching() const | - |
712 | { | - |
713 | const QFileInfoPrivate * const d = d_func(); | - |
714 | return d->cache_enabled; never executed: return d->cache_enabled; | 0 |
715 | } | - |
716 | void QFileInfo::setCaching(bool enable) | - |
717 | { | - |
718 | QFileInfoPrivate * const d = d_func(); | - |
719 | d->cache_enabled = enable; | - |
720 | } executed: } Execution Count:13 | 13 |
721 | | - |
722 | | - |
| | |