OpenCoverage

qstandardpaths.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/io/qstandardpaths.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9static bool existsAsSpecified(const QString &path, QStandardPaths::LocateOptions options)-
10{-
11 if (options & QStandardPaths::LocateDirectory
options & QSta...ocateDirectoryDescription
TRUEevaluated 119 times by 2 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_qstandardpaths
FALSEevaluated 9797 times by 48 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDnsLookup_Appless
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QLoggingRegistry
  • ...
)
119-9797
12 return
executed 119 times by 2 tests: return QDir(path).exists();
Executed by:
  • tst_QMimeDatabase
  • tst_qstandardpaths
QDir(path).exists();
executed 119 times by 2 tests: return QDir(path).exists();
Executed by:
  • tst_QMimeDatabase
  • tst_qstandardpaths
119
13 return
executed 9797 times by 48 tests: return QFileInfo(path).isFile();
Executed by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDnsLookup_Appless
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QLoggingRegistry
  • ...
QFileInfo(path).isFile();
executed 9797 times by 48 tests: return QFileInfo(path).isFile();
Executed by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDnsLookup_Appless
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QLoggingRegistry
  • ...
9797
14}-
15QString QStandardPaths::locate(StandardLocation type, const QString &fileName, LocateOptions options)-
16{-
17 const QStringList &dirs = standardLocations(type);-
18 for (QStringList::const_iterator dir = dirs.constBegin(); dir != dirs.constEnd()
dir != dirs.constEnd()Description
TRUEevaluated 2163 times by 25 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qstandardpaths
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEevaluated 1080 times by 25 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qstandardpaths
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
; ++dir) {
1080-2163
19 const QString path = *dir + QLatin1Char('/') + fileName;-
20 if (existsAsSpecified(path, options)
existsAsSpecif...path, options)Description
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QLoggingRegistry
  • tst_qstandardpaths
FALSEevaluated 2160 times by 25 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qstandardpaths
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
)
3-2160
21 return
executed 3 times by 2 tests: return path;
Executed by:
  • tst_QLoggingRegistry
  • tst_qstandardpaths
path;
executed 3 times by 2 tests: return path;
Executed by:
  • tst_QLoggingRegistry
  • tst_qstandardpaths
3
22 }
executed 2160 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_QGlobal
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qstandardpaths
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
2160
23 return
executed 1080 times by 25 tests: return QString();
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qstandardpaths
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
QString();
executed 1080 times by 25 tests: return QString();
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qstandardpaths
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1080
24}-
25QStringList QStandardPaths::locateAll(StandardLocation type, const QString &fileName, LocateOptions options)-
26{-
27 const QStringList &dirs = standardLocations(type);-
28 QStringList result;-
29 for (QStringList::const_iterator dir = dirs.constBegin(); dir != dirs.constEnd()
dir != dirs.constEnd()Description
TRUEevaluated 7753 times by 25 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QToolButton
  • tst_languageChange
  • tst_qmimetype
  • tst_qstandardpaths
FALSEevaluated 2631 times by 25 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QToolButton
  • tst_languageChange
  • tst_qmimetype
  • tst_qstandardpaths
; ++dir) {
2631-7753
30 const QString path = *dir + QLatin1Char('/') + fileName;-
31 if (existsAsSpecified(path, options)
existsAsSpecif...path, options)Description
TRUEevaluated 2690 times by 24 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QToolButton
  • tst_languageChange
  • tst_qstandardpaths
FALSEevaluated 5063 times by 25 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QToolButton
  • tst_languageChange
  • tst_qmimetype
  • tst_qstandardpaths
)
2690-5063
32 result.append(path);
executed 2690 times by 24 tests: result.append(path);
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QToolButton
  • tst_languageChange
  • tst_qstandardpaths
2690
33 }
executed 7753 times by 25 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QToolButton
  • tst_languageChange
  • tst_qmimetype
  • tst_qstandardpaths
7753
34 return
executed 2631 times by 25 tests: return result;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QToolButton
  • tst_languageChange
  • tst_qmimetype
  • tst_qstandardpaths
result;
executed 2631 times by 25 tests: return result;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QToolButton
  • tst_languageChange
  • tst_qmimetype
  • tst_qstandardpaths
