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) 2017 Intel Corporation.-
4** Copyright (C) 2015 The Qt Company Ltd.-
5** Copyright (C) 2013 Samuel Gaist <samuel.gaist@edeltech.ch>-
6** Contact: http://www.qt.io/licensing/-
7**-
8** This file is part of the QtCore module of the Qt Toolkit.-
9**-
10** $QT_BEGIN_LICENSE:LGPL21$-
11** Commercial License Usage-
12** Licensees holding valid commercial Qt licenses may use this file in-
13** accordance with the commercial license agreement provided with the-
14** Software or, alternatively, in accordance with the terms contained in-
15** a written agreement between you and The Qt Company. For licensing terms-
16** and conditions see http://www.qt.io/terms-conditions. For further-
17** information use the contact form at http://www.qt.io/contact-us.-
18**-
19** GNU Lesser General Public License Usage-
20** Alternatively, this file may be used under the terms of the GNU Lesser-
21** General Public License version 2.1 or version 3 as published by the Free-
22** Software Foundation and appearing in the file LICENSE.LGPLv21 and-
23** LICENSE.LGPLv3 included in the packaging of this file. Please review the-
24** following information to ensure the GNU Lesser General Public License-
25** requirements will be met: https://www.gnu.org/licenses/lgpl.html and-
26** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.-
27**-
28** As a special exception, The Qt Company gives you certain additional-
29** rights. These rights are described in The Qt Company LGPL Exception-
30** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.-
31**-
32** $QT_END_LICENSE$-
33**-
34****************************************************************************/-
35-
36#include "qplatformdefs.h"-
37#include "qfilesystemengine_p.h"-
38#include "qfile.h"-
39-
40#include <QtCore/qvarlengtharray.h>-
41-
42#include <stdlib.h> // for realpath()-
43#include <sys/types.h>-
44#include <sys/stat.h>-
45#include <unistd.h>-
46#include <stdio.h>-
47#include <errno.h>-
48-
49-
50#if defined(Q_OS_MAC)-
51# include <QtCore/private/qcore_mac_p.h>-
52# include <CoreFoundation/CFBundle.h>-
53#endif-
54-
55#ifdef Q_OS_OSX-
56#include <CoreServices/CoreServices.h>-
57#endif-
58-
59#ifdef Q_OS_IOS-
60#include <MobileCoreServices/MobileCoreServices.h>-
61#endif-
62-
63#if defined(Q_OS_DARWIN)-
64// We cannot include <Foundation/Foundation.h> (it's an Objective-C header), but-
65// we need these declarations:-
66Q_FORWARD_DECLARE_OBJC_CLASS(NSString);-
67extern "C" NSString *NSTemporaryDirectory();-
68#endif-
69-
70QT_BEGIN_NAMESPACE-
71-
72#if defined(Q_OS_DARWIN)-
73static inline bool hasResourcePropertyFlag(const QFileSystemMetaData &data,-
74 const QFileSystemEntry &entry,-
75 CFStringRef key)-
76{-
77 QCFString path = CFStringCreateWithFileSystemRepresentation(0,-
78 entry.nativeFilePath().constData());-
79 if (!path)-
80 return false;-
81-
82 QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, path, kCFURLPOSIXPathStyle,-
83 data.hasFlags(QFileSystemMetaData::DirectoryType));-
84 if (!url)-
85 return false;-
86-
87 CFBooleanRef value;-
88 if (CFURLCopyResourcePropertyForKey(url, key, &value, NULL)) {-
89 if (value == kCFBooleanTrue)-
90 return true;-
91 }-
92-
93 return false;-
94}-
95-
96static bool isPackage(const QFileSystemMetaData &data, const QFileSystemEntry &entry)-
97{-
98 if (!data.isDirectory())-
99 return false;-
100-
101 QFileInfo info(entry.filePath());-
102 QString suffix = info.suffix();-
103-
104 if (suffix.length() > 0) {-
105 // First step: is the extension known ?-
106 QCFType<CFStringRef> extensionRef = QCFString::toCFStringRef(suffix);-
107 QCFType<CFStringRef> uniformTypeIdentifier = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, extensionRef, NULL);-
108 if (UTTypeConformsTo(uniformTypeIdentifier, kUTTypeBundle))-
109 return true;-
110-
111 // Second step: check if an application knows the package type-
112 QCFType<CFStringRef> path = QCFString::toCFStringRef(entry.filePath());-
113 QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, path, kCFURLPOSIXPathStyle, true);-
114-
115 UInt32 type, creator;-
116 // Well created packages have the PkgInfo file-
117 if (CFBundleGetPackageInfoInDirectory(url, &type, &creator))-
118 return true;-
119-
120#ifdef Q_OS_OSX-
121 // Find if an application other than Finder claims to know how to handle the package-
122 QCFType<CFURLRef> application;-
123 LSGetApplicationForURL(url,-
124 kLSRolesEditor|kLSRolesViewer|kLSRolesViewer,-
125 NULL,-
126 &application);-
127-
128 if (application) {-
129 QCFType<CFBundleRef> bundle = CFBundleCreate(kCFAllocatorDefault, application);-
130 CFStringRef identifier = CFBundleGetIdentifier(bundle);-
131 QString applicationId = QCFString::toQString(identifier);-
132 if (applicationId != QLatin1String("com.apple.finder"))-
133 return true;-
134 }-
135#endif-
136 }-
137-
138 // Third step: check if the directory has the package bit set-
139 return hasResourcePropertyFlag(data, entry, kCFURLIsPackageKey);-
140}-
141#endif-
142-
143//static-
144QFileSystemEntry QFileSystemEngine::getLinkTarget(const QFileSystemEntry &link, QFileSystemMetaData &data)-
145{-
146#if defined(__GLIBC__) && !defined(PATH_MAX)-
147#define PATH_CHUNK_SIZE 256-
148 char *s = 0;-
149 int len = -1;-
150 int size = PATH_CHUNK_SIZE;-
151-
152 while (1) {-
153 s = (char *) ::realloc(s, size);-
154 Q_CHECK_PTR(s);-
155 len = ::readlink(link.nativeFilePath().constData(), s, size);-
156 if (len < 0) {-
157 ::free(s);-
158 break;-
159 }-
160 if (len < size) {-
161 break;-
162 }-
163 size *= 2;-
164 }-
165#else-
166 char s[PATH_MAX+1];-
167 int len = readlink(link.nativeFilePath().constData(), s, PATH_MAX);-
168#endif-
169 if (len > 0) {
len > 0Description
TRUEevaluated 398 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-398
170 QString ret;-
171 if (!data.hasFlags(QFileSystemMetaData::DirectoryType))
!data.hasFlags...DirectoryType)Description
TRUEevaluated 393 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-393
172 fillMetaData(link, data, QFileSystemMetaData::DirectoryType);
executed 393 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
393
173 if (data.isDirectory() && s[0] != '/') {
data.isDirectory()Description
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QFile
  • tst_QItemModel
FALSEevaluated 396 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-396
174 QDir parent(link.filePath());-
175 parent.cdUp();-
176 ret = parent.path();-
177 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
178 ret += QLatin1Char('/');
executed 1 time by 1 test: ret += QLatin1Char('/');
Executed by:
  • tst_QFile
1
179 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QFile
1
180 s[len] = '\0';-
181 ret += QFile::decodeName(QByteArray(s));-
182#if defined(__GLIBC__) && !defined(PATH_MAX)-
183 ::free(s);-
184#endif-
185-
186 if (!ret.startsWith(QLatin1Char('/'))) {
!ret.startsWit...tin1Char('/'))Description
TRUEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
FALSEevaluated 393 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-393
187 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
188 ret.prepend(link.filePath().left(link.filePath().lastIndexOf(QLatin1Char('/')))-
189 + QLatin1Char('/'));-
190 } else {
executed 1 time by 1 test: end of block
Executed by:
  • tst_QFile
1
191 ret.prepend(QDir::currentPath() + QLatin1Char('/'));-
192 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_QFile
  • tst_QFileInfo
4
193 }-
194 ret = QDir::cleanPath(ret);-
195 if (ret.size() > 1 && ret.endsWith(QLatin1Char('/')))
ret.size() > 1Description
TRUEevaluated 398 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 398 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-398
196 ret.chop(1);
never executed: ret.chop(1);
0
197 return QFileSystemEntry(ret);
executed 398 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
398
198 }-
199#if defined(Q_OS_DARWIN)-
200 {-
201 QCFString path = CFStringCreateWithFileSystemRepresentation(0,-
202 QFile::encodeName(QDir::cleanPath(link.filePath())).data());-
203 if (!path)-
204 return QFileSystemEntry();-
205-
206 QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, path, kCFURLPOSIXPathStyle,-
207 data.hasFlags(QFileSystemMetaData::DirectoryType));-
208 if (!url)-
209 return QFileSystemEntry();-
210-
211 QCFType<CFDataRef> bookmarkData = CFURLCreateBookmarkDataFromFile(0, url, NULL);-
212 if (!bookmarkData)-
213 return QFileSystemEntry();-
214-
215 QCFType<CFURLRef> resolvedUrl = CFURLCreateByResolvingBookmarkData(0,-
216 bookmarkData,-
217 (CFURLBookmarkResolutionOptions)(kCFBookmarkResolutionWithoutUIMask-
218 | kCFBookmarkResolutionWithoutMountingMask), NULL, NULL, NULL, NULL);-
219 if (!resolvedUrl)-
220 return QFileSystemEntry();-
221-
222 QCFString cfstr(CFURLCopyFileSystemPath(resolvedUrl, kCFURLPOSIXPathStyle));-
223 if (!cfstr)-
224 return QFileSystemEntry();-
225-
226 return QFileSystemEntry(QCFString::toQString(cfstr));-
227 }-
228#endif-
229 return QFileSystemEntry();
executed 1 time by 1 test: return QFileSystemEntry();
Executed by:
  • tst_QFileInfo
1
230}-
231-
232//static-
233QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry, QFileSystemMetaData &data)-
234{-
235 if (entry.isEmpty() || entry.isRoot())
entry.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 25130 times by 143 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 25096 times by 143 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-25130
236 return entry;
executed 34 times by 5 tests: return entry;
Executed by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QStorageInfo
34
237-
238#if !defined(Q_OS_MAC) && !defined(Q_OS_QNX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_HAIKU) && _POSIX_VERSION < 200809L-
239 // realpath(X,0) is not supported-
240 Q_UNUSED(data);-
241 return QFileSystemEntry(slowCanonicalized(absoluteName(entry).filePath()));-
242#else-
243 char *ret = 0;-
244# if defined(Q_OS_DARWIN)-
245 ret = (char*)malloc(PATH_MAX + 1);-
246 if (ret && realpath(entry.nativeFilePath().constData(), (char*)ret) == 0) {-
247 const int savedErrno = errno; // errno is checked below, and free() might change it-
248 free(ret);-
249 errno = savedErrno;-
250 ret = 0;-
251 }-
252# elif defined(Q_OS_ANDROID)-
253 // On some Android versions, realpath() will return a path even if it does not exist-
254 // To work around this, we check existence in advance.-
255 if (!data.hasFlags(QFileSystemMetaData::ExistsAttribute))-
256 fillMetaData(entry, data, QFileSystemMetaData::ExistsAttribute);-
257-
258 if (!data.exists()) {-
259 ret = 0;-
260 errno = ENOENT;-
261 } else {-
262 ret = (char*)malloc(PATH_MAX + 1);-
263 if (realpath(entry.nativeFilePath().constData(), (char*)ret) == 0) {-
264 const int savedErrno = errno; // errno is checked below, and free() might change it-
265 free(ret);-
266 errno = savedErrno;-
267 ret = 0;-
268 }-
269 }-
270-
271# else-
272# if _POSIX_VERSION >= 200801L-
273 ret = realpath(entry.nativeFilePath().constData(), (char*)0);-
274# else-
275 ret = (char*)malloc(PATH_MAX + 1);-
276 if (realpath(entry.nativeFilePath().constData(), (char*)ret) == 0) {-
277 const int savedErrno = errno; // errno is checked below, and free() might change it-
278 free(ret);-
279 errno = savedErrno;-
280 ret = 0;-
281 }-
282# endif-
283# endif-
284 if (ret) {
retDescription
TRUEevaluated 24454 times by 143 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 641 times by 8 tests
Evaluated by:
  • tst_QApplication
  • tst_QDir
  • tst_QFileInfo
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QStorageInfo
  • tst_qmakelib
641-24454
285 data.knownFlagsMask |= QFileSystemMetaData::ExistsAttribute;-
286 data.entryFlags |= QFileSystemMetaData::ExistsAttribute;-
287 QString canonicalPath = QDir::cleanPath(QFile::decodeName(ret));-
288 free(ret);-
289 return QFileSystemEntry(canonicalPath);
executed 24454 times by 143 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
  • ...
24454
290 } else if (errno == ENOENT) { // file doesn't exist
(*__errno_location ()) == 2Description
TRUEevaluated 641 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-641
291 data.knownFlagsMask |= QFileSystemMetaData::ExistsAttribute;-
292 data.entryFlags &= ~(QFileSystemMetaData::ExistsAttribute);-
293 return QFileSystemEntry();
executed 641 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
641
294 }-
295 return entry;
never executed: return entry;
0
296#endif-
297}-
298-
299//static-
300QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)-
301{-
302 if (entry.isAbsolute() && entry.isClean())
entry.isAbsolute()Description
TRUEevaluated 12847 times by 73 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 678 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 9657 times by 73 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 3190 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
  • ...
678-12847
303 return entry;
executed 9657 times by 73 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
  • ...
9657
304-
305 QByteArray orig = entry.nativeFilePath();-
306 QByteArray result;-
307 if (orig.isEmpty() || !orig.startsWith('/')) {
orig.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 3868 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 678 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 3190 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-3868
308 QFileSystemEntry cur(currentPath());-
309 result = cur.nativeFilePath();-
310 }
executed 678 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
  • ...
678
311 if (!orig.isEmpty() && !(orig.length() == 1 && orig[0] == '.')) {
!orig.isEmpty()Description
TRUEevaluated 3868 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 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 3610 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 257 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-3868
312 if (!result.isEmpty() && !result.endsWith('/'))
!result.isEmpty()Description
TRUEevaluated 421 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 3190 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 421 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-3190
313 result.append('/');
executed 421 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
421
314 result.append(orig);-
315 }
executed 3611 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
  • ...
3611
316-
317 if (result.length() == 1 && result[0] == '/')
result.length() == 1Description
TRUEnever evaluated
FALSEevaluated 3868 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-3868
318 return QFileSystemEntry(result, QFileSystemEntry::FromNativePath());
never executed: return QFileSystemEntry(result, QFileSystemEntry::FromNativePath());
0
319 const bool isDir = result.endsWith('/');-
320-
321 /* as long as QDir::cleanPath() operates on a QString we have to convert to a string here.-
322 * ideally we never convert to a string since that loses information. Please fix after-
323 * we get a QByteArray version of QDir::cleanPath()-
324 */-
325 QFileSystemEntry resultingEntry(result, QFileSystemEntry::FromNativePath());-
326 QString stringVersion = QDir::cleanPath(resultingEntry.filePath());-
327 if (isDir)
isDirDescription
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QFileInfo
  • tst_QFiledialog
FALSEevaluated 3865 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-3865
328 stringVersion.append(QLatin1Char('/'));
executed 3 times by 2 tests: stringVersion.append(QLatin1Char('/'));
Executed by:
  • tst_QFileInfo
  • tst_QFiledialog
3
329 return QFileSystemEntry(stringVersion);
executed 3868 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
  • ...
3868
330}-
331-
332//static-
333QByteArray QFileSystemEngine::id(const QFileSystemEntry &entry)-
334{-
335 struct stat statResult;-
336 if (stat(entry.nativeFilePath().constData(), &statResult)) {
stat(entry.nat..., &statResult)Description
TRUEnever evaluated
FALSEnever evaluated
0
337 qErrnoWarning("stat() failed for '%s'", entry.nativeFilePath().constData());-
338 return QByteArray();
never executed: return QByteArray();
0
339 }-
340 QByteArray result = QByteArray::number(quint64(statResult.st_dev), 16);-
341 result += ':';-
342 result += QByteArray::number(quint64(statResult.st_ino));-
343 return result;
never executed: return result;
0
344}-
345-
346//static-
347QString QFileSystemEngine::resolveUserName(uint userId)-
348{-
349#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD)-
350 int size_max = sysconf(_SC_GETPW_R_SIZE_MAX);-
351 if (size_max == -1)
size_max == -1Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
0-1
352 size_max = 1024;
never executed: size_max = 1024;
0
353 QVarLengthArray<char, 1024> buf(size_max);-
354#endif-
355-
356 struct passwd *pw = 0;-
357#if !defined(Q_OS_INTEGRITY)-
358#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_VXWORKS)-
359 struct passwd entry;-
360 getpwuid_r(userId, &entry, buf.data(), buf.size(), &pw);-
361#else-
362 pw = getpwuid(userId);-
363#endif-
364#endif-
365 if (pw)
pwDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
FALSEnever evaluated
0-1
366 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
367 return QString();
never executed: return QString();
0
368}-
369-
370//static-
371QString QFileSystemEngine::resolveGroupName(uint groupId)-
372{-
373#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD)-
374 int size_max = sysconf(_SC_GETPW_R_SIZE_MAX);-
375 if (size_max == -1)
size_max == -1Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
0-1
376 size_max = 1024;
never executed: size_max = 1024;
0
377 QVarLengthArray<char, 1024> buf(size_max);-
378#endif-
379-
380 struct group *gr = 0;-
381#if !defined(Q_OS_INTEGRITY)-
382#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_VXWORKS)-
383 size_max = sysconf(_SC_GETGR_R_SIZE_MAX);-
384 if (size_max == -1)
size_max == -1Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
0-1
385 size_max = 1024;
never executed: size_max = 1024;
0
386 buf.resize(size_max);-
387 struct group entry;-
388 // Some large systems have more members than the POSIX max size-
389 // Loop over by doubling the buffer size (upper limit 250k)-
390 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
391 {-
392 buf.resize(size);-
393 // ERANGE indicates that the buffer was too small-
394 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
395 || errno != ERANGE)
(*__errno_location ()) != 34Description
TRUEnever evaluated
FALSEnever evaluated
0
396 break;
executed 1 time by 1 test: break;
Executed by:
  • tst_QFileInfo
1
397 }
never executed: end of block
0
398#else-
399 gr = getgrgid(groupId);-
400#endif-
401#endif-
402 if (gr)
grDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
FALSEnever evaluated
0-1
403 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
404 return QString();
never executed: return QString();
0
405}-
406-
407#if defined(Q_OS_DARWIN)-
408//static-
409QString QFileSystemEngine::bundleName(const QFileSystemEntry &entry)-
410{-
411 QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, QCFString(entry.filePath()),-
412 kCFURLPOSIXPathStyle, true);-
413 if (QCFType<CFDictionaryRef> dict = CFBundleCopyInfoDictionaryForURL(url)) {-
414 if (CFTypeRef name = (CFTypeRef)CFDictionaryGetValue(dict, kCFBundleNameKey)) {-
415 if (CFGetTypeID(name) == CFStringGetTypeID())-
416 return QCFString::toQString((CFStringRef)name);-
417 }-
418 }-
419 return QString();-
420}-
421#endif-
422-
423//static-
424bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemMetaData &data,-
425 QFileSystemMetaData::MetaDataFlags what)-
426{-
427#if defined(Q_OS_DARWIN)-
428 if (what & QFileSystemMetaData::BundleType) {-
429 if (!data.hasFlags(QFileSystemMetaData::DirectoryType))-
430 what |= QFileSystemMetaData::DirectoryType;-
431 }-
432 if (what & QFileSystemMetaData::HiddenAttribute) {-
433 // OS X >= 10.5: st_flags & UF_HIDDEN-
434 what |= QFileSystemMetaData::PosixStatFlags;-
435 }-
436#endif // defined(Q_OS_DARWIN)-
437-
438 if (what & QFileSystemMetaData::PosixStatFlags)
what & QFileSy...PosixStatFlagsDescription
TRUEevaluated 51918 times by 123 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QColorDialog
  • 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
  • tst_QFileDialog2
  • ...
FALSEevaluated 169910 times by 230 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
  • ...
51918-169910
439 what |= QFileSystemMetaData::PosixStatFlags;
executed 51918 times by 123 tests: what |= QFileSystemMetaData::PosixStatFlags;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QColorDialog
  • 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
  • tst_QFileDialog2
  • ...
51918
440-
441 if (what & QFileSystemMetaData::ExistsAttribute) {
what & QFileSy...xistsAttributeDescription
TRUEevaluated 129864 times by 251 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 91964 times by 168 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDebug
  • ...
91964-129864
442 // FIXME: Would other queries being performed provide this bit?-
443 what |= QFileSystemMetaData::PosixStatFlags;-
444 }
executed 129864 times by 251 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
  • ...
129864
445-
446 data.entryFlags &= ~what;-
447-
448 const char * nativeFilePath;-
449 int nativeFilePathLength;-
450 {-
451 const QByteArray &path = entry.nativeFilePath();-
452 nativeFilePath = path.constData();-
453 nativeFilePathLength = path.size();-
454 Q_UNUSED(nativeFilePathLength);-
455 }-
456-
457 bool entryExists = true; // innocent until proven otherwise-
458-
459 QT_STATBUF statBuffer;-
460 bool statBufferValid = false;-
461 if (what & QFileSystemMetaData::LinkType) {
what & QFileSy...Data::LinkTypeDescription
TRUEevaluated 7162 times by 82 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 214666 times by 258 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
  • ...
7162-214666
462 if (QT_LSTAT(nativeFilePath, &statBuffer) == 0) {
::lstat64(nati...atBuffer) == 0Description
TRUEevaluated 5799 times by 77 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 1363 times by 20 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileSystemModel
  • 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
1363-5799
463 if (S_ISLNK(statBuffer.st_mode)) {
((((statBuffer... == (0120000))Description
TRUEevaluated 1143 times by 25 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_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEevaluated 4656 times by 55 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_QImageReader
  • tst_QImageWriter
  • tst_QItemModel
  • ...
1143-4656
464 data.entryFlags |= QFileSystemMetaData::LinkType;-
465 } else {
executed 1143 times by 25 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_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1143
466 statBufferValid = true;-
467 data.entryFlags &= ~QFileSystemMetaData::PosixStatFlags;-
468 }
executed 4656 times by 55 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_QImageReader
  • tst_QImageWriter
  • tst_QItemModel
  • ...
4656
469 } else {-
470 entryExists = false;-
471 }
executed 1363 times by 20 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileSystemModel
  • 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
1363
472-
473 data.knownFlagsMask |= QFileSystemMetaData::LinkType;-
474 }
executed 7162 times by 82 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
  • ...
7162
475-
476 if (statBufferValid || (what & QFileSystemMetaData::PosixStatFlags)) {
statBufferValidDescription
TRUEevaluated 4656 times by 55 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_QImageReader
  • tst_QImageWriter
  • tst_QItemModel
  • ...
FALSEevaluated 217172 times by 258 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
  • ...
4656-217172
477 if (entryExists && !statBufferValid)
entryExistsDescription
TRUEevaluated 180166 times by 258 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 1239 times by 19 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QDirModel
  • tst_QFile
  • tst_QFileSystemModel
  • 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 175510 times by 258 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 4656 times by 55 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_QImageReader
  • tst_QImageWriter
  • tst_QItemModel
  • ...
1239-180166
478 statBufferValid = (QT_STAT(nativeFilePath, &statBuffer) == 0);
executed 175510 times by 258 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
  • ...
175510
479-
480 if (statBufferValid)
statBufferValidDescription
TRUEevaluated 58676 times by 223 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 122729 times by 200 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
  • ...
58676-122729
481 data.fillFromStatBuf(statBuffer);
executed 58676 times by 223 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
  • ...
58676
482 else {-
483 entryExists = false;-
484 data.creationTime_ = 0;-
485 data.modificationTime_ = 0;-
486 data.accessTime_ = 0;-
487 data.size_ = 0;-
488 data.userId_ = (uint) -2;-
489 data.groupId_ = (uint) -2;-
490 }
executed 122729 times by 200 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
  • ...
122729
491-
492 // reset the mask-
493 data.knownFlagsMask |= QFileSystemMetaData::PosixStatFlags-
494 | QFileSystemMetaData::ExistsAttribute;-
495 }
executed 181405 times by 258 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
  • ...
181405
496-
497#if defined(Q_OS_DARWIN)-
498 if (what & QFileSystemMetaData::AliasType)-
499 {-
500 if (entryExists && hasResourcePropertyFlag(data, entry, kCFURLIsAliasFileKey))-
501 data.entryFlags |= QFileSystemMetaData::AliasType;-
502 data.knownFlagsMask |= QFileSystemMetaData::AliasType;-
503 }-
504#endif-
505-
506 if (what & QFileSystemMetaData::UserPermissions) {
what & QFileSy...serPermissionsDescription
TRUEevaluated 5852 times by 25 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_QTemporaryDir
  • tst_QThreadStorage
  • tst_QTranslator
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
FALSEevaluated 215976 times by 258 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
  • ...
5852-215976
507 // calculate user permissions-
508-
509 if (entryExists) {
entryExistsDescription
TRUEevaluated 5852 times by 25 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_QTemporaryDir
  • tst_QThreadStorage
  • tst_QTranslator
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
FALSEnever evaluated
0-5852
510 if (what & QFileSystemMetaData::UserReadPermission) {
what & QFileSy...ReadPermissionDescription
TRUEevaluated 5369 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 483 times by 13 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_QThreadStorage
  • tst_languageChange
  • tst_qstandardpaths
483-5369
511 if (QT_ACCESS(nativeFilePath, R_OK) == 0)
::access(nativ...ePath, 4) == 0Description
TRUEevaluated 5305 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 64 times by 8 tests
Evaluated by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLocalSocket
  • tst_QTranslator
  • tst_languageChange
64-5305
512 data.entryFlags |= QFileSystemMetaData::UserReadPermission;
executed 5305 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
5305
513 }
executed 5369 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
5369
514 if (what & QFileSystemMetaData::UserWritePermission) {
what & QFileSy...ritePermissionDescription
TRUEevaluated 5705 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 147 times by 8 tests
Evaluated by:
  • tst_QDir
  • tst_QFileInfo
  • tst_QMimeDatabase
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QThreadStorage
  • tst_QTranslator
  • tst_qstandardpaths
147-5705
515 if (QT_ACCESS(nativeFilePath, W_OK) == 0)
::access(nativ...ePath, 2) == 0Description
TRUEevaluated 4746 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 959 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
959-4746
516 data.entryFlags |= QFileSystemMetaData::UserWritePermission;
executed 4746 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
4746
517 }
executed 5705 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
5705
518 if (what & QFileSystemMetaData::UserExecutePermission) {
what & QFileSy...cutePermissionDescription
TRUEevaluated 5258 times by 20 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QCompleter
  • 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_QThreadStorage
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
FALSEevaluated 594 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
594-5258
519 if (QT_ACCESS(nativeFilePath, X_OK) == 0)
::access(nativ...ePath, 1) == 0Description
TRUEevaluated 3750 times by 13 tests
Evaluated by:
  • tst_QCompleter
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_languageChange
  • tst_qstandardpaths
FALSEevaluated 1508 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
1508-3750
520 data.entryFlags |= QFileSystemMetaData::UserExecutePermission;
executed 3750 times by 13 tests: data.entryFlags |= QFileSystemMetaData::UserExecutePermission;
Executed by:
  • tst_QCompleter
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_languageChange
  • tst_qstandardpaths
3750
521 }
executed 5258 times by 20 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_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QThreadStorage
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
5258
522 }
executed 5852 times by 25 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_QTemporaryDir
  • tst_QThreadStorage
  • tst_QTranslator
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
5852
523 data.knownFlagsMask |= (what & QFileSystemMetaData::UserPermissions);-
524 }
executed 5852 times by 25 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_QTemporaryDir
  • tst_QThreadStorage
  • tst_QTranslator
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
5852
525-
526 if (what & QFileSystemMetaData::HiddenAttribute-
527 && !data.isHidden()) {
!data.isHidden()Description
TRUEevaluated 40859 times by 146 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-40859
528 QString fileName = entry.fileName();-
529 if ((fileName.size() > 0 && fileName.at(0) == QLatin1Char('.'))
fileName.size() > 0Description
TRUEevaluated 40857 times by 146 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 1201 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 39656 times by 146 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-40857
530#if defined(Q_OS_DARWIN)-
531 || (entryExists && hasResourcePropertyFlag(data, entry, kCFURLIsHiddenKey))-
532#endif-
533 )-
534 data.entryFlags |= QFileSystemMetaData::HiddenAttribute;
executed 1201 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
1201
535 data.knownFlagsMask |= QFileSystemMetaData::HiddenAttribute;-
536 }
executed 40859 times by 146 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
  • ...
40859
537-
538#if defined(Q_OS_DARWIN)-
539 if (what & QFileSystemMetaData::BundleType) {-
540 if (entryExists && isPackage(data, entry))-
541 data.entryFlags |= QFileSystemMetaData::BundleType;-
542-
543 data.knownFlagsMask |= QFileSystemMetaData::BundleType;-
544 }-
545#endif-
546 if (!entryExists) {
!entryExistsDescription
TRUEevaluated 122853 times by 200 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 98975 times by 223 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
  • ...
98975-122853
547 data.clearFlags(what);-
548 return false;
executed 122853 times by 200 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
  • ...
122853
549 }-
550 return data.hasFlags(what);
executed 98975 times by 223 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
  • ...
98975
551}-
552-
553static bool pathIsDir(const QByteArray &nativeName)-
554{-
555 // helper function to check if a given path is a directory, since mkdir can-
556 // fail if the dir already exists (it may have been created by another-
557 // thread or another process)-
558 QT_STATBUF st;-
559 return QT_STAT(nativeName.constData(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR;
executed 48 times by 5 tests: return ::stat64(nativeName.constData(), &st) == 0 && (st.st_mode & 0170000) == 0040000;
Executed by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_qmakelib
::stat64(nativ...a(), &st) == 0Description
TRUEevaluated 48 times by 5 tests
Evaluated by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_qmakelib
FALSEnever evaluated
(st.st_mode & ...00) == 0040000Description
TRUEevaluated 46 times by 5 tests
Evaluated by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_qmakelib
FALSEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_qmakelib
0-48
560};-
561-
562// Note: if \a shouldMkdirFirst is false, we assume the caller did try to mkdir-
563// before calling this function.-
564static bool createDirectoryWithParents(const QByteArray &nativeName, bool shouldMkdirFirst = true)-
565{-
566 if (shouldMkdirFirst && QT_MKDIR(nativeName, 0777) == 0)
shouldMkdirFirstDescription
TRUEevaluated 147 times by 7 tests
Evaluated by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_qmakelib
FALSEevaluated 153 times by 7 tests
Evaluated by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_qmakelib
::mkdir(nativeName, 0777) == 0Description
TRUEevaluated 107 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_qmakelib
FALSEevaluated 40 times by 4 tests
Evaluated by:
  • tst_QDir
  • tst_QFileInfo
  • tst_QMimeDatabase
  • tst_QSettings
40-153
567 return true;
executed 107 times by 6 tests: return true;
Executed by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_qmakelib
107
568 if (errno == EEXIST)
(*__errno_location ()) == 17Description
TRUEevaluated 48 times by 5 tests
Evaluated by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_qmakelib
FALSEevaluated 145 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_qmakelib
48-145
569 return pathIsDir(nativeName);
executed 48 times by 5 tests: return pathIsDir(nativeName);
Executed by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QNetworkDiskCache
  • tst_qmakelib
48
570 if (errno != ENOENT)
(*__errno_location ()) != 2Description
TRUEnever evaluated
FALSEevaluated 145 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_qmakelib
0-145
571 return false;
never executed: return false;
0
572-
573 // mkdir failed because the parent dir doesn't exist, so try to create it-
574 int slash = nativeName.lastIndexOf('/');-
575 if (slash < 1)
slash < 1Description
TRUEnever evaluated
FALSEevaluated 145 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_qmakelib
0-145
576 return false;
never executed: return false;
0
577-
578 QByteArray parentNativeName = nativeName.left(slash);-
579 if (!createDirectoryWithParents(parentNativeName))
!createDirecto...entNativeName)Description
TRUEnever evaluated
FALSEevaluated 145 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_qmakelib
0-145
580 return false;
never executed: return false;
0
581-
582 // try again-
583 if (QT_MKDIR(nativeName, 0777) == 0)
::mkdir(nativeName, 0777) == 0Description
TRUEevaluated 145 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_qmakelib
FALSEnever evaluated
0-145
584 return true;
executed 145 times by 6 tests: return true;
Executed by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_qmakelib
145
585 return errno == EEXIST && pathIsDir(nativeName);
never executed: return (*__errno_location ()) == 17 && pathIsDir(nativeName);
(*__errno_location ()) == 17Description
TRUEnever evaluated
FALSEnever evaluated
pathIsDir(nativeName)Description
TRUEnever evaluated
FALSEnever evaluated
0
586}-
587-
588//static-
589bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool createParents)-
590{-
591 QString dirName = entry.filePath();-
592-
593 // Darwin doesn't support trailing /'s, so remove for everyone-
594 while (dirName.size() > 1 && dirName.endsWith(QLatin1Char('/')))
dirName.size() > 1Description
TRUEevaluated 1940 times by 24 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
  • tst_selftests - unknown status
  • tst_uic
FALSEnever evaluated
dirName.endsWi...tin1Char('/'))Description
TRUEevaluated 134 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QFileInfo
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEevaluated 1806 times by 24 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
  • tst_selftests - unknown status
  • tst_uic
0-1940
595 dirName.chop(1);
executed 134 times by 6 tests: dirName.chop(1);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QFileInfo
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
134
596-
597 // try to mkdir this directory-
598 QByteArray nativeName = QFile::encodeName(dirName);-
599 if (QT_MKDIR(nativeName, 0777) == 0)
::mkdir(nativeName, 0777) == 0Description
TRUEevaluated 1357 times by 23 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • 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_QSettings
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
  • tst_selftests - unknown status
  • tst_uic
FALSEevaluated 449 times by 9 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_qmakelib
449-1357
600 return true;
executed 1357 times by 23 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QCompleter
  • 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_QSettings
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
  • tst_selftests - unknown status
  • tst_uic
1357
601 if (!createParents)
!createParentsDescription
TRUEevaluated 294 times by 4 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QNetworkDiskCache
FALSEevaluated 155 times by 7 tests
Evaluated by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_qmakelib
155-294
602 return false;
executed 294 times by 4 tests: return false;
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QNetworkDiskCache
294
603-
604 // we need the cleaned path in order to create the parents-
605 // and we save errno just in case encodeName needs to load codecs-
606 int savedErrno = errno;-
607 bool pathChanged;-
608 {-
609 QString cleanName = QDir::cleanPath(dirName);-
610-
611 // Check if the cleaned name is the same or not. If we were given a-
612 // path with resolvable "../" sections, cleanPath will remove them, but-
613 // this may change the target dir if one of those segments was a-
614 // symlink. This operation depends on cleanPath's optimization of-
615 // returning the original string if it didn't modify anything.-
616 pathChanged = !dirName.isSharedWith(cleanName);-
617 if (pathChanged)
pathChangedDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QFileInfo
FALSEevaluated 153 times by 7 tests
Evaluated by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_qmakelib
2-153
618 nativeName = QFile::encodeName(cleanName);
executed 2 times by 1 test: nativeName = QFile::encodeName(cleanName);
Executed by:
  • tst_QFileInfo
2
619 }-
620-
621 errno = savedErrno;-
622 return createDirectoryWithParents(nativeName, pathChanged);
executed 155 times by 7 tests: return createDirectoryWithParents(nativeName, pathChanged);
Executed by:
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_qmakelib
155
623}-
624-
625//static-
626bool QFileSystemEngine::removeDirectory(const QFileSystemEntry &entry, bool removeEmptyParents)-
627{-
628 if (removeEmptyParents) {
removeEmptyParentsDescription
TRUEevaluated 67 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_selftests - unknown status
FALSEevaluated 2730 times by 54 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_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
  • tst_languageChange
  • ...
67-2730
629 QString dirName = QDir::cleanPath(entry.filePath());-
630 for (int oldslash = 0, slash=dirName.length(); slash > 0; oldslash = slash) {
slash > 0Description
TRUEevaluated 154 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_selftests - unknown status
FALSEnever evaluated
0-154
631 const QByteArray chunk = QFile::encodeName(dirName.left(slash));-
632 QT_STATBUF st;-
633 if (QT_STAT(chunk.constData(), &st) != -1) {
::stat64(chunk...(), &st) != -1Description
TRUEevaluated 151 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_selftests - unknown status
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDir
3-151
634 if ((st.st_mode & S_IFMT) != S_IFDIR)
(st.st_mode & ...00) != 0040000Description
TRUEnever evaluated
FALSEevaluated 151 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_selftests - unknown status
0-151
635 return false;
never executed: return false;
0
636 if (::rmdir(chunk.constData()) != 0)
::rmdir(chunk....stData()) != 0Description
TRUEevaluated 64 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_selftests - unknown status
FALSEevaluated 87 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_selftests - unknown status
64-87
637 return oldslash != 0;
executed 64 times by 2 tests: return oldslash != 0;
Executed by:
  • tst_QDir
  • tst_selftests - unknown status
64
638 } else {
executed 87 times by 2 tests: end of block
Executed by:
  • tst_QDir
  • tst_selftests - unknown status
87
639 return false;
executed 3 times by 1 test: return false;
Executed by:
  • tst_QDir
3
640 }-
641 slash = dirName.lastIndexOf(QDir::separator(), oldslash-1);-
642 }
executed 87 times by 2 tests: end of block
Executed by:
  • tst_QDir
  • tst_selftests - unknown status
87
643 return true;
never executed: return true;
0
644 }-
645 return rmdir(QFile::encodeName(entry.filePath()).constData()) == 0;
executed 2730 times by 54 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_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
  • tst_languageChange
  • ...
2730
646}-
647-
648//static-
649bool QFileSystemEngine::createLink(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error)-
650{-
651 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
652 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
653 error = QSystemError(errno, QSystemError::StandardLibraryError);-
654 return false;
never executed: return false;
0
655}-
656-
657//static-
658bool QFileSystemEngine::copyFile(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error)-
659{-
660 Q_UNUSED(source);-
661 Q_UNUSED(target);-
662 error = QSystemError(ENOSYS, QSystemError::StandardLibraryError); //Function not implemented-
663 return false;
executed 100 times by 2 tests: return false;
Executed by:
  • tst_QFile
  • tst_QImageReader
100
664}-
665-
666//static-
667bool QFileSystemEngine::renameFile(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error)-
668{-
669 if (::rename(source.nativeFilePath().constData(), target.nativeFilePath().constData()) == 0)
::rename(sourc...stData()) == 0Description
TRUEevaluated 816 times by 19 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QColorDialog
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • 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-816
670 return true;
executed 816 times by 19 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_QImageReader
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_languageChange
816
671 error = QSystemError(errno, QSystemError::StandardLibraryError);-
672 return false;
executed 4 times by 4 tests: return false;
Executed by:
  • tst_QDir
  • tst_QFile
  • tst_QSaveFile
  • tst_QTemporaryFile
4
673}-
674-
675//static-
676bool QFileSystemEngine::removeFile(const QFileSystemEntry &entry, QSystemError &error)-
677{-
678 if (unlink(entry.nativeFilePath().constData()) == 0)
unlink(entry.n...stData()) == 0Description
TRUEevaluated 12129 times by 75 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_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QLockFile
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • ...
FALSEevaluated 584 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
584-12129
679 return true;
executed 12129 times by 75 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_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QLockFile
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • ...
12129
680 error = QSystemError(errno, QSystemError::StandardLibraryError);-
681 return false;
executed 584 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
584
682-
683}-
684-
685//static-
686bool QFileSystemEngine::setPermissions(const QFileSystemEntry &entry, QFile::Permissions permissions, QSystemError &error, QFileSystemMetaData *data)-
687{-
688 mode_t mode = 0;-
689 if (permissions & (QFile::ReadOwner | QFile::ReadUser))
permissions & ...ile::ReadUser)Description
TRUEevaluated 1052 times by 19 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • 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-1052
690 mode |= S_IRUSR;
executed 1052 times by 19 tests: mode |= 0400;
Executed by:
  • tst_QColorDialog
  • tst_QDir
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
1052
691 if (permissions & (QFile::WriteOwner | QFile::WriteUser))
permissions & ...le::WriteUser)Description
TRUEevaluated 963 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 108 times by 10 tests
Evaluated by:
  • tst_QDir
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_QTemporaryDir
108-963
692 mode |= S_IWUSR;
executed 963 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
963
693 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 837 times by 19 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_QTemporaryDir
  • tst_languageChange
234-837
694 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
695 if (permissions & QFile::ReadGroup)
permissions & QFile::ReadGroupDescription
TRUEevaluated 757 times by 14 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • 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-757
696 mode |= S_IRGRP;
executed 757 times by 14 tests: mode |= (0400 >> 3);
Executed by:
  • tst_QColorDialog
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
757
697 if (permissions & QFile::WriteGroup)
permissions & ...le::WriteGroupDescription
TRUEnever evaluated
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_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
0-1071
698 mode |= S_IWGRP;
never executed: mode |= (0200 >> 3);
0
699 if (permissions & QFile::ExeGroup)
permissions & QFile::ExeGroupDescription
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_qmakelib
  • tst_qstandardpaths
FALSEevaluated 1069 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_QTemporaryDir
  • tst_languageChange
  • tst_qstandardpaths
2-1069
700 mode |= S_IXGRP;
executed 2 times by 2 tests: mode |= (0100 >> 3);
Executed by:
  • tst_qmakelib
  • tst_qstandardpaths
2
701 if (permissions & QFile::ReadOther)
permissions & QFile::ReadOtherDescription
TRUEevaluated 758 times by 14 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • 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-758
702 mode |= S_IROTH;
executed 758 times by 14 tests: mode |= ((0400 >> 3) >> 3);
Executed by:
  • tst_QColorDialog
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMimeDatabase
  • tst_QSaveFile
  • tst_QSettings
  • tst_languageChange
  • tst_qmakelib
758
703 if (permissions & QFile::WriteOther)
permissions & ...le::WriteOtherDescription
TRUEevaluated 218 times by 2 tests
Evaluated by:
  • tst_QFile
  • tst_QFileSystemModel
FALSEevaluated 853 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_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
218-853
704 mode |= S_IWOTH;
executed 218 times by 2 tests: mode |= ((0200 >> 3) >> 3);
Executed by:
  • tst_QFile
  • tst_QFileSystemModel
218
705 if (permissions & QFile::ExeOther)
permissions & QFile::ExeOtherDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QFileSystemWatcher
  • tst_qmakelib
FALSEevaluated 1067 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_QTemporaryDir
  • tst_languageChange
  • tst_qstandardpaths
4-1067
706 mode |= S_IXOTH;
executed 4 times by 2 tests: mode |= ((0100 >> 3) >> 3);
Executed by:
  • tst_QFileSystemWatcher
  • tst_qmakelib
4
707-
708 bool success = ::chmod(entry.nativeFilePath().constData(), mode) == 0;-
709 if (success && data) {
successDescription
TRUEevaluated 1070 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_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 1070 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_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
0-1070
710 data->entryFlags &= ~QFileSystemMetaData::Permissions;-
711 data->entryFlags |= QFileSystemMetaData::MetaDataFlag(uint(permissions));-
712 data->knownFlagsMask |= QFileSystemMetaData::Permissions;-
713 }
never executed: end of block
0
714 if (!success)
!successDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 1070 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_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
1-1070
715 error = QSystemError(errno, QSystemError::StandardLibraryError);
executed 1 time by 1 test: error = QSystemError((*__errno_location ()), QSystemError::StandardLibraryError);
Executed by:
  • tst_QFile
1
716 return success;
executed 1071 times by 21 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_QImageReader
  • tst_QImageWriter
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTemporaryDir
  • tst_languageChange
  • tst_qmakelib
  • tst_qstandardpaths
1071
717}-
718-
719QString QFileSystemEngine::homePath()-
720{-
721 QString home = QFile::decodeName(qgetenv("HOME"));-
722 if (home.isEmpty())
home.isEmpty()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDir
FALSEevaluated 1926 times by 62 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QColorDialog
  • 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_QGlobal
  • tst_QGraphicsProxyWidget
  • ...
1-1926
723 home = rootPath();
executed 1 time by 1 test: home = rootPath();
Executed by:
  • tst_QDir
1
724 return QDir::cleanPath(home);
executed 1927 times by 62 tests: return QDir::cleanPath(home);
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QColorDialog
  • 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_QGlobal
  • tst_QGraphicsProxyWidget
  • ...
1927
725}-
726-
727QString QFileSystemEngine::rootPath()-
728{-
729 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
730}-
731-
732QString QFileSystemEngine::tempPath()-
733{-
734#ifdef QT_UNIX_TEMP_PATH_OVERRIDE-
735 return QLatin1String(QT_UNIX_TEMP_PATH_OVERRIDE);-
736#elif defined(Q_OS_BLACKBERRY)-
737 QString temp = QFile::decodeName(qgetenv("TEMP"));-
738 if (temp.isEmpty())-
739 temp = QFile::decodeName(qgetenv("TMPDIR"));-
740-
741 if (temp.isEmpty()) {-
742 qWarning("Neither the TEMP nor the TMPDIR environment variable is set, falling back to /var/tmp.");-
743 temp = QLatin1String("/var/tmp");-
744 }-
745 return QDir::cleanPath(temp);-
746#else-
747 QString temp = QFile::decodeName(qgetenv("TMPDIR"));-
748 if (temp.isEmpty()) {
temp.isEmpty()Description
TRUEevaluated 8777 times by 48 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_QImageWriter
  • tst_QItemModel
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QPdfWriter
  • tst_QPixmap
  • tst_QSaveFile
  • ...
FALSEnever evaluated
0-8777
749#if defined(Q_OS_DARWIN) && !defined(QT_BOOTSTRAPPED)-
750 if (NSString *nsPath = NSTemporaryDirectory()) {-
751 temp = QString::fromCFString((CFStringRef)nsPath);-
752 } else {-
753#else-
754 {-
755#endif-
756 temp = QLatin1String("/tmp");-
757 }-
758 }
executed 8777 times by 48 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_QImageWriter
  • tst_QItemModel
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QPdfWriter
  • tst_QPixmap
  • tst_QSaveFile
  • ...
8777
759 return QDir::cleanPath(temp);
executed 8777 times by 48 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_QImageWriter
  • tst_QItemModel
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QPdfWriter
  • tst_QPixmap
  • tst_QSaveFile
  • ...
8777
760#endif-
761}-
762-
763bool QFileSystemEngine::setCurrentPath(const QFileSystemEntry &path)-
764{-
765 int r;-
766 r = QT_CHDIR(path.nativeFilePath().constData());-
767 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
768}-
769-
770QFileSystemEntry QFileSystemEngine::currentPath()-
771{-
772 QFileSystemEntry result;-
773#if defined(__GLIBC__) && !defined(PATH_MAX)-
774 char *currentName = ::get_current_dir_name();-
775 if (currentName) {-
776 result = QFileSystemEntry(QByteArray(currentName), QFileSystemEntry::FromNativePath());-
777 ::free(currentName);-
778 }-
779#else-
780 char currentName[PATH_MAX+1];-
781 if (::getcwd(currentName, PATH_MAX)) {
::getcwd(currentName, 4096)Description
TRUEevaluated 2175 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-2175
782#if defined(Q_OS_VXWORKS) && defined(VXWORKS_VXSIM)-
783 QByteArray dir(currentName);-
784 if (dir.indexOf(':') < dir.indexOf('/'))-
785 dir.remove(0, dir.indexOf(':')+1);-
786-
787 qstrncpy(currentName, dir.constData(), PATH_MAX);-
788#endif-
789 result = QFileSystemEntry(QByteArray(currentName), QFileSystemEntry::FromNativePath());-
790 }
executed 2175 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
  • ...
2175
791# if defined(QT_DEBUG)-
792 if (result.isEmpty())
result.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 2175 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-2175
793 qWarning("QFileSystemEngine::currentPath: getcwd() failed");
never executed: QMessageLogger(__FILE__, 793, __PRETTY_FUNCTION__).warning("QFileSystemEngine::currentPath: getcwd() failed");
0
794# endif-
795#endif-
796 return result;
executed 2175 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
  • ...
2175
797}-
798QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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