OpenCoverage

qfilesystemengine_unix.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/io/qfilesystemengine_unix.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Copyright (C) 2013 Samuel Gaist <samuel.gaist@edeltech.ch>-
5** Contact: https://www.qt.io/licensing/-
6**-
7** This file is part of the QtCore module of the Qt Toolkit.-
8**-
9** $QT_BEGIN_LICENSE:LGPL$-
10** Commercial License Usage-
11** Licensees holding valid commercial Qt licenses may use this file in-
12** accordance with the commercial license agreement provided with the-
13** Software or, alternatively, in accordance with the terms contained in-
14** a written agreement between you and The Qt Company. For licensing terms-
15** and conditions see https://www.qt.io/terms-conditions. For further-
16** information use the contact form at https://www.qt.io/contact-us.-
17**-
18** GNU Lesser General Public License Usage-
19** Alternatively, this file may be used under the terms of the GNU Lesser-
20** General Public License version 3 as published by the Free Software-
21** Foundation and appearing in the file LICENSE.LGPL3 included in the-
22** packaging of this file. Please review the following information to-
23** ensure the GNU Lesser General Public License version 3 requirements-
24** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
25**-
26** GNU General Public License Usage-
27** Alternatively, this file may be used under the terms of the GNU-
28** General Public License version 2.0 or (at your option) the GNU General-
29** Public license version 3 or any later version approved by the KDE Free-
30** Qt Foundation. The licenses are as published by the Free Software-
31** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
32** included in the packaging of this file. Please review the following-
33** information to ensure the GNU General Public License requirements will-
34** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
35** https://www.gnu.org/licenses/gpl-3.0.html.-
36**-
37** $QT_END_LICENSE$-
38**-
39****************************************************************************/-
40-
41#include "qplatformdefs.h"-
42#include "qfilesystemengine_p.h"-
43#include "qfile.h"-
44-
45#include <QtCore/qvarlengtharray.h>-
46-
47#include <stdlib.h> // for realpath()-
48#include <sys/types.h>-
49#include <sys/stat.h>-
50#include <unistd.h>-
51#include <stdio.h>-
52#include <errno.h>-
53-
54-
55#if defined(Q_OS_MAC)-
56# include <QtCore/private/qcore_mac_p.h>-
57# include <CoreFoundation/CFBundle.h>-
58#endif-
59-
60#ifdef Q_OS_OSX-
61#include <CoreServices/CoreServices.h>-
62#endif-
63-
64#ifdef Q_OS_IOS-
65#include <MobileCoreServices/MobileCoreServices.h>-
66#endif-
67-
68#if defined(Q_OS_DARWIN)-
69// We cannot include <Foundation/Foundation.h> (it's an Objective-C header), but-
70// we need these declarations:-
71Q_FORWARD_DECLARE_OBJC_CLASS(NSString);-
72extern "C" NSString *NSTemporaryDirectory();-
73#endif-
74-
75QT_BEGIN_NAMESPACE-
76-
77#if defined(Q_OS_DARWIN)-
78static inline bool hasResourcePropertyFlag(const QFileSystemMetaData &data,-
79 const QFileSystemEntry &entry,-
80 CFStringRef key)-
81{-
82 QCFString path = CFStringCreateWithFileSystemRepresentation(0,-
83 entry.nativeFilePath().constData());-
84 if (!path)-
85 return false;-
86-
87 QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, path, kCFURLPOSIXPathStyle,-
88 data.hasFlags(QFileSystemMetaData::DirectoryType));-
89 if (!url)-
90 return false;-
91-
92 CFBooleanRef value;-
93 if (CFURLCopyResourcePropertyForKey(url, key, &value, NULL)) {-
94 if (value == kCFBooleanTrue)-
95 return true;-
96 }-
97-
98 return false;-
99}-
100-
101static bool isPackage(const QFileSystemMetaData &data, const QFileSystemEntry &entry)-
102{-
103 if (!data.isDirectory())-
104 return false;-
105-
106 QFileInfo info(entry.filePath());-
107 QString suffix = info.suffix();-
108-
109 if (suffix.length() > 0) {-
110 // First step: is the extension known ?-
111 QCFType<CFStringRef> extensionRef = QCFString::toCFStringRef(suffix);-
112 QCFType<CFStringRef> uniformTypeIdentifier = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, extensionRef, NULL);-
113 if (UTTypeConformsTo(uniformTypeIdentifier, kUTTypeBundle))-
114 return true;-
115-
116 // Second step: check if an application knows the package type-
117 QCFType<CFStringRef> path = QCFString::toCFStringRef(entry.filePath());-
118 QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, path, kCFURLPOSIXPathStyle, true);-
119-
120 UInt32 type, creator;-
121 // Well created packages have the PkgInfo file-
122 if (CFBundleGetPackageInfoInDirectory(url, &type, &creator))-
123 return true;-
124-
125#ifdef Q_OS_OSX-
126 // Find if an application other than Finder claims to know how to handle the package-
127 QCFType<CFURLRef> application;-
128 LSGetApplicationForURL(url,-
129 kLSRolesEditor|kLSRolesViewer,-
130 NULL,-
131 &application);-
132-
133 if (application) {-
134 QCFType<CFBundleRef> bundle = CFBundleCreate(kCFAllocatorDefault, application);-
135 CFStringRef identifier = CFBundleGetIdentifier(bundle);-
136 QString applicationId = QCFString::toQString(identifier);-
137 if (applicationId != QLatin1String("com.apple.finder"))-
138 return true;-
139 }-
140#endif-
141 }-
142-
143 // Third step: check if the directory has the package bit set-
144 return hasResourcePropertyFlag(data, entry, kCFURLIsPackageKey);-
145}-
146#endif-
147-
148//static-
149QFileSystemEntry QFileSystemEngine::getLinkTarget(const QFileSystemEntry &link, QFileSystemMetaData &data)-
150{-
151#if defined(__GLIBC__) && !defined(PATH_MAX)-
152#define PATH_CHUNK_SIZE 256-
153 char *s = 0;-
154 int len = -1;-
155 int size = PATH_CHUNK_SIZE;-
156-
157 while (1) {-
158 s = (char *) ::realloc(s, size);-
159 Q_CHECK_PTR(s);-
160 len = ::readlink(link.nativeFilePath().constData(), s, size);-
161 if (len < 0) {-
162 ::free(s);-
163 break;-
164 }-
165 if (len < size) {-
166 break;-
167 }-
168 size *= 2;-
169 }-
170#else-
171 char s[PATH_MAX+1];-
172 int len = readlink(link.nativeFilePath().constData(), s, PATH_MAX);-
173#endif-
174 if (len > 0) {
len > 0Description
TRUEevaluated 404 times by 10 tests
Evaluated by:
  • tst_QApplication
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QGuiApplication
  • tst_QItemModel
  • tst_QSaveFile
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
1-404
175 QString ret;-
176 if (!data.hasFlags(QFileSystemMetaData::DirectoryType))
!data.hasFlags...DirectoryType)Description
TRUEevaluated 399 times by 8 tests
Evaluated by:
  • tst_QApplication
  • tst_QFile
  • tst_QFileInfo
  • tst_QGuiApplication
  • tst_QSaveFile
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 5 times by 4 tests
Evaluated by:
  • tst_QDirModel
  • tst_QFile
  • tst_QItemModel
  • tst_QSaveFile
5-399
177 fillMetaData(link, data, QFileSystemMetaData::DirectoryType);
executed 399 times by 8 tests: fillMetaData(link, data, QFileSystemMetaData::DirectoryType);
Executed by:
  • tst_QApplication
  • tst_QFile
  • tst_QFileInfo
  • tst_QGuiApplication
  • tst_QSaveFile
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
399
178 if (data.isDirectory() && s[0] != '/') {
data.isDirectory()Description
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QFile
  • tst_QItemModel
FALSEevaluated 402 times by 9 tests
Evaluated by:
  • tst_QApplication
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QGuiApplication
  • tst_QSaveFile
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
s[0] != '/'Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QItemModel
1-402
179 QDir parent(link.filePath());-
180 parent.cdUp();-
181 ret = parent.path();-
182 if (!ret.isEmpty() && !ret.endsWith(QLatin1Char('/')))
!ret.isEmpty()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
FALSEnever evaluated
!ret.endsWith(...tin1Char('/'))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
FALSEnever evaluated
0-1
183 ret += QLatin1Char('/');
executed 1 time by 1 test: ret += QLatin1Char('/');
Executed by:
  • tst_QFile
1
184 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QFile
1
185 s[len] = '\0';-
186 ret += QFile::decodeName(QByteArray(s));-
187#if defined(__GLIBC__) && !defined(PATH_MAX)-
188 ::free(s);-
189#endif-
190-
191 if (!ret.startsWith(QLatin1Char('/'))) {
!ret.startsWit...tin1Char('/'))Description
TRUEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
FALSEevaluated 399 times by 10 tests
Evaluated by:
  • tst_QApplication
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QGuiApplication
  • tst_QItemModel
  • tst_QSaveFile
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
5-399
192 if (link.filePath().startsWith(QLatin1Char('/'))) {
link.filePath(...tin1Char('/'))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
1-4
193 ret.prepend(link.filePath().left(link.filePath().lastIndexOf(QLatin1Char('/')))-
194 + QLatin1Char('/'));-
195 } else {
executed 1 time by 1 test: end of block
Executed by:
  • tst_QFile
1
196 ret.prepend(QDir::currentPath() + QLatin1Char('/'));-
197 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_QFile
  • tst_QFileInfo
4
198 }-
199 ret = QDir::cleanPath(ret);-
200 if (ret.size() > 1 && ret.endsWith(QLatin1Char('/')))
ret.size() > 1Description
TRUEevaluated 404 times by 10 tests
Evaluated by:
  • tst_QApplication
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QGuiApplication
  • tst_QItemModel
  • tst_QSaveFile
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
ret.endsWith(QLatin1Char('/'))Description
TRUEnever evaluated
FALSEevaluated 404 times by 10 tests
Evaluated by:
  • tst_QApplication
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QGuiApplication
  • tst_QItemModel
  • tst_QSaveFile
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
0-404
201 ret.chop(1);
never executed: ret.chop(1);
0
202 return QFileSystemEntry(ret);
executed 404 times by 10 tests: return QFileSystemEntry(ret);
Executed by:
  • tst_QApplication
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QGuiApplication
  • tst_QItemModel
  • tst_QSaveFile
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
404
203 }-
204#if defined(Q_OS_DARWIN)-
205 {-
206 QCFString path = CFStringCreateWithFileSystemRepresentation(0,-
207 QFile::encodeName(QDir::cleanPath(link.filePath())).data());-
208 if (!path)-
209 return QFileSystemEntry();-
210-
211 QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, path, kCFURLPOSIXPathStyle,-
212 data.hasFlags(QFileSystemMetaData::DirectoryType));-
213 if (!url)-
214 return QFileSystemEntry();-
215-
216 QCFType<CFDataRef> bookmarkData = CFURLCreateBookmarkDataFromFile(0, url, NULL);-
217 if (!bookmarkData)-
218 return QFileSystemEntry();-
219-
220 QCFType<CFURLRef> resolvedUrl = CFURLCreateByResolvingBookmarkData(0,-
221 bookmarkData,-
222 (CFURLBookmarkResolutionOptions)(kCFBookmarkResolutionWithoutUIMask-
223 | kCFBookmarkResolutionWithoutMountingMask), NULL, NULL, NULL, NULL);-
224 if (!resolvedUrl)-
225 return QFileSystemEntry();-
226-
227 QCFString cfstr(CFURLCopyFileSystemPath(resolvedUrl, kCFURLPOSIXPathStyle));-
228 if (!cfstr)-
229 return QFileSystemEntry();-
230-
231 return QFileSystemEntry(QCFString::toQString(cfstr));-
232 }-
233#endif-
234 return QFileSystemEntry();
executed 1 time by 1 test: return QFileSystemEntry();
Executed by:
  • tst_QFileInfo
1
235}-
236-
237//static-
238QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry, QFileSystemMetaData &data)-
239{-
240 if (entry.isEmpty() || entry.isRoot())
entry.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 25558 times by 145 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • ...
entry.isRoot()Description
TRUEevaluated 34 times by 5 tests
Evaluated by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QStorageInfo
FALSEevaluated 25524 times by 145 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • ...
0-25558
241 return entry;
executed 34 times by 5 tests: return entry;
Executed by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QStorageInfo
34
242-
243#if !defined(Q_OS_MAC) && !defined(Q_OS_QNX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_HAIKU) && _POSIX_VERSION < 200809L-
244 // realpath(X,0) is not supported-
245 Q_UNUSED(data);-
246 return QFileSystemEntry(slowCanonicalized(absoluteName(entry).filePath()));-
247#else-
248 char *ret = 0;-
249# if defined(Q_OS_DARWIN)-
250 ret = (char*)malloc(PATH_MAX + 1);-
251 if (ret && realpath(entry.nativeFilePath().constData(), (char*)ret) == 0) {-
252 const int savedErrno = errno; // errno is checked below, and free() might change it-
253 free(ret);-
254 errno = savedErrno;-
255 ret = 0;-
256 }-
257# elif defined(Q_OS_ANDROID)-
258 // On some Android versions, realpath() will return a path even if it does not exist-
259 // To work around this, we check existence in advance.-
260 if (!data.hasFlags(QFileSystemMetaData::ExistsAttribute))-
261 fillMetaData(entry, data, QFileSystemMetaData::ExistsAttribute);-
262-
263 if (!data.exists()) {-
264 ret = 0;-
265 errno = ENOENT;-
266 } else {-
267 ret = (char*)malloc(PATH_MAX + 1);-
268 if (realpath(entry.nativeFilePath().constData(), (char*)ret) == 0) {-
269 const int savedErrno = errno; // errno is checked below, and free() might change it-
270 free(ret);-
271 errno = savedErrno;-
272 ret = 0;-
273 }-
274 }-
275-
276# else-
277# if _POSIX_VERSION >= 200801L-
278 ret = realpath(entry.nativeFilePath().constData(), (char*)0);-
279# else-
280 ret = (char*)malloc(PATH_MAX + 1);-
281 if (realpath(entry.nativeFilePath().constData(), (char*)ret) == 0) {-
282 const int savedErrno = errno; // errno is checked below, and free() might change it-
283 free(ret);-
284 errno = savedErrno;-
285 ret = 0;-
286 }-
287# endif-
288# endif-
289 if (ret) {
retDescription
TRUEevaluated 24877 times by 145 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • ...
FALSEevaluated 647 times by 8 tests
Evaluated by:
  • tst_QApplication
  • tst_QDir
  • tst_QFileInfo
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QStorageInfo
  • tst_qmakelib
647-24877
290 data.knownFlagsMask |= QFileSystemMetaData::ExistsAttribute;-
291 data.entryFlags |= QFileSystemMetaData::ExistsAttribute;-
292 QString canonicalPath = QDir::cleanPath(QFile::decodeName(ret));-
293 free(ret);-
294 return QFileSystemEntry(canonicalPath);
executed 24877 times by 145 tests: return QFileSystemEntry(canonicalPath);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • ...
24877
295 } else if (errno == ENOENT) { // file doesn't exist
(*__errno_location ()) == 2Description
TRUEevaluated 647 times by 8 tests
Evaluated by:
  • tst_QApplication
  • tst_QDir
  • tst_QFileInfo
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QStorageInfo
  • tst_qmakelib
FALSEnever evaluated
0-647
296 data.knownFlagsMask |= QFileSystemMetaData::ExistsAttribute;-
297 data.entryFlags &= ~(QFileSystemMetaData::ExistsAttribute);-
298 return QFileSystemEntry();
executed 647 times by 8 tests: return QFileSystemEntry();
Executed by:
  • tst_QApplication
  • tst_QDir
  • tst_QFileInfo
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QStorageInfo
  • tst_qmakelib
647
299 }-
300 return entry;
never executed: return entry;
0
301#endif-
302}-
303-
304//static-
305QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)-
306{-
307 if (entry.isAbsolute() && entry.isClean())
entry.isAbsolute()Description
TRUEevaluated 13123 times by 74 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QErrorMessage
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • ...
FALSEevaluated 688 times by 27 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QPixmapFilter
  • tst_QProcess
  • tst_QSettings
  • tst_QSystemTrayIcon
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_QTextBrowser
  • ...
entry.isClean()Description
TRUEevaluated 9945 times by 74 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QErrorMessage
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • ...
FALSEevaluated 3178 times by 32 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirModel
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkDiskCache
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • ...
688-13123
308 return entry;
executed 9945 times by 74 tests: return entry;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QErrorMessage
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • ...
9945
309-
310 QByteArray orig = entry.nativeFilePath();-
311 QByteArray result;-
312 if (orig.isEmpty() || !orig.startsWith('/')) {
orig.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 3866 times by 49 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLineEdit
  • ...
!orig.startsWith('/')Description
TRUEevaluated 688 times by 27 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QPixmapFilter
  • tst_QProcess
  • tst_QSettings
  • tst_QSystemTrayIcon
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_QTextBrowser
  • ...
FALSEevaluated 3178 times by 32 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirModel
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkDiskCache
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • ...
0-3866
313 QFileSystemEntry cur(currentPath());-
314 result = cur.nativeFilePath();-
315 }
executed 688 times by 27 tests: end of block
Executed by:
  • tst_QCoreApplication
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QPixmapFilter
  • tst_QProcess
  • tst_QSettings
  • tst_QSystemTrayIcon
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_QTextBrowser
  • ...
688
316 if (!orig.isEmpty() && !(orig.length() == 1 && orig[0] == '.')) {
!orig.isEmpty()Description
TRUEevaluated 3866 times by 49 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLineEdit
  • ...
FALSEnever evaluated
orig.length() == 1Description
TRUEevaluated 259 times by 10 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_languageChange
FALSEevaluated 3607 times by 47 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QMimeDatabase
  • ...
orig[0] == '.'Description
TRUEevaluated 258 times by 10 tests
Evaluated by:
  • tst_QCoreApplication
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_languageChange
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileDialog2
0-3866
317 if (!result.isEmpty() && !result.endsWith('/'))
!result.isEmpty()Description
TRUEevaluated 430 times by 23 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QPixmapFilter
  • tst_QProcess
  • tst_QSettings
  • tst_QSystemTrayIcon
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_QTextBrowser
  • tst_qimagereader - unknown status
FALSEevaluated 3178 times by 32 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirModel
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkDiskCache
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • ...
!result.endsWith('/')Description
TRUEevaluated 430 times by 23 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QPixmapFilter
  • tst_QProcess
  • tst_QSettings
  • tst_QSystemTrayIcon
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_QTextBrowser
  • tst_qimagereader - unknown status
FALSEnever evaluated
0-3178
318 result.append('/');
executed 430 times by 23 tests: result.append('/');
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QPixmapFilter
  • tst_QProcess
  • tst_QSettings
  • tst_QSystemTrayIcon
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_QTextBrowser
  • tst_qimagereader - unknown status
430
319 result.append(orig);-
320 }
executed 3608 times by 47 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QMimeDatabase
  • ...
3608
321-
322 if (result.length() == 1 && result[0] == '/')
result.length() == 1Description
TRUEnever evaluated
FALSEevaluated 3866 times by 49 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLineEdit
  • ...
result[0] == '/'Description
TRUEnever evaluated
FALSEnever evaluated
0-3866
323 return QFileSystemEntry(result, QFileSystemEntry::FromNativePath());
never executed: return QFileSystemEntry(result, QFileSystemEntry::FromNativePath());
0
324 const bool isDir = result.endsWith('/');-
325-
326 /* as long as QDir::cleanPath() operates on a QString we have to convert to a string here.-
327 * ideally we never convert to a string since that loses information. Please fix after-
328 * we get a QByteArray version of QDir::cleanPath()-
329 */-
330 QFileSystemEntry resultingEntry(result, QFileSystemEntry::FromNativePath());-
331 QString stringVersion = QDir::cleanPath(resultingEntry.filePath());-
332 if (isDir)
isDirDescription
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QFileInfo
  • tst_QFiledialog
FALSEevaluated 3863 times by 49 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLineEdit
  • ...
3-3863
333 stringVersion.append(QLatin1Char('/'));
executed 3 times by 2 tests: stringVersion.append(QLatin1Char('/'));
Executed by:
  • tst_QFileInfo
  • tst_QFiledialog
3
334 return QFileSystemEntry(stringVersion);
executed 3866 times by 49 tests: return QFileSystemEntry(stringVersion);
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLineEdit
  • ...
3866
335}-
336-
337//static-
338QByteArray QFileSystemEngine::id(const QFileSystemEntry &entry)-
339{-
340 struct stat statResult;-
341 if (stat(entry.nativeFilePath().constData(), &statResult)) {
stat(entry.nat..., &statResult)Description
TRUEnever evaluated
FALSEnever evaluated
0
342 qErrnoWarning("stat() failed for '%s'", entry.nativeFilePath().constData());-
343 return QByteArray();
never executed: return QByteArray();
0
344 }-
345 QByteArray result = QByteArray::number(quint64(statResult.st_dev), 16);-
346 result += ':';-
347 result += QByteArray::number(quint64(statResult.st_ino));-
348 return result;
never executed: return result;
0
349}-
350-
351//static-
352QString QFileSystemEngine::resolveUserName(uint userId)-
353{-
354#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD)-
355 int size_max = sysconf(_SC_GETPW_R_SIZE_MAX);-
356 if (size_max == -1)
size_max == -1Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
0-1
357 size_max = 1024;
never executed: size_max = 1024;
0
358 QVarLengthArray<char, 1024> buf(size_max);-
359#endif-
360-
361#if !defined(Q_OS_INTEGRITY)-
362 struct passwd *pw = 0;-
363#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_VXWORKS)-
364 struct passwd entry;-
365 getpwuid_r(userId, &entry, buf.data(), buf.size(), &pw);-
366#else-
367 pw = getpwuid(userId);-
368#endif-
369 if (pw)
pwDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
FALSEnever evaluated
0-1
370 return QFile::decodeName(QByteArray(pw->pw_name));
executed 1 time by 1 test: return QFile::decodeName(QByteArray(pw->pw_name));
Executed by:
  • tst_QFileInfo
1
371#endif-
372 return QString();
never executed: return QString();
0
373}-
374-
375//static-
376QString QFileSystemEngine::resolveGroupName(uint groupId)-
377{-
378#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD)-
379 int size_max = sysconf(_SC_GETPW_R_SIZE_MAX);-
380 if (size_max == -1)
size_max == -1Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
0-1
381 size_max = 1024;
never executed: size_max = 1024;
0
382 QVarLengthArray<char, 1024> buf(size_max);-
383#endif-
384-
385#if !defined(Q_OS_INTEGRITY)-
386 struct group *gr = 0;-
387#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_VXWORKS)-
388 size_max = sysconf(_SC_GETGR_R_SIZE_MAX);-
389 if (size_max == -1)
size_max == -1Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
0-1
390 size_max = 1024;
never executed: size_max = 1024;
0
391 buf.resize(size_max);-
392 struct group entry;-
393 // Some large systems have more members than the POSIX max size-
394 // Loop over by doubling the buffer size (upper limit 250k)-
395 for (unsigned size = size_max; size < 256000; size += size)
size < 256000Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
FALSEnever evaluated
0-1
396 {-
397 buf.resize(size);-
398 // ERANGE indicates that the buffer was too small-
399 if (!getgrgid_r(groupId, &entry, buf.data(), buf.size(), &gr)
!getgrgid_r(gr...f.size(), &gr)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
FALSEnever evaluated
0-1
400 || errno != ERANGE)
(*__errno_location ()) != 34Description
TRUEnever evaluated
FALSEnever evaluated
0
401 break;
executed 1 time by 1 test: break;
Executed by:
  • tst_QFileInfo
1
402 }
never executed: end of block
0
403#else-
404 gr = getgrgid(groupId);-
405#endif-
406 if (gr)
grDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
FALSEnever evaluated
0-1
407 return QFile::decodeName(QByteArray(gr->gr_name));
executed 1 time by 1 test: return QFile::decodeName(QByteArray(gr->gr_name));
Executed by:
  • tst_QFileInfo
1
408#endif-
409 return QString();
never executed: return QString();
0
410}-
411-
412#if defined(Q_OS_DARWIN)-
413//static-
414QString QFileSystemEngine::bundleName(const QFileSystemEntry &entry)-
415{-
416 QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, QCFString(entry.filePath()),-
417 kCFURLPOSIXPathStyle, true);-
418 if (QCFType<CFDictionaryRef> dict = CFBundleCopyInfoDictionaryForURL(url)) {-
419 if (CFTypeRef name = (CFTypeRef)CFDictionaryGetValue(dict, kCFBundleNameKey)) {-
420 if (CFGetTypeID(name) == CFStringGetTypeID())-
421 return QCFString::toQString((CFStringRef)name);-
422 }-
423 }-
424 return QString();-
425}-
426#endif-
427-
428//static-
429bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemMetaData &data,-
430 QFileSystemMetaData::MetaDataFlags what)-
431{-
432#if defined(Q_OS_DARWIN)-
433 if (what & QFileSystemMetaData::BundleType) {-
434 if (!data.hasFlags(QFileSystemMetaData::DirectoryType))-
435 what |= QFileSystemMetaData::DirectoryType;-
436 }-
437 if (what & QFileSystemMetaData::HiddenAttribute) {-
438 // OS X >= 10.5: st_flags & UF_HIDDEN-
439 what |= QFileSystemMetaData::PosixStatFlags;-
440 }-
441#endif // defined(Q_OS_DARWIN)-
442-
443 if (what & QFileSystemMetaData::PosixStatFlags)
what & QFileSy...PosixStatFlagsDescription
TRUEevaluated 61593 times by 129 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • ...
FALSEevaluated 70135 times by 231 tests
Evaluated by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
61593-70135
444 what |= QFileSystemMetaData::PosixStatFlags;
executed 61593 times by 129 tests: what |= QFileSystemMetaData::PosixStatFlags;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • ...
61593
445-
446 if (what & QFileSystemMetaData::ExistsAttribute) {
what & QFileSy...xistsAttributeDescription
TRUEevaluated 29606 times by 252 tests
Evaluated by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
FALSEevaluated 102122 times by 170 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • ...
29606-102122
447 // FIXME: Would other queries being performed provide this bit?-
448 what |= QFileSystemMetaData::PosixStatFlags;-
449 }
executed 29606 times by 252 tests: end of block
Executed by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
29606
450-
451 data.entryFlags &= ~what;-
452-
453 const char * nativeFilePath;-
454 int nativeFilePathLength;-
455 {-
456 const QByteArray &path = entry.nativeFilePath();-
457 nativeFilePath = path.constData();-
458 nativeFilePathLength = path.size();-
459 Q_UNUSED(nativeFilePathLength);-
460 }-
461-
462 bool entryExists = true; // innocent until proven otherwise-
463-
464 QT_STATBUF statBuffer;-
465 bool statBufferValid = false;-
466 if (what & QFileSystemMetaData::LinkType) {
what & QFileSy...Data::LinkTypeDescription
TRUEevaluated 7469 times by 84 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirModel
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • ...
FALSEevaluated 124259 times by 259 tests
Evaluated by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
7469-124259
467 if (QT_LSTAT(nativeFilePath, &statBuffer) == 0) {
::lstat64(nati...atBuffer) == 0Description
TRUEevaluated 6097 times by 79 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirModel
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • ...
FALSEevaluated 1372 times by 21 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileSystemModel
  • tst_QIcon
  • tst_QImage
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPixmap
  • tst_QProcess
  • tst_QSaveFile
  • tst_QSettings
  • tst_QStyleSheetStyle
  • tst_QTemporaryFile
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_rcc
1372-6097
468 if (S_ISLNK(statBuffer.st_mode)) {
((((statBuffer... == (0120000))Description
TRUEevaluated 1358 times by 26 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QFileInfo
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSaveFile
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • ...
FALSEevaluated 4739 times by 56 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirModel
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • ...
1358-4739
469 data.entryFlags |= QFileSystemMetaData::LinkType;-
470 } else {
executed 1358 times by 26 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QFileInfo
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSaveFile
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • ...
1358
471 statBufferValid = true;-
472 data.entryFlags &= ~QFileSystemMetaData::PosixStatFlags;-
473 }
executed 4739 times by 56 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirModel
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • ...
4739
474 } else {-
475 entryExists = false;-
476 }
executed 1372 times by 21 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileSystemModel
  • tst_QIcon
  • tst_QImage
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPixmap
  • tst_QProcess
  • tst_QSaveFile
  • tst_QSettings
  • tst_QStyleSheetStyle
  • tst_QTemporaryFile
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_rcc
1372
477-
478 data.knownFlagsMask |= QFileSystemMetaData::LinkType;-
479 }
executed 7469 times by 84 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirModel
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • ...
7469
480-
481 if (statBufferValid || (what & QFileSystemMetaData::PosixStatFlags)) {
statBufferValidDescription
TRUEevaluated 4739 times by 56 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirModel
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • ...
FALSEevaluated 126989 times by 259 tests
Evaluated by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
4739-126989
482 if (entryExists && !statBufferValid)
entryExistsDescription
TRUEevaluated 89580 times by 259 tests
Evaluated by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
FALSEevaluated 1248 times by 20 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileSystemModel
  • tst_QIcon
  • tst_QImage
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QNetworkReply
  • tst_QPainter
  • tst_QPixmap
  • tst_QProcess
  • tst_QSettings
  • tst_QStyleSheetStyle
  • tst_QTemporaryFile
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_rcc
!statBufferValidDescription
TRUEevaluated 84841 times by 259 tests
Evaluated by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
FALSEevaluated 4739 times by 56 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirModel
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • ...
1248-89580
483 statBufferValid = (QT_STAT(nativeFilePath, &statBuffer) == 0);
executed 84841 times by 259 tests: statBufferValid = (::stat64(nativeFilePath, &statBuffer) == 0);
Executed by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
84841
484-
485 if (statBufferValid)
statBufferValidDescription
TRUEevaluated 63905 times by 225 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • ...
FALSEevaluated 26923 times by 201 tests
Evaluated by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • ...
26923-63905
486 data.fillFromStatBuf(statBuffer);
executed 63905 times by 225 tests: data.fillFromStatBuf(statBuffer);
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • ...
63905
487 else {-
488 entryExists = false;-
489 data.creationTime_ = 0;-
490 data.modificationTime_ = 0;-
491 data.accessTime_ = 0;-
492 data.size_ = 0;-
493 data.userId_ = (uint) -2;-
494 data.groupId_ = (uint) -2;-
495 }
executed 26923 times by 201 tests: end of block
Executed by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • ...
26923
496-
497 // reset the mask-
498 data.knownFlagsMask |= QFileSystemMetaData::PosixStatFlags-
499 | QFileSystemMetaData::ExistsAttribute;-
500 }
executed 90828 times by 259 tests: end of block
Executed by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
90828
501-
502#if defined(Q_OS_DARWIN)-
503 if (what & QFileSystemMetaData::AliasType)-
504 {-
505 if (entryExists && hasResourcePropertyFlag(data, entry, kCFURLIsAliasFileKey))-
506 data.entryFlags |= QFileSystemMetaData::AliasType;-
507 data.knownFlagsMask |= QFileSystemMetaData::AliasType;-
508 }-
509#endif-
510-
511 if (what & QFileSystemMetaData::UserPermissions) {
what & QFileSy...serPermissionsDescription
TRUEevaluated 5819 times by 26 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QCompleter
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTemporaryDir
  • tst_QThreadStorage
  • tst_QTranslator
  • tst_languageChange
  • tst_qmakelib
  • ...
FALSEevaluated 125909 times by 259 tests
Evaluated by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
5819-125909
512 // calculate user permissions-
513-
514 if (entryExists) {
entryExistsDescription
TRUEevaluated 5819 times by 26 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QCompleter
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTemporaryDir
  • tst_QThreadStorage
  • tst_QTranslator
  • tst_languageChange
  • tst_qmakelib
  • ...
FALSEnever evaluated
0-5819
515 if (what & QFileSystemMetaData::UserReadPermission) {
what & QFileSy...ReadPermissionDescription
TRUEevaluated 5333 times by 23 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QCompleter
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTranslator
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
FALSEevaluated 486 times by 14 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_QThreadStorage
  • tst_languageChange
  • tst_qstandardpaths
486-5333
516 if (QT_ACCESS(nativeFilePath, R_OK) == 0)
::access(nativ...ePath, 4) == 0Description
TRUEevaluated 5267 times by 23 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QCompleter
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTranslator
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
FALSEevaluated 66 times by 8 tests
Evaluated by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLocalSocket
  • tst_QTranslator
  • tst_languageChange
66-5267
517 data.entryFlags |= QFileSystemMetaData::UserReadPermission;
executed 5267 times by 23 tests: data.entryFlags |= QFileSystemMetaData::UserReadPermission;
Executed by:
  • tst_QColorDialog
  • tst_QCompleter
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTranslator
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
5267
518 }
executed 5333 times by 23 tests: end of block
Executed by:
  • tst_QColorDialog
  • tst_QCompleter
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTranslator
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
5333
519 if (what & QFileSystemMetaData::UserWritePermission) {
what & QFileSy...ritePermissionDescription
TRUEevaluated 5671 times by 21 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QCompleter
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
FALSEevaluated 148 times by 9 tests
Evaluated by:
  • tst_QDir
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QThreadStorage
  • tst_QTranslator
  • tst_qstandardpaths
148-5671
520 if (QT_ACCESS(nativeFilePath, W_OK) == 0)
::access(nativ...ePath, 2) == 0Description
TRUEevaluated 4708 times by 18 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QCompleter
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QSaveFile
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
FALSEevaluated 963 times by 15 tests
Evaluated by:
  • tst_QCompleter
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QTemporaryDir
  • tst_languageChange
963-4708
521 data.entryFlags |= QFileSystemMetaData::UserWritePermission;
executed 4708 times by 18 tests: data.entryFlags |= QFileSystemMetaData::UserWritePermission;
Executed by:
  • tst_QColorDialog
  • tst_QCompleter
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QSaveFile
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
4708
522 }
executed 5671 times by 21 tests: end of block
Executed by:
  • tst_QColorDialog
  • tst_QCompleter
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
5671
523 if (what & QFileSystemMetaData::UserExecutePermission) {
what & QFileSy...cutePermissionDescription
TRUEevaluated 5223 times by 21 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QCompleter
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QThreadStorage
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
FALSEevaluated 596 times by 13 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTemporaryDir
  • tst_QTranslator
  • tst_languageChange
596-5223
524 if (QT_ACCESS(nativeFilePath, X_OK) == 0)
::access(nativ...ePath, 1) == 0Description
TRUEevaluated 3759 times by 14 tests
Evaluated by:
  • tst_QCompleter
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_languageChange
  • tst_qstandardpaths
FALSEevaluated 1464 times by 17 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_QSettings
  • tst_QThreadStorage
  • tst_languageChange
  • tst_qmakelib
1464-3759
525 data.entryFlags |= QFileSystemMetaData::UserExecutePermission;
executed 3759 times by 14 tests: data.entryFlags |= QFileSystemMetaData::UserExecutePermission;
Executed by:
  • tst_QCompleter
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_languageChange
  • tst_qstandardpaths
3759
526 }
executed 5223 times by 21 tests: end of block
Executed by:
  • tst_QColorDialog
  • tst_QCompleter
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QThreadStorage
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
5223
527 }
executed 5819 times by 26 tests: end of block
Executed by:
  • tst_QColorDialog
  • tst_QCompleter
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTemporaryDir
  • tst_QThreadStorage
  • tst_QTranslator
  • tst_languageChange
  • tst_qmakelib
  • ...
5819
528 data.knownFlagsMask |= (what & QFileSystemMetaData::UserPermissions);-
529 }
executed 5819 times by 26 tests: end of block
Executed by:
  • tst_QColorDialog
  • tst_QCompleter
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTemporaryDir
  • tst_QThreadStorage
  • tst_QTranslator
  • tst_languageChange
  • tst_qmakelib
  • ...
5819
530-
531 if (what & QFileSystemMetaData::HiddenAttribute-
532 && !data.isHidden()) {
!data.isHidden()Description
TRUEevaluated 41197 times by 147 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • ...
FALSEnever evaluated
0-41197
533 QString fileName = entry.fileName();-
534 if ((fileName.size() > 0 && fileName.at(0) == QLatin1Char('.'))
fileName.size() > 0Description
TRUEevaluated 41195 times by 147 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • ...
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QFileInfo
fileName.at(0)...atin1Char('.')Description
TRUEevaluated 1235 times by 15 tests
Evaluated by:
  • tst_QCompleter
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSslCertificate
  • tst_QTemporaryFile
  • tst_QUrl
  • tst_languageChange
FALSEevaluated 39960 times by 147 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • ...
2-41195
535#if defined(Q_OS_DARWIN)-
536 || (entryExists && hasResourcePropertyFlag(data, entry, kCFURLIsHiddenKey))-
537#endif-
538 )-
539 data.entryFlags |= QFileSystemMetaData::HiddenAttribute;
executed 1235 times by 15 tests: data.entryFlags |= QFileSystemMetaData::HiddenAttribute;
Executed by:
  • tst_QCompleter
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSslCertificate
  • tst_QTemporaryFile
  • tst_QUrl
  • tst_languageChange
1235
540 data.knownFlagsMask |= QFileSystemMetaData::HiddenAttribute;-
541 }
executed 41197 times by 147 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • ...
41197
542-
543#if defined(Q_OS_DARWIN)-
544 if (what & QFileSystemMetaData::BundleType) {-
545 if (entryExists && isPackage(data, entry))-
546 data.entryFlags |= QFileSystemMetaData::BundleType;-
547-
548 data.knownFlagsMask |= QFileSystemMetaData::BundleType;-
549 }-
550#endif-
551 if (!entryExists) {
!entryExistsDescription
TRUEevaluated 27047 times by 201 tests
Evaluated by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • ...
FALSEevaluated 104681 times by 225 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • ...
27047-104681
552 data.clearFlags(what);-
553 return false;
executed 27047 times by 201 tests: return false;
Executed by:
  • tst_Gestures
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • ...
27047
554 }-
555 return data.hasFlags(what);
executed 104681 times by 225 tests: return data.hasFlags(what);
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • ...
104681
556}-
557-
558//static-
559bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool createParents)-
560{-
561 QString dirName = entry.filePath();-
562 if (createParents) {
createParentsDescription
TRUEevaluated 398 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
FALSEevaluated 1425 times by 18 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_qstandardpaths
  • tst_uic
398-1425
563 dirName = QDir::cleanPath(dirName);-
564 for (int oldslash = -1, slash=0; slash != -1; oldslash = slash) {
slash != -1Description
TRUEevaluated 3059 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
FALSEnever evaluated
0-3059
565 slash = dirName.indexOf(QDir::separator(), oldslash+1);-
566 if (slash == -1) {
slash == -1Description
TRUEevaluated 794 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
FALSEevaluated 2265 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
794-2265
567 if (oldslash == dirName.length())
oldslash == dirName.length()Description
TRUEevaluated 396 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
FALSEevaluated 398 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
396-398
568 break;
executed 396 times by 13 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
396
569 slash = dirName.length();-
570 }
executed 398 times by 13 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
398
571 if (slash) {
slashDescription
TRUEevaluated 2266 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
FALSEevaluated 397 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
397-2266
572 const QByteArray chunk = QFile::encodeName(dirName.left(slash));-
573 if (QT_MKDIR(chunk.constData(), 0777) != 0) {
::mkdir(chunk....(), 0777) != 0Description
TRUEevaluated 1769 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
FALSEevaluated 497 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
497-1769
574 if (errno == EEXIST
(*__errno_location ()) == 17Description
TRUEevaluated 1769 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
FALSEnever evaluated
0-1769
575#if defined(Q_OS_QNX)-
576 // On QNX the QNet (VFS paths of other hosts mounted under a directory-
577 // such as /net) mountpoint returns ENOENT, despite existing. stat()-
578 // on the QNet mountpoint returns successfully and reports S_IFDIR.-
579 || errno == ENOENT-
580#endif-
581 ) {-
582 QT_STATBUF st;-
583 if (QT_STAT(chunk.constData(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR)
::stat64(chunk...a(), &st) == 0Description
TRUEevaluated 1769 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
FALSEnever evaluated
(st.st_mode & ...00) == 0040000Description
TRUEevaluated 1767 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
FALSEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_qmakelib
0-1769
584 continue;
executed 1767 times by 13 tests: continue;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
1767
585 }
executed 2 times by 2 tests: end of block
Executed by:
  • tst_QDir
  • tst_qmakelib
2
586 return false;
executed 2 times by 2 tests: return false;
Executed by:
  • tst_QDir
  • tst_qmakelib
2
587 }-
588 }
executed 497 times by 13 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
497
589 }
executed 894 times by 13 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
894
590 return true;
executed 396 times by 13 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_selftests - unknown status
396
591 }-
592#if defined(Q_OS_DARWIN) // Mac X doesn't support trailing /'s-
593 if (dirName.endsWith(QLatin1Char('/')))-
594 dirName.chop(1);-
595#endif-
596 return (QT_MKDIR(QFile::encodeName(dirName).constData(), 0777) == 0);
executed 1425 times by 18 tests: return (::mkdir(QFile::encodeName(dirName).constData(), 0777) == 0);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_qstandardpaths
  • tst_uic
1425
597}-
598-
599//static-
600bool QFileSystemEngine::removeDirectory(const QFileSystemEntry &entry, bool removeEmptyParents)-
601{-
602 if (removeEmptyParents) {
removeEmptyParentsDescription
TRUEevaluated 79 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_selftests - unknown status
FALSEevaluated 2734 times by 55 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QIcon
  • tst_QImageWriter
  • tst_QItemModel
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedPointer
  • tst_QSql
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_QXmlStream
  • ...
79-2734
603 QString dirName = QDir::cleanPath(entry.filePath());-
604 for (int oldslash = 0, slash=dirName.length(); slash > 0; oldslash = slash) {
slash > 0Description
TRUEevaluated 182 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_selftests - unknown status
FALSEnever evaluated
0-182
605 const QByteArray chunk = QFile::encodeName(dirName.left(slash));-
606 QT_STATBUF st;-
607 if (QT_STAT(chunk.constData(), &st) != -1) {
::stat64(chunk...(), &st) != -1Description
TRUEevaluated 179 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_selftests - unknown status
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDir
3-179
608 if ((st.st_mode & S_IFMT) != S_IFDIR)
(st.st_mode & ...00) != 0040000Description
TRUEnever evaluated
FALSEevaluated 179 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_selftests - unknown status
0-179
609 return false;
never executed: return false;
0
610 if (::rmdir(chunk.constData()) != 0)
::rmdir(chunk....stData()) != 0Description
TRUEevaluated 76 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_selftests - unknown status
FALSEevaluated 103 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_selftests - unknown status
76-103
611 return oldslash != 0;
executed 76 times by 2 tests: return oldslash != 0;
Executed by:
  • tst_QDir
  • tst_selftests - unknown status
76
612 } else {
executed 103 times by 2 tests: end of block
Executed by:
  • tst_QDir
  • tst_selftests - unknown status
103
613 return false;
executed 3 times by 1 test: return false;
Executed by:
  • tst_QDir
3
614 }-
615 slash = dirName.lastIndexOf(QDir::separator(), oldslash-1);-
616 }
executed 103 times by 2 tests: end of block
Executed by:
  • tst_QDir
  • tst_selftests - unknown status
103
617 return true;
never executed: return true;
0
618 }-
619 return rmdir(QFile::encodeName(entry.filePath()).constData()) == 0;
executed 2734 times by 55 tests: return rmdir(QFile::encodeName(entry.filePath()).constData()) == 0;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QIcon
  • tst_QImageWriter
  • tst_QItemModel
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedPointer
  • tst_QSql
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_QXmlStream
  • ...
2734
620}-
621-
622//static-
623bool QFileSystemEngine::createLink(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error)-
624{-
625 if (::symlink(source.nativeFilePath().constData(), target.nativeFilePath().constData()) == 0)
::symlink(sour...stData()) == 0Description
TRUEevaluated 161 times by 8 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_qstandardpaths
FALSEnever evaluated
0-161
626 return true;
executed 161 times by 8 tests: return true;
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_qstandardpaths
161
627 error = QSystemError(errno, QSystemError::StandardLibraryError);-
628 return false;
never executed: return false;
0
629}-
630-
631//static-
632bool QFileSystemEngine::copyFile(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error)-
633{-
634 Q_UNUSED(source);-
635 Q_UNUSED(target);-
636 error = QSystemError(ENOSYS, QSystemError::StandardLibraryError); //Function not implemented-
637 return false;
executed 100 times by 2 tests: return false;
Executed by:
  • tst_QFile
  • tst_QImageReader
100
638}-
639-
640//static-
641bool QFileSystemEngine::renameFile(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error)-
642{-
643 if (::rename(source.nativeFilePath().constData(), target.nativeFilePath().constData()) == 0)
::rename(sourc...stData()) == 0Description
TRUEevaluated 820 times by 20 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_languageChange
FALSEevaluated 4 times by 4 tests
Evaluated by:
  • tst_QDir
  • tst_QFile
  • tst_QSaveFile
  • tst_QTemporaryFile
4-820
644 return true;
executed 820 times by 20 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_languageChange
820
645 error = QSystemError(errno, QSystemError::StandardLibraryError);-
646 return false;
executed 4 times by 4 tests: return false;
Executed by:
  • tst_QDir
  • tst_QFile
  • tst_QSaveFile
  • tst_QTemporaryFile
4
647}-
648-
649//static-
650bool QFileSystemEngine::removeFile(const QFileSystemEntry &entry, QSystemError &error)-
651{-
652 if (unlink(entry.nativeFilePath().constData()) == 0)
unlink(entry.n...stData()) == 0Description
TRUEevaluated 12669 times by 76 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QLockFile
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • ...
FALSEevaluated 596 times by 21 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QIODevice
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedMemory
  • tst_QTextStream
  • tst_QXmlStream
  • tst_qmake
  • tst_qstandardpaths
  • tst_selftests - unknown status
596-12669
653 return true;
executed 12669 times by 76 tests: return true;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDataStream
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QIODevice
  • tst_QIcon
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QLockFile
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • ...
12669
654 error = QSystemError(errno, QSystemError::StandardLibraryError);-
655 return false;
executed 596 times by 21 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QIODevice
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedMemory
  • tst_QTextStream
  • tst_QXmlStream
  • tst_qmake
  • tst_qstandardpaths
  • tst_selftests - unknown status
596
656-
657}-
658-
659//static-
660bool QFileSystemEngine::setPermissions(const QFileSystemEntry &entry, QFile::Permissions permissions, QSystemError &error, QFileSystemMetaData *data)-
661{-
662 mode_t mode = 0;-
663 if (permissions & (QFile::ReadOwner | QFile::ReadUser))
permissions & ...ile::ReadUser)Description
TRUEevaluated 1056 times by 20 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
FALSEevaluated 19 times by 7 tests
Evaluated by:
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileSystemModel
  • tst_QLockFile
  • tst_QNetworkReply
  • tst_QSaveFile
19-1056
664 mode |= S_IRUSR;
executed 1056 times by 20 tests: mode |= 0400;
Executed by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
1056
665 if (permissions & (QFile::WriteOwner | QFile::WriteUser))
permissions & ...le::WriteUser)Description
TRUEevaluated 965 times by 20 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
FALSEevaluated 110 times by 11 tests
Evaluated by:
  • tst_QDir
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QIcon
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_QTemporaryDir
110-965
666 mode |= S_IWUSR;
executed 965 times by 20 tests: mode |= 0200;
Executed by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
965
667 if (permissions & (QFile::ExeOwner | QFile::ExeUser))
permissions & ...File::ExeUser)Description
TRUEevaluated 234 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QFileSystemModel
  • tst_QLockFile
  • tst_QSaveFile
  • tst_qmakelib
  • tst_qstandardpaths
FALSEevaluated 841 times by 20 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
234-841
668 mode |= S_IXUSR;
executed 234 times by 6 tests: mode |= 0100;
Executed by:
  • tst_QDir
  • tst_QFileSystemModel
  • tst_QLockFile
  • tst_QSaveFile
  • tst_qmakelib
  • tst_qstandardpaths
234
669 if (permissions & QFile::ReadGroup)
permissions & QFile::ReadGroupDescription
TRUEevaluated 761 times by 15 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
FALSEevaluated 314 times by 10 tests
Evaluated by:
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QLockFile
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QTemporaryDir
  • tst_qstandardpaths
314-761
670 mode |= S_IRGRP;
executed 761 times by 15 tests: mode |= (0400 >> 3);
Executed by:
  • tst_QColorDialog
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
761
671 if (permissions & QFile::WriteGroup)
permissions & ...le::WriteGroupDescription
TRUEnever evaluated
FALSEevaluated 1075 times by 22 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
0-1075
672 mode |= S_IWGRP;
never executed: mode |= (0200 >> 3);
0
673 if (permissions & QFile::ExeGroup)
permissions & QFile::ExeGroupDescription
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_qmakelib
  • tst_qstandardpaths
FALSEevaluated 1073 times by 21 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qstandardpaths
2-1073
674 mode |= S_IXGRP;
executed 2 times by 2 tests: mode |= (0100 >> 3);
Executed by:
  • tst_qmakelib
  • tst_qstandardpaths
2
675 if (permissions & QFile::ReadOther)
permissions & QFile::ReadOtherDescription
TRUEevaluated 762 times by 15 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
FALSEevaluated 313 times by 11 tests
Evaluated by:
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QLockFile
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QTemporaryDir
  • tst_qstandardpaths
313-762
676 mode |= S_IROTH;
executed 762 times by 15 tests: mode |= ((0400 >> 3) >> 3);
Executed by:
  • tst_QColorDialog
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
762
677 if (permissions & QFile::WriteOther)
permissions & ...le::WriteOtherDescription
TRUEevaluated 218 times by 2 tests
Evaluated by:
  • tst_QFile
  • tst_QFileSystemModel
FALSEevaluated 857 times by 22 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
218-857
678 mode |= S_IWOTH;
executed 218 times by 2 tests: mode |= ((0200 >> 3) >> 3);
Executed by:
  • tst_QFile
  • tst_QFileSystemModel
218
679 if (permissions & QFile::ExeOther)
permissions & QFile::ExeOtherDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QFileSystemWatcher
  • tst_qmakelib
FALSEevaluated 1071 times by 21 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qstandardpaths
4-1071
680 mode |= S_IXOTH;
executed 4 times by 2 tests: mode |= ((0100 >> 3) >> 3);
Executed by:
  • tst_QFileSystemWatcher
  • tst_qmakelib
4
681-
682 bool success = ::chmod(entry.nativeFilePath().constData(), mode) == 0;-
683 if (success && data) {
successDescription
TRUEevaluated 1074 times by 22 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
dataDescription
TRUEnever evaluated
FALSEevaluated 1074 times by 22 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
0-1074
684 data->entryFlags &= ~QFileSystemMetaData::Permissions;-
685 data->entryFlags |= QFileSystemMetaData::MetaDataFlag(uint(permissions));-
686 data->knownFlagsMask |= QFileSystemMetaData::Permissions;-
687 }
never executed: end of block
0
688 if (!success)
!successDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 1074 times by 22 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
1-1074
689 error = QSystemError(errno, QSystemError::StandardLibraryError);
executed 1 time by 1 test: error = QSystemError((*__errno_location ()), QSystemError::StandardLibraryError);
Executed by:
  • tst_QFile
1
690 return success;
executed 1075 times by 22 tests: return success;
Executed by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
1075
691}-
692-
693QString QFileSystemEngine::homePath()-
694{-
695 QString home = QFile::decodeName(qgetenv("HOME"));-
696 if (home.isEmpty())
home.isEmpty()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDir
FALSEevaluated 4647 times by 68 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDirModel
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontComboBox
  • ...
1-4647
697 home = rootPath();
executed 1 time by 1 test: home = rootPath();
Executed by:
  • tst_QDir
1
698 return QDir::cleanPath(home);
executed 4648 times by 68 tests: return QDir::cleanPath(home);
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDirModel
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontComboBox
  • ...
4648
699}-
700-
701QString QFileSystemEngine::rootPath()-
702{-
703 return QLatin1String("/");
executed 122 times by 16 tests: return QLatin1String("/");
Executed by:
  • tst_QCompleter
  • tst_QDir
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStorageInfo
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_languageChange
122
704}-
705-
706QString QFileSystemEngine::tempPath()-
707{-
708#ifdef QT_UNIX_TEMP_PATH_OVERRIDE-
709 return QLatin1String(QT_UNIX_TEMP_PATH_OVERRIDE);-
710#else-
711 QString temp = QFile::decodeName(qgetenv("TMPDIR"));-
712 if (temp.isEmpty()) {
temp.isEmpty()Description
TRUEevaluated 8783 times by 49 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCompleter
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGuiApplication
  • tst_QIODevice
  • tst_QIcon
  • tst_QImageWriter
  • tst_QItemModel
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QPdfWriter
  • tst_QPixmap
  • ...
FALSEnever evaluated
0-8783
713#if defined(Q_OS_DARWIN) && !defined(QT_BOOTSTRAPPED)-
714 if (NSString *nsPath = NSTemporaryDirectory()) {-
715 temp = QString::fromCFString((CFStringRef)nsPath);-
716 } else {-
717#else-
718 {-
719#endif-
720 temp = QLatin1String("/tmp");-
721 }-
722 }
executed 8783 times by 49 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCompleter
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGuiApplication
  • tst_QIODevice
  • tst_QIcon
  • tst_QImageWriter
  • tst_QItemModel
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QPdfWriter
  • tst_QPixmap
  • ...
8783
723 return QDir::cleanPath(temp);
executed 8783 times by 49 tests: return QDir::cleanPath(temp);
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QCompleter
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGuiApplication
  • tst_QIODevice
  • tst_QIcon
  • tst_QImageWriter
  • tst_QItemModel
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QPdfWriter
  • tst_QPixmap
  • ...
8783
724#endif-
725}-
726-
727bool QFileSystemEngine::setCurrentPath(const QFileSystemEntry &path)-
728{-
729 int r;-
730 r = QT_CHDIR(path.nativeFilePath().constData());-
731 return r >= 0;
executed 494 times by 25 tests: return r >= 0;
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QApplication
  • tst_QClipboard
  • tst_QDataStream
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileInfo
  • tst_QIODevice
  • tst_QLockFile
  • tst_QObject
  • tst_QProcess
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_QTextBrowser
  • tst_QTextStream
  • tst_QTranslator
  • tst_QUuid
  • tst_QXmlSimpleReader
  • tst_Selftests
  • tst_qlibrary - unknown status
  • tst_qmake
  • tst_qstandardpaths
  • tst_rcc
494
732}-
733-
734QFileSystemEntry QFileSystemEngine::currentPath()-
735{-
736 QFileSystemEntry result;-
737#if defined(__GLIBC__) && !defined(PATH_MAX)-
738 char *currentName = ::get_current_dir_name();-
739 if (currentName) {-
740 result = QFileSystemEntry(QByteArray(currentName), QFileSystemEntry::FromNativePath());-
741 ::free(currentName);-
742 }-
743#else-
744 char currentName[PATH_MAX+1];-
745 if (::getcwd(currentName, PATH_MAX)) {
::getcwd(currentName, 4096)Description
TRUEevaluated 2311 times by 56 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QCoreApplication
  • tst_QDataStream
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIODevice
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QLocale
  • tst_QMimeDatabase
  • ...
FALSEnever evaluated
0-2311
746#if defined(Q_OS_VXWORKS) && defined(VXWORKS_VXSIM)-
747 QByteArray dir(currentName);-
748 if (dir.indexOf(':') < dir.indexOf('/'))-
749 dir.remove(0, dir.indexOf(':')+1);-
750-
751 qstrncpy(currentName, dir.constData(), PATH_MAX);-
752#endif-
753 result = QFileSystemEntry(QByteArray(currentName), QFileSystemEntry::FromNativePath());-
754 }
executed 2311 times by 56 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QCoreApplication
  • tst_QDataStream
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIODevice
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QLocale
  • tst_QMimeDatabase
  • ...
2311
755# if defined(QT_DEBUG)-
756 if (result.isEmpty())
result.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 2311 times by 56 tests
Evaluated by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QCoreApplication
  • tst_QDataStream
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIODevice
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QLocale
  • tst_QMimeDatabase
  • ...
0-2311
757 qWarning("QFileSystemEngine::currentPath: getcwd() failed");
never executed: QMessageLogger(__FILE__, 757, __PRETTY_FUNCTION__).warning("QFileSystemEngine::currentPath: getcwd() failed");
0
758# endif-
759#endif-
760 return result;
executed 2311 times by 56 tests: return result;
Executed by:
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QCoreApplication
  • tst_QDataStream
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QIODevice
  • tst_QIcon
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QLocale
  • tst_QMimeDatabase
  • ...
2311
761}-
762QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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