2631
35}-
36static QString checkExecutable(const QString &path)-
37{-
38 const QFileInfo info(path);-
39 if (info.isBundle()
info.isBundle()Description
TRUEnever evaluated
FALSEevaluated 239 times by 4 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
)
0-239
40 return
never executed: return info.bundleName();
info.bundleName();
never executed: return info.bundleName();
0
41 if (info.isFile()
info.isFile()Description
TRUEevaluated 13 times by 3 tests
Evaluated by:
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
FALSEevaluated 226 times by 4 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
&& info.isExecutable()
info.isExecutable()Description
TRUEevaluated 13 times by 3 tests
Evaluated by:
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
FALSEnever evaluated
)
0-226
42 return
executed 13 times by 3 tests: return QDir::cleanPath(path);
Executed by:
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
QDir::cleanPath(path);
executed 13 times by 3 tests: return QDir::cleanPath(path);
Executed by:
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
13
43 return
executed 226 times by 4 tests: return QString();
Executed by:
  • tst_NetworkSelfTest
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
QString();
executed 226 times by 4 tests: return QString();
Executed by:
  • tst_NetworkSelfTest
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
226
44}-
45-
46static inline QString searchExecutable(const QStringList &searchPaths,-
47 const QString &executableName)-
48{-
49 const QDir currentDir = QDir::current();-
50 for (const QString &searchPath : searchPaths) {-
51 const QString candidate = currentDir.absoluteFilePath(searchPath + QLatin1Char('/') + executableName);-
52 const QString absPath = checkExecutable(candidate);-
53 if (!absPath.isEmpty()
!absPath.isEmpty()Description
TRUEevaluated 12 times by 3 tests
Evaluated by:
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
FALSEevaluated 225 times by 4 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
)
12-225
54 return
executed 12 times by 3 tests: return absPath;
Executed by:
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
absPath;
executed 12 times by 3 tests: return absPath;
Executed by:
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
12
55 }
executed 225 times by 4 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
225
56 return
executed 3 times by 2 tests: return QString();
Executed by:
  • tst_NetworkSelfTest
  • tst_qstandardpaths
QString();
executed 3 times by 2 tests: return QString();
Executed by:
  • tst_NetworkSelfTest
  • tst_qstandardpaths
3
57}-
58QString QStandardPaths::findExecutable(const QString &executableName, const QStringList &paths)-
59{-
60 if (QFileInfo(executableName).isAbsolute()
QFileInfo(exec...).isAbsolute()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qstandardpaths
FALSEevaluated 15 times by 4 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
)
2-15
61 return
executed 2 times by 1 test: return checkExecutable(executableName);
Executed by:
  • tst_qstandardpaths
checkExecutable(executableName);
executed 2 times by 1 test: return checkExecutable(executableName);
Executed by:
  • tst_qstandardpaths
2
62-
63 QStringList searchPaths = paths;-
64 if (paths.isEmpty()
paths.isEmpty()Description
TRUEevaluated 15 times by 4 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
FALSEnever evaluated
) {
0-15
65 QByteArray pEnv = qgetenv("PATH");-
66-
67 const QStringList rawPaths = QString::fromLocal8Bit(pEnv.constData()).split(QDir::listSeparator(), QString::SkipEmptyParts);-
68 searchPaths.reserve(rawPaths.size());-
69 for (const QString &rawPath : rawPaths) {-
70 QString cleanPath = QDir::cleanPath(rawPath);-
71 if (cleanPath.size() > 1
cleanPath.size() > 1Description
TRUEevaluated 255 times by 4 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
FALSEnever evaluated
&& cleanPath.endsWith(QLatin1Char('/'))
cleanPath.ends...tin1Char('/'))Description
TRUEnever evaluated
FALSEevaluated 255 times by 4 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
)
0-255
72 cleanPath.truncate(cleanPath.size() - 1);
never executed: cleanPath.truncate(cleanPath.size() - 1);
0
73 searchPaths.push_back(cleanPath);-
74 }
executed 255 times by 4 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
255
75 }
executed 15 times by 4 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
15
76 return
executed 15 times by 4 tests: return searchExecutable(searchPaths, executableName);
Executed by:
  • tst_NetworkSelfTest
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
searchExecutable(searchPaths, executableName);
executed 15 times by 4 tests: return searchExecutable(searchPaths, executableName);
Executed by:
  • tst_NetworkSelfTest
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_qstandardpaths
15
77}-
78QString QStandardPaths::displayName(StandardLocation type)-
79{-
80 switch (type) {-
81 case
executed 1 time by 1 test: case DesktopLocation:
Executed by:
  • tst_qstandardpaths
DesktopLocation:
executed 1 time by 1 test: case DesktopLocation:
Executed by:
  • tst_qstandardpaths
1
82 return
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Desktop");
Executed by:
  • tst_qstandardpaths
QCoreApplication::translate("QStandardPaths", "Desktop");
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Desktop");
Executed by:
  • tst_qstandardpaths
1
83 case
executed 1 time by 1 test: case DocumentsLocation:
Executed by:
  • tst_qstandardpaths
DocumentsLocation:
executed 1 time by 1 test: case DocumentsLocation:
Executed by:
  • tst_qstandardpaths
1
84 return
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Documents");
Executed by:
  • tst_qstandardpaths
QCoreApplication::translate("QStandardPaths", "Documents");
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Documents");
Executed by:
  • tst_qstandardpaths
1
85 case
executed 1 time by 1 test: case FontsLocation:
Executed by:
  • tst_qstandardpaths
FontsLocation:
executed 1 time by 1 test: case FontsLocation:
Executed by:
  • tst_qstandardpaths
1
86 return
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Fonts");
Executed by:
  • tst_qstandardpaths
QCoreApplication::translate("QStandardPaths", "Fonts");
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Fonts");
Executed by:
  • tst_qstandardpaths
1
87 case
executed 1 time by 1 test: case ApplicationsLocation:
Executed by:
  • tst_qstandardpaths
ApplicationsLocation:
executed 1 time by 1 test: case ApplicationsLocation:
Executed by:
  • tst_qstandardpaths
1
88 return
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Applications");
Executed by:
  • tst_qstandardpaths
QCoreApplication::translate("QStandardPaths", "Applications");
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Applications");
Executed by:
  • tst_qstandardpaths
1
89 case
executed 1 time by 1 test: case MusicLocation:
Executed by:
  • tst_qstandardpaths
MusicLocation:
executed 1 time by 1 test: case MusicLocation:
Executed by:
  • tst_qstandardpaths
1
90 return
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Music");
Executed by:
  • tst_qstandardpaths
QCoreApplication::translate("QStandardPaths", "Music");
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Music");
Executed by:
  • tst_qstandardpaths
1
91 case
executed 1 time by 1 test: case MoviesLocation:
Executed by:
  • tst_qstandardpaths
MoviesLocation:
executed 1 time by 1 test: case MoviesLocation:
Executed by:
  • tst_qstandardpaths
1
92 return
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Movies");
Executed by:
  • tst_qstandardpaths
QCoreApplication::translate("QStandardPaths", "Movies");
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Movies");
Executed by:
  • tst_qstandardpaths
1
93 case
executed 1 time by 1 test: case PicturesLocation:
Executed by:
  • tst_qstandardpaths
PicturesLocation:
executed 1 time by 1 test: case PicturesLocation:
Executed by:
  • tst_qstandardpaths
1
94 return
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Pictures");
Executed by:
  • tst_qstandardpaths
QCoreApplication::translate("QStandardPaths", "Pictures");
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Pictures");
Executed by:
  • tst_qstandardpaths
1
95 case
executed 1 time by 1 test: case TempLocation:
Executed by:
  • tst_qstandardpaths
TempLocation:
executed 1 time by 1 test: case TempLocation:
Executed by:
  • tst_qstandardpaths
1
96 return
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Temporary Directory");
Executed by:
  • tst_qstandardpaths
QCoreApplication::translate("QStandardPaths", "Temporary Directory");
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Temporary Directory");
Executed by:
  • tst_qstandardpaths
1
97 case
executed 1 time by 1 test: case HomeLocation:
Executed by:
  • tst_qstandardpaths
HomeLocation:
executed 1 time by 1 test: case HomeLocation:
Executed by:
  • tst_qstandardpaths
1
98 return
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Home");
Executed by:
  • tst_qstandardpaths
QCoreApplication::translate("QStandardPaths", "Home");
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Home");
Executed by:
  • tst_qstandardpaths
1
99 case
never executed: case CacheLocation:
CacheLocation:
never executed: case CacheLocation:
0
100 return
never executed: return QCoreApplication::translate("QStandardPaths", "Cache");
QCoreApplication::translate("QStandardPaths", "Cache");
never executed: return QCoreApplication::translate("QStandardPaths", "Cache");
0
101 case
never executed: case GenericDataLocation:
GenericDataLocation:
never executed: case GenericDataLocation:
0
102 return
never executed: return QCoreApplication::translate("QStandardPaths", "Shared Data");
QCoreApplication::translate("QStandardPaths", "Shared Data");
never executed: return QCoreApplication::translate("QStandardPaths", "Shared Data");
0
103 case
never executed: case RuntimeLocation:
RuntimeLocation:
never executed: case RuntimeLocation:
0
104 return
never executed: return QCoreApplication::translate("QStandardPaths", "Runtime");
QCoreApplication::translate("QStandardPaths", "Runtime");
never executed: return QCoreApplication::translate("QStandardPaths", "Runtime");
0
105 case
never executed: case ConfigLocation:
ConfigLocation:
never executed: case ConfigLocation:
0
106 return
never executed: return QCoreApplication::translate("QStandardPaths", "Configuration");
QCoreApplication::translate("QStandardPaths", "Configuration");
never executed: return QCoreApplication::translate("QStandardPaths", "Configuration");
0
107 case
never executed: case GenericConfigLocation:
GenericConfigLocation:
never executed: case GenericConfigLocation:
0
108 return
never executed: return QCoreApplication::translate("QStandardPaths", "Shared Configuration");
QCoreApplication::translate("QStandardPaths", "Shared Configuration");
never executed: return QCoreApplication::translate("QStandardPaths", "Shared Configuration");
0
109 case
never executed: case GenericCacheLocation:
GenericCacheLocation:
never executed: case GenericCacheLocation:
0
110 return
never executed: return QCoreApplication::translate("QStandardPaths", "Shared Cache");
QCoreApplication::translate("QStandardPaths", "Shared Cache");
never executed: return QCoreApplication::translate("QStandardPaths", "Shared Cache");
0
111 case
executed 1 time by 1 test: case DownloadLocation:
Executed by:
  • tst_qstandardpaths
DownloadLocation:
executed 1 time by 1 test: case DownloadLocation:
Executed by:
  • tst_qstandardpaths
1
112 return
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Download");
Executed by:
  • tst_qstandardpaths
QCoreApplication::translate("QStandardPaths", "Download");
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Download");
Executed by:
  • tst_qstandardpaths
1
113 case
never executed: case AppDataLocation:
AppDataLocation:
never executed: case AppDataLocation:
0
114 case
executed 1 time by 1 test: case AppLocalDataLocation:
Executed by:
  • tst_qstandardpaths
AppLocalDataLocation:
executed 1 time by 1 test: case AppLocalDataLocation:
Executed by:
  • tst_qstandardpaths
1
115 return
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Application Data");
Executed by:
  • tst_qstandardpaths
QCoreApplication::translate("QStandardPaths", "Application Data");
executed 1 time by 1 test: return QCoreApplication::translate("QStandardPaths", "Application Data");
Executed by:
  • tst_qstandardpaths
1
116 case
never executed: case AppConfigLocation:
AppConfigLocation:
never executed: case AppConfigLocation:
0
117 return
never executed: return QCoreApplication::translate("QStandardPaths", "Application Configuration");
QCoreApplication::translate("QStandardPaths", "Application Configuration");
never executed: return QCoreApplication::translate("QStandardPaths", "Application Configuration");
0
118 }-
119-
120 return
never executed: return QString();
QString();
never executed: return QString();
0
121}-
122static bool qsp_testMode = false;-
123-
124-
125void QStandardPaths::enableTestMode(bool testMode)-
126{-
127 qsp_testMode = testMode;-
128}
never executed: end of block
0
129-
130-
131void QStandardPaths::setTestModeEnabled(bool testMode)-
132{-
133 qsp_testMode = testMode;-
134}
executed 7 times by 5 tests: end of block
Executed by:
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_qstandardpaths
7
135bool QStandardPaths::isTestModeEnabled()-
136{-
137 return
executed 3874 times by 53 tests: return qsp_testMode;
Executed by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDnsLookup_Appless
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • ...
qsp_testMode;
executed 3874 times by 53 tests: return qsp_testMode;
Executed by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDnsLookup_Appless
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • ...
3874
138}-
139-
140-
141-
Switch to Source codePreprocessed file

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