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:10543 | no Evaluation Count:0 |
evaluated: !fileNames[(int)name].isNull() yes Evaluation Count:612 | yes Evaluation Count:9931 |
| 0-10543 |
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:8504 | yes Evaluation Count:1427 |
| 1427-8504 |
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:1546 | no Evaluation Count:0 |
| 0-1546 |
16 | fileNames[QAbstractFileEngine::CanonicalName] = entry.filePath(); | - |
17 | fileNames[QAbstractFileEngine::CanonicalPathName] = entry.path(); | - |
18 | } executed: } Execution Count:1546 | 1546 |
19 | if (name == QAbstractFileEngine::CanonicalName) partially evaluated: name == QAbstractFileEngine::CanonicalName yes Evaluation Count:1546 | no Evaluation Count:0 |
| 0-1546 |
20 | ret = entry.filePath(); executed: ret = entry.filePath(); Execution Count:1546 | 1546 |
21 | else | - |
22 | ret = entry.path(); never executed: ret = entry.path(); | 0 |
23 | break; executed: break; Execution Count:1546 | 1546 |
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:6950 | no Evaluation Count:0 |
| 0-6950 |
35 | fileNames[QAbstractFileEngine::AbsoluteName] = entry.filePath(); | - |
36 | fileNames[QAbstractFileEngine::AbsolutePathName] = entry.path(); | - |
37 | } executed: } Execution Count:6950 | 6950 |
38 | if (name == QAbstractFileEngine::AbsoluteName) evaluated: name == QAbstractFileEngine::AbsoluteName yes Evaluation Count:6535 | yes Evaluation Count:415 |
| 415-6535 |
39 | ret = entry.filePath(); executed: ret = entry.filePath(); Execution Count:6535 | 6535 |
40 | else | - |
41 | ret = entry.path(); executed: ret = entry.path(); Execution Count:415 | 415 |
42 | break; executed: break; Execution Count:6950 | 6950 |
43 | } | - |
44 | default: break; | 0 |
45 | } | - |
46 | } else { executed: } Execution Count:8504 | 8504 |
47 | ret = fileEngine->fileName(name); | - |
48 | } executed: } Execution Count:1427 | 1427 |
49 | if (ret.isNull()) evaluated: ret.isNull() yes Evaluation Count:10 | yes Evaluation Count:9921 |
| 10-9921 |
50 | ret = QLatin1String(""); executed: ret = QLatin1String(""); Execution Count:10 | 10 |
51 | if (cache_enabled) partially evaluated: cache_enabled yes Evaluation Count:9931 | no Evaluation Count:0 |
| 0-9931 |
52 | fileNames[(int)name] = ret; executed: fileNames[(int)name] = ret; Execution Count:9931 | 9931 |
53 | return ret; executed: return ret; Execution Count:9930 | 9930 |
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:2928 | yes Evaluation Count:4 |
| 4-2928 |
87 | if (!getCachedFlag(CachedFileFlags)) { evaluated: !getCachedFlag(CachedFileFlags) yes Evaluation Count:2543 | yes Evaluation Count:385 |
| 385-2543 |
88 | req |= QAbstractFileEngine::FlagsMask; | - |
89 | req |= QAbstractFileEngine::TypesMask; | - |
90 | req &= (~QAbstractFileEngine::LinkType); | - |
91 | req &= (~QAbstractFileEngine::BundleType); | - |
92 | | - |
93 | cachedFlags |= CachedFileFlags; | - |
94 | } executed: } Execution Count:2543 | 2543 |
95 | | - |
96 | if (request & QAbstractFileEngine::LinkType) { evaluated: request & QAbstractFileEngine::LinkType yes Evaluation Count:4 | yes Evaluation Count:2924 |
| 4-2924 |
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:2928 |
| 0-2928 |
104 | if (!getCachedFlag(CachedBundleTypeFlag)) { never evaluated: !getCachedFlag(CachedBundleTypeFlag) | 0 |
105 | req |= QAbstractFileEngine::BundleType; | - |
106 | cachedFlags |= CachedBundleTypeFlag; | - |
107 | } | 0 |
108 | } | 0 |
109 | } executed: } Execution Count:2928 | 2928 |
110 | | - |
111 | if (request & QAbstractFileEngine::PermsMask) { evaluated: request & QAbstractFileEngine::PermsMask yes Evaluation Count:4 | yes Evaluation Count:2928 |
| 4-2928 |
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:2551 | yes Evaluation Count:381 |
| 381-2551 |
119 | if (cache_enabled) partially evaluated: cache_enabled yes Evaluation Count:2551 | no Evaluation Count:0 |
| 0-2551 |
120 | req &= (~QAbstractFileEngine::Refresh); executed: req &= (~QAbstractFileEngine::Refresh); Execution Count:2551 | 2551 |
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:2551 | 2551 |
128 | | - |
129 | return fileFlags & request; executed: return fileFlags & request; Execution Count:2932 | 2932 |
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:1431 |
| 0-1431 |
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:1431 |
| 0-1431 |
139 | cf = CachedCTime; never executed: cf = CachedCTime; | 0 |
140 | else if (request == QAbstractFileEngine::ModificationTime) partially evaluated: request == QAbstractFileEngine::ModificationTime yes Evaluation Count:1431 | no Evaluation Count:0 |
| 0-1431 |
141 | cf = CachedMTime; executed: cf = CachedMTime; Execution Count:1431 | 1431 |
142 | else | - |
143 | cf = CachedATime; never executed: cf = CachedATime; | 0 |
144 | if (!getCachedFlag(cf)) { partially evaluated: !getCachedFlag(cf) yes Evaluation Count:1431 | no Evaluation Count:0 |
| 0-1431 |
145 | fileTimes[request] = fileEngine->fileTime(request); | - |
146 | setCachedFlag(cf); | - |
147 | } executed: } Execution Count:1431 | 1431 |
148 | return fileTimes[request]; executed: return fileTimes[request]; Execution Count:1431 | 1431 |
149 | } | - |
150 | QFileInfo::QFileInfo(QFileInfoPrivate *p) : d_ptr(p) | - |
151 | { | - |
152 | } executed: } Execution Count:44304 | 44304 |
153 | QFileInfo::QFileInfo() : d_ptr(new QFileInfoPrivate()) | - |
154 | { | - |
155 | } executed: } Execution Count:31775 | 31775 |
156 | | - |
157 | | - |
158 | | - |
159 | | - |
160 | | - |
161 | | - |
162 | | - |
163 | QFileInfo::QFileInfo(const QString &file) : d_ptr(new QFileInfoPrivate(file)) | - |
164 | { | - |
165 | } executed: } Execution Count:29728 | 29728 |
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:197 | 197 |
173 | | - |
174 | | - |
175 | | - |
176 | | - |
177 | QFileInfo::QFileInfo(const QFileInfo &fileinfo) | - |
178 | : d_ptr(fileinfo.d_ptr) | - |
179 | { | - |
180 | | - |
181 | } executed: } Execution Count:102245 | 102245 |
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:2055 | yes Evaluation Count:406 |
| 406-2055 |
196 | return true; executed: return true; Execution Count:2055 | 2055 |
197 | if (d->isDefaultConstructed || fileinfo.d_ptr->isDefaultConstructed) partially evaluated: d->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:406 |
partially evaluated: fileinfo.d_ptr->isDefaultConstructed no Evaluation Count:0 | yes Evaluation Count:406 |
| 0-406 |
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:380 | yes Evaluation Count:26 |
| 26-380 |
202 | return true; executed: return true; Execution Count:380 | 380 |
203 | | - |
204 | Qt::CaseSensitivity sensitive; | - |
205 | if (d->fileEngine == 0 || fileinfo.d_ptr->fileEngine == 0) { partially evaluated: d->fileEngine == 0 yes Evaluation Count:26 | no Evaluation Count:0 |
never evaluated: fileinfo.d_ptr->fileEngine == 0 | 0-26 |
206 | if (d->fileEngine != fileinfo.d_ptr->fileEngine) partially evaluated: d->fileEngine != fileinfo.d_ptr->fileEngine no Evaluation Count:0 | yes Evaluation Count:26 |
| 0-26 |
207 | return false; never executed: return false; | 0 |
208 | | - |
209 | sensitive = QFileSystemEngine::isCaseSensitive() ? Qt::CaseSensitive : Qt::CaseInsensitive; partially evaluated: QFileSystemEngine::isCaseSensitive() yes Evaluation Count:26 | no Evaluation Count:0 |
| 0-26 |
210 | } else { executed: } Execution Count:26 | 26 |
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:26 | 26 |
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:123647 | 123647 |
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:315 | 315 |
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:8442 |
| 0-8442 |
246 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
247 | return d->getFileName(QAbstractFileEngine::AbsoluteName); executed: return d->getFileName(QAbstractFileEngine::AbsoluteName); Execution Count:8442 | 8442 |
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:1675 |
| 0-1675 |
253 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
254 | return d->getFileName(QAbstractFileEngine::CanonicalName); executed: return d->getFileName(QAbstractFileEngine::CanonicalName); Execution Count:1675 | 1675 |
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:418 |
| 0-418 |
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:418 |
| 0-418 |
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:418 | 418 |
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:244 |
| 0-244 |
279 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
280 | return d->fileEntry.path(); executed: return d->fileEntry.path(); Execution Count:244 | 244 |
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:7976 |
| 0-7976 |
286 | return true; never executed: return true; | 0 |
287 | if (d->fileEngine == 0) evaluated: d->fileEngine == 0 yes Evaluation Count:7967 | yes Evaluation Count:9 |
| 9-7967 |
288 | return d->fileEntry.isRelative(); executed: return d->fileEntry.isRelative(); Execution Count:7967 | 7967 |
289 | return d->fileEngine->isRelativePath(); executed: return d->fileEngine->isRelativePath(); Execution Count:9 | 9 |
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:28404 |
| 0-28404 |
311 | return false; never executed: return false; | 0 |
312 | if (d->fileEngine == 0) { evaluated: d->fileEngine == 0 yes Evaluation Count:25868 | yes Evaluation Count:2536 |
| 2536-25868 |
313 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::ExistsAttribute)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:25868 |
evaluated: !d->metaData.hasFlags(QFileSystemMetaData::ExistsAttribute) yes Evaluation Count:5667 | yes Evaluation Count:20201 |
| 0-25868 |
314 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::ExistsAttribute); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::ExistsAttribute); Execution Count:5667 | 5667 |
315 | return d->metaData.exists(); executed: return d->metaData.exists(); Execution Count:25868 | 25868 |
316 | } | - |
317 | return d->getFileFlags(QAbstractFileEngine::ExistsFlag); executed: return d->getFileFlags(QAbstractFileEngine::ExistsFlag); Execution Count:2536 | 2536 |
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:35993 |
| 16-35993 |
335 | return QLatin1String(""); executed: return QLatin1String(""); Execution Count:16 | 16 |
336 | return d->fileEntry.filePath(); executed: return d->fileEntry.filePath(); Execution Count:35993 | 35993 |
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:44593 |
| 0-44593 |
342 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
343 | return d->fileEntry.fileName(); executed: return d->fileEntry.fileName(); Execution Count:44593 | 44593 |
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:1939 |
| 0-1939 |
356 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
357 | return d->fileEntry.baseName(); executed: return d->fileEntry.baseName(); Execution Count:1939 | 1939 |
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:1496 |
| 0-1496 |
370 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
371 | return d->fileEntry.completeSuffix(); executed: return d->fileEntry.completeSuffix(); Execution Count:1496 | 1496 |
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:7133 |
| 0-7133 |
377 | return QLatin1String(""); never executed: return QLatin1String(""); | 0 |
378 | return d->fileEntry.suffix(); executed: return d->fileEntry.suffix(); Execution Count:7133 | 7133 |
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:36 | 36 |
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:20614 |
| 0-20614 |
461 | return false; never executed: return false; | 0 |
462 | if (d->fileEngine == 0) { evaluated: d->fileEngine == 0 yes Evaluation Count:20430 | yes Evaluation Count:184 |
| 184-20430 |
463 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::HiddenAttribute)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:20430 |
evaluated: !d->metaData.hasFlags(QFileSystemMetaData::HiddenAttribute) yes Evaluation Count:18257 | yes Evaluation Count:2173 |
| 0-20430 |
464 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::HiddenAttribute); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::HiddenAttribute); Execution Count:18257 | 18257 |
465 | return d->metaData.isHidden(); executed: return d->metaData.isHidden(); Execution Count:20430 | 20430 |
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:657 |
| 0-657 |
473 | return false; never executed: return false; | 0 |
474 | if (d->fileEngine == 0) evaluated: d->fileEngine == 0 yes Evaluation Count:655 | yes Evaluation Count:2 |
| 2-655 |
475 | return true; executed: return true; Execution Count:655 | 655 |
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:51405 |
| 0-51405 |
482 | return false; never executed: return false; | 0 |
483 | if (d->fileEngine == 0) { evaluated: d->fileEngine == 0 yes Evaluation Count:51222 | yes Evaluation Count:183 |
| 183-51222 |
484 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::FileType)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:51222 |
evaluated: !d->metaData.hasFlags(QFileSystemMetaData::FileType) yes Evaluation Count:1987 | yes Evaluation Count:49235 |
| 0-51222 |
485 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::FileType); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::FileType); Execution Count:1987 | 1987 |
486 | return d->metaData.isFile(); executed: return d->metaData.isFile(); Execution Count:51222 | 51222 |
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:117249 |
| 0-117249 |
501 | return false; never executed: return false; | 0 |
502 | if (d->fileEngine == 0) { evaluated: d->fileEngine == 0 yes Evaluation Count:117230 | yes Evaluation Count:19 |
| 19-117230 |
503 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::DirectoryType)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:117230 |
evaluated: !d->metaData.hasFlags(QFileSystemMetaData::DirectoryType) yes Evaluation Count:1096 | yes Evaluation Count:116134 |
| 0-117230 |
504 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::DirectoryType); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::DirectoryType); Execution Count:1096 | 1096 |
505 | return d->metaData.isDirectory(); executed: return d->metaData.isDirectory(); Execution Count:117230 | 117230 |
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:28427 |
| 0-28427 |
525 | return false; never executed: return false; | 0 |
526 | if (d->fileEngine == 0) { evaluated: d->fileEngine == 0 yes Evaluation Count:28423 | yes Evaluation Count:4 |
| 4-28423 |
527 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::LegacyLinkType)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:28423 |
evaluated: !d->metaData.hasFlags(QFileSystemMetaData::LegacyLinkType) yes Evaluation Count:2308 | yes Evaluation Count:26115 |
| 0-28423 |
528 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::LegacyLinkType); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::LegacyLinkType); Execution Count:2308 | 2308 |
529 | return d->metaData.isLegacyLink(); executed: return d->metaData.isLegacyLink(); Execution Count:28423 | 28423 |
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:10606 |
| 2-10606 |
543 | return true; executed: return true; Execution Count:2 | 2 |
544 | if (d->fileEngine == 0) { partially evaluated: d->fileEngine == 0 yes Evaluation Count:10606 | no Evaluation Count:0 |
| 0-10606 |
545 | if (d->fileEntry.isRoot()) { evaluated: d->fileEntry.isRoot() yes Evaluation Count:65 | yes Evaluation Count:10541 |
| 65-10541 |
546 | | - |
547 | | - |
548 | | - |
549 | | - |
550 | | - |
551 | | - |
552 | | - |
553 | return true; executed: return true; Execution Count:65 | 65 |
554 | | - |
555 | } | - |
556 | return false; executed: return false; Execution Count:10541 | 10541 |
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:4806 |
| 0-4806 |
628 | return 0; never executed: return 0; | 0 |
629 | if (d->fileEngine == 0) { partially evaluated: d->fileEngine == 0 yes Evaluation Count:4806 | no Evaluation Count:0 |
| 0-4806 |
630 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::Permissions)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:4806 |
evaluated: !d->metaData.hasFlags(QFileSystemMetaData::Permissions) yes Evaluation Count:2249 | yes Evaluation Count:2557 |
| 0-4806 |
631 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::Permissions); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::Permissions); Execution Count:2249 | 2249 |
632 | return d->metaData.permissions(); executed: return d->metaData.permissions(); Execution Count:4806 | 4806 |
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:10075 |
| 0-10075 |
640 | return 0; never executed: return 0; | 0 |
641 | if (d->fileEngine == 0) { evaluated: d->fileEngine == 0 yes Evaluation Count:8641 | yes Evaluation Count:1434 |
| 1434-8641 |
642 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::SizeAttribute)) evaluated: !d->cache_enabled yes Evaluation Count:2 | yes Evaluation Count:8639 |
evaluated: !d->metaData.hasFlags(QFileSystemMetaData::SizeAttribute) yes Evaluation Count:5331 | yes Evaluation Count:3308 |
| 2-8639 |
643 | QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::SizeAttribute); executed: QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::SizeAttribute); Execution Count:5333 | 5333 |
644 | return d->metaData.size(); executed: return d->metaData.size(); Execution Count:8640 | 8640 |
645 | } | - |
646 | if (!d->getCachedFlag(QFileInfoPrivate::CachedSize)) { evaluated: !d->getCachedFlag(QFileInfoPrivate::CachedSize) yes Evaluation Count:1431 | yes Evaluation Count:3 |
| 3-1431 |
647 | d->setCachedFlag(QFileInfoPrivate::CachedSize); | - |
648 | d->fileSize = d->fileEngine->size(); | - |
649 | } executed: } Execution Count:1431 | 1431 |
650 | return d->fileSize; executed: return d->fileSize; Execution Count:1434 | 1434 |
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:7528 |
| 0-7528 |
675 | return QDateTime(); never executed: return QDateTime(); | 0 |
676 | if (d->fileEngine == 0) { evaluated: d->fileEngine == 0 yes Evaluation Count:6097 | yes Evaluation Count:1431 |
| 1431-6097 |
677 | if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::ModificationTime)) partially evaluated: !d->cache_enabled no Evaluation Count:0 | yes Evaluation Count:6097 |
evaluated: !d->metaData.hasFlags(QFileSystemMetaData::ModificationTime) yes Evaluation Count:2095 | yes Evaluation Count:4002 |
| 0-6097 |
678 | if (!QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::ModificationTime)) evaluated: !QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::ModificationTime) yes Evaluation Count:1661 | yes Evaluation Count:434 |
| 434-1661 |
679 | return QDateTime(); executed: return QDateTime(); Execution Count:1661 | 1661 |
680 | return d->metaData.modificationTime(); executed: return d->metaData.modificationTime(); Execution Count:4436 | 4436 |
681 | } | - |
682 | return d->getFileTime(QAbstractFileEngine::ModificationTime); executed: return d->getFileTime(QAbstractFileEngine::ModificationTime); Execution Count:1431 | 1431 |
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 | | - |
| | |