OpenCoverage

qstandardpaths_unix.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/io/qstandardpaths_unix.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10static void appendOrganizationAndApp(QString &path)-
11{-
12-
13 const QString org = QCoreApplication::organizationName();-
14 if (!org.isEmpty()
!org.isEmpty()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qstandardpaths
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_qstandardpaths
)
8-30
15 path += QLatin1Char('/') + org;
executed 8 times by 1 test: path += QLatin1Char('/') + org;
Executed by:
  • tst_qstandardpaths
8
16 const QString appName = QCoreApplication::applicationName();-
17 if (!appName.isEmpty()
!appName.isEmpty()Description
TRUEevaluated 38 times by 1 test
Evaluated by:
  • tst_qstandardpaths
FALSEnever evaluated
)
0-38
18 path += QLatin1Char('/') + appName;
executed 38 times by 1 test: path += QLatin1Char('/') + appName;
Executed by:
  • tst_qstandardpaths
38
19-
20-
21-
22}
executed 38 times by 1 test: end of block
Executed by:
  • tst_qstandardpaths
38
23-
24QString QStandardPaths::writableLocation(StandardLocation type)-
25{-
26 switch (type) {-
27 case
executed 5 times by 1 test: case HomeLocation:
Executed by:
  • tst_qstandardpaths
HomeLocation:
executed 5 times by 1 test: case HomeLocation:
Executed by:
  • tst_qstandardpaths
5
28 return
executed 5 times by 1 test: return QDir::homePath();
Executed by:
  • tst_qstandardpaths
QDir::homePath();
executed 5 times by 1 test: return QDir::homePath();
Executed by:
  • tst_qstandardpaths
5
29 case
executed 5 times by 1 test: case TempLocation:
Executed by:
  • tst_qstandardpaths
TempLocation:
executed 5 times by 1 test: case TempLocation:
Executed by:
  • tst_qstandardpaths
5
30 return
executed 5 times by 1 test: return QDir::tempPath();
Executed by:
  • tst_qstandardpaths
QDir::tempPath();
executed 5 times by 1 test: return QDir::tempPath();
Executed by:
  • tst_qstandardpaths
5
31 case
executed 6 times by 1 test: case CacheLocation:
Executed by:
  • tst_qstandardpaths
CacheLocation:
executed 6 times by 1 test: case CacheLocation:
Executed by:
  • tst_qstandardpaths
6
32 case
executed 8 times by 1 test: case GenericCacheLocation:
Executed by:
  • tst_qstandardpaths
GenericCacheLocation:
executed 8 times by 1 test: case GenericCacheLocation:
Executed by:
  • tst_qstandardpaths
8
33 {-
34-
35 QString xdgCacheHome = QFile::decodeName(qgetenv("XDG_CACHE_HOME"));-
36 if (isTestModeEnabled()
isTestModeEnabled()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qstandardpaths
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qstandardpaths
)
4-10
37 xdgCacheHome = QDir::homePath() + QLatin1String("/.qttest/cache");
executed 4 times by 1 test: xdgCacheHome = QDir::homePath() + QLatin1String("/.qttest/cache");
Executed by:
  • tst_qstandardpaths
4
38 if (xdgCacheHome.isEmpty()
xdgCacheHome.isEmpty()Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qstandardpaths
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qstandardpaths
)
4-10
39 xdgCacheHome = QDir::homePath() + QLatin1String("/.cache");
executed 10 times by 1 test: xdgCacheHome = QDir::homePath() + QLatin1String("/.cache");
Executed by:
  • tst_qstandardpaths
10
40 if (type == QStandardPaths::CacheLocation
type == QStand...:CacheLocationDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qstandardpaths
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qstandardpaths
)
6-8
41 appendOrganizationAndApp(xdgCacheHome);
executed 6 times by 1 test: appendOrganizationAndApp(xdgCacheHome);
Executed by:
  • tst_qstandardpaths
6
42 return
executed 14 times by 1 test: return xdgCacheHome;
Executed by:
  • tst_qstandardpaths
xdgCacheHome;
executed 14 times by 1 test: return xdgCacheHome;
Executed by:
  • tst_qstandardpaths
14
43 }-
44 case
executed 5 times by 1 test: case AppDataLocation:
Executed by:
  • tst_qstandardpaths
AppDataLocation:
executed 5 times by 1 test: case AppDataLocation:
Executed by:
  • tst_qstandardpaths
5
45 case
executed 13 times by 1 test: case AppLocalDataLocation:
Executed by:
  • tst_qstandardpaths
AppLocalDataLocation:
executed 13 times by 1 test: case AppLocalDataLocation:
Executed by:
  • tst_qstandardpaths
13
46 case
executed 2676 times by 26 tests: case GenericDataLocation:
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_qdesktopservices
  • tst_qmimetype
  • ...
GenericDataLocation:
executed 2676 times by 26 tests: case GenericDataLocation:
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_qdesktopservices
  • tst_qmimetype
  • ...
2676
47 {-
48 QString xdgDataHome = QFile::decodeName(qgetenv("XDG_DATA_HOME"));-
49 if (isTestModeEnabled()
isTestModeEnabled()Description
TRUEevaluated 2063 times by 4 tests
Evaluated by:
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QMimeDatabase
  • tst_qstandardpaths
FALSEevaluated 631 times by 23 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QToolButton
  • tst_languageChange
  • tst_qdesktopservices
  • tst_qmimetype
  • tst_qstandardpaths
)
631-2063
50 xdgDataHome = QDir::homePath() + QLatin1String("/.qttest/share");
executed 2063 times by 4 tests: xdgDataHome = QDir::homePath() + QLatin1String("/.qttest/share");
Executed by:
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QMimeDatabase
  • tst_qstandardpaths
2063
51 if (xdgDataHome.isEmpty()
xdgDataHome.isEmpty()Description
TRUEevaluated 620 times by 23 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QToolButton
  • tst_languageChange
  • tst_qdesktopservices
  • tst_qmimetype
  • tst_qstandardpaths
FALSEevaluated 2074 times by 4 tests
Evaluated by:
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QMimeDatabase
  • tst_qstandardpaths
)
620-2074
52 xdgDataHome = QDir::homePath() + QLatin1String("/.local/share");
executed 620 times by 23 tests: xdgDataHome = QDir::homePath() + QLatin1String("/.local/share");
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QToolButton
  • tst_languageChange
  • tst_qdesktopservices
  • tst_qmimetype
  • tst_qstandardpaths
620
53 if (type == AppDataLocation
type == AppDataLocationDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_qstandardpaths
FALSEevaluated 2689 times by 26 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_qdesktopservices
  • tst_qmimetype
  • ...
|| type == AppLocalDataLocation
type == AppLocalDataLocationDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_qstandardpaths
FALSEevaluated 2676 times by 26 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_qdesktopservices
  • tst_qmimetype
  • ...
)
5-2689
54 appendOrganizationAndApp(xdgDataHome);
executed 18 times by 1 test: appendOrganizationAndApp(xdgDataHome);
Executed by:
  • tst_qstandardpaths
18
55 return
executed 2694 times by 26 tests: return xdgDataHome;
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_qdesktopservices
  • tst_qmimetype
  • ...
xdgDataHome;
executed 2694 times by 26 tests: return xdgDataHome;
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_qdesktopservices
  • tst_qmimetype
  • ...
2694
56 }-
57 case
executed 16 times by 1 test: case ConfigLocation:
Executed by:
  • tst_qstandardpaths
ConfigLocation:
executed 16 times by 1 test: case ConfigLocation:
Executed by:
  • tst_qstandardpaths
16
58 case
executed 1098 times by 32 tests: case GenericConfigLocation:
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSettings
  • tst_QSql
  • tst_QTextFormat
  • tst_languageChange
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • ...
GenericConfigLocation:
executed 1098 times by 32 tests: case GenericConfigLocation:
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSettings
  • tst_QSql
  • tst_QTextFormat
  • tst_languageChange
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • ...
1098
59 case
executed 5 times by 1 test: case AppConfigLocation:
Executed by:
  • tst_qstandardpaths
AppConfigLocation:
executed 5 times by 1 test: case AppConfigLocation:
Executed by:
  • tst_qstandardpaths
5
60 {-
61-
62 QString xdgConfigHome = QFile::decodeName(qgetenv("XDG_CONFIG_HOME"));-
63 if (isTestModeEnabled()
isTestModeEnabled()Description
TRUEevaluated 12 times by 5 tests
Evaluated by:
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QLoggingRegistry
  • tst_QSettings
  • tst_qstandardpaths
FALSEevaluated 1107 times by 28 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_QTextFormat
  • tst_languageChange
  • 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
  • ...
)
12-1107
64 xdgConfigHome = QDir::homePath() + QLatin1String("/.qttest/config");
executed 12 times by 5 tests: xdgConfigHome = QDir::homePath() + QLatin1String("/.qttest/config");
Executed by:
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QLoggingRegistry
  • tst_QSettings
  • tst_qstandardpaths
12
65 if (xdgConfigHome.isEmpty()
xdgConfigHome.isEmpty()Description
TRUEevaluated 1098 times by 28 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_QTextFormat
  • tst_languageChange
  • 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
  • ...
FALSEevaluated 21 times by 5 tests
Evaluated by:
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QLoggingRegistry
  • tst_QSettings
  • tst_qstandardpaths
)
21-1098
66 xdgConfigHome = QDir::homePath() + QLatin1String("/.config");
executed 1098 times by 28 tests: xdgConfigHome = QDir::homePath() + QLatin1String("/.config");
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_QTextFormat
  • tst_languageChange
  • 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
  • ...
1098
67 if (type == AppConfigLocation
type == AppConfigLocationDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_qstandardpaths
FALSEevaluated 1114 times by 32 tests
Evaluated by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSettings
  • tst_QSql
  • tst_QTextFormat
  • tst_languageChange
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • ...
)
5-1114
68 appendOrganizationAndApp(xdgConfigHome);
executed 5 times by 1 test: appendOrganizationAndApp(xdgConfigHome);
Executed by:
  • tst_qstandardpaths
5
69 return
executed 1119 times by 32 tests: return xdgConfigHome;
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSettings
  • tst_QSql
  • tst_QTextFormat
  • tst_languageChange
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • ...
xdgConfigHome;
executed 1119 times by 32 tests: return xdgConfigHome;
Executed by:
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSettings
  • tst_QSql
  • tst_QTextFormat
  • tst_languageChange
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • ...
1119
70 }-
71 case
executed 8 times by 1 test: case RuntimeLocation:
Executed by:
  • tst_qstandardpaths
RuntimeLocation:
executed 8 times by 1 test: case RuntimeLocation:
Executed by:
  • tst_qstandardpaths
8
72 {-
73 const uid_t myUid = geteuid();-
74-
75 QFileInfo fileInfo;-
76 QString xdgRuntimeDir = QFile::decodeName(qgetenv("XDG_RUNTIME_DIR"));-
77 if (xdgRuntimeDir.isEmpty()
xdgRuntimeDir.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qstandardpaths
) {
0-8
78 const QString userName = QFileSystemEngine::resolveUserName(myUid);-
79 xdgRuntimeDir = QDir::tempPath() + QLatin1String("/runtime-") + userName;-
80 fileInfo.setFile(xdgRuntimeDir);-
81 if (!fileInfo.isDir()
!fileInfo.isDir()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
82 if (!QDir().mkdir(xdgRuntimeDir)
!QDir().mkdir(xdgRuntimeDir)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
83 QMessageLogger(__FILE__, 130, __PRETTY_FUNCTION__).warning("QStandardPaths: error creating runtime directory %s: %s", QString(xdgRuntimeDir).toLocal8Bit().constData(), QString(qt_error_string((*__errno_location ()))).toLocal8Bit().constData());-
84 return
never executed: return QString();
QString();
never executed: return QString();
0
85 }-
86 }
never executed: end of block
0
87 QMessageLogger(__FILE__, 134, __PRETTY_FUNCTION__).warning("QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '%s'", QString(xdgRuntimeDir).toLocal8Bit().constData());-
88 }
never executed: end of block
else {
0
89 fileInfo.setFile(xdgRuntimeDir);-
90 if (!fileInfo.exists()
!fileInfo.exists()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qstandardpaths
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_qstandardpaths
) {
1-7
91 QMessageLogger(__FILE__, 138, __PRETTY_FUNCTION__).warning("QStandardPaths: XDG_RUNTIME_DIR points to non-existing path '%s', "-
92 "please create it with 0700 permissions.", QString(xdgRuntimeDir).toLocal8Bit().constData());-
93 return
executed 1 time by 1 test: return QString();
Executed by:
  • tst_qstandardpaths
QString();
executed 1 time by 1 test: return QString();
Executed by:
  • tst_qstandardpaths
1
94 }-
95 if (!fileInfo.isDir()
!fileInfo.isDir()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qstandardpaths
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qstandardpaths
) {
1-6
96 QMessageLogger(__FILE__, 143, __PRETTY_FUNCTION__).warning("QStandardPaths: XDG_RUNTIME_DIR points to '%s' which is not a directory",-
97 QString(xdgRuntimeDir).toLocal8Bit().constData());-
98 return
executed 1 time by 1 test: return QString();
Executed by:
  • tst_qstandardpaths
QString();
executed 1 time by 1 test: return QString();
Executed by:
  • tst_qstandardpaths
1
99 }-
100 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qstandardpaths
6
101-
102 if (fileInfo.ownerId() != myUid
fileInfo.ownerId() != myUidDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qstandardpaths
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_qstandardpaths
) {
1-5
103 QMessageLogger(__FILE__, 150, __PRETTY_FUNCTION__).warning("QStandardPaths: wrong ownership on runtime directory %s, %d instead of %d", QString(xdgRuntimeDir).toLocal8Bit().constData(),-
104 fileInfo.ownerId(), myUid);-
105 return
executed 1 time by 1 test: return QString();
Executed by:
  • tst_qstandardpaths
QString();
executed 1 time by 1 test: return QString();
Executed by:
  • tst_qstandardpaths
1
106 }-
107-
108-
109 const QFile::Permissions wantedPerms = QFile::ReadUser | QFile::WriteUser | QFile::ExeUser-
110 | QFile::ReadOwner | QFile::WriteOwner | QFile::ExeOwner;-
111 if (fileInfo.permissions() != wantedPerms
fileInfo.permi...!= wantedPermsDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qstandardpaths
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qstandardpaths
) {
1-4
112 QFile file(xdgRuntimeDir);-
113 if (!file.setPermissions(wantedPerms)
!file.setPermi...s(wantedPerms)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qstandardpaths
) {
0-1
114 QMessageLogger(__FILE__, 161, __PRETTY_FUNCTION__).warning("QStandardPaths: could not set correct permissions on runtime directory %s: %s",-
115 QString(xdgRuntimeDir).toLocal8Bit().constData(), QString(file.errorString()).toLocal8Bit().constData());-
116 return
never executed: return QString();
QString();
never executed: return QString();
0
117 }-
118 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_qstandardpaths
1
119 return
executed 5 times by 1 test: return xdgRuntimeDir;
Executed by:
  • tst_qstandardpaths
xdgRuntimeDir;
executed 5 times by 1 test: return xdgRuntimeDir;
Executed by:
  • tst_qstandardpaths
5
120 }-
121 default
executed 45 times by 3 tests: default:
Executed by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
:
executed 45 times by 3 tests: default:
Executed by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
45
122 break;
executed 45 times by 3 tests: break;
Executed by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
45
123 }-
124-
125-
126-
127 QString xdgConfigHome = QFile::decodeName(qgetenv("XDG_CONFIG_HOME"));-
128 if (xdgConfigHome.isEmpty()
xdgConfigHome.isEmpty()Description
TRUEevaluated 43 times by 3 tests
Evaluated by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qstandardpaths
)
2-43
129 xdgConfigHome = QDir::homePath() + QLatin1String("/.config");
executed 43 times by 3 tests: xdgConfigHome = QDir::homePath() + QLatin1String("/.config");
Executed by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
43
130 QFile file(xdgConfigHome + QLatin1String("/user-dirs.dirs"));-
131 if (!isTestModeEnabled()
!isTestModeEnabled()Description
TRUEevaluated 45 times by 3 tests
Evaluated by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
FALSEnever evaluated
&& file.open(QIODevice::ReadOnly)
file.open(QIODevice::ReadOnly)Description
TRUEevaluated 43 times by 3 tests
Evaluated by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qstandardpaths
) {
0-45
132 QHash<QString, QString> lines;-
133 QTextStream stream(&file);-
134-
135 QRegExp exp(QLatin1String("^XDG_(.*)_DIR=(.*)$"));-
136 while (!stream.atEnd()
!stream.atEnd()Description
TRUEevaluated 645 times by 3 tests
Evaluated by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
FALSEevaluated 43 times by 3 tests
Evaluated by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
) {
43-645
137 const QString &line = stream.readLine();-
138 if (exp.indexIn(line) != -1
exp.indexIn(line) != -1Description
TRUEevaluated 344 times by 3 tests
Evaluated by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
FALSEevaluated 301 times by 3 tests
Evaluated by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
) {
301-344
139 const QStringList lst = exp.capturedTexts();-
140 const QString key = lst.at(1);-
141 QString value = lst.at(2);-
142 if (value.length() > 2
value.length() > 2Description
TRUEevaluated 344 times by 3 tests
Evaluated by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
FALSEnever evaluated
0-344
143 && value.startsWith(QLatin1Char('\"'))
value.startsWi...in1Char('\"'))Description
TRUEevaluated 344 times by 3 tests
Evaluated by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
FALSEnever evaluated
0-344
144 && value.endsWith(QLatin1Char('\"'))
value.endsWith...in1Char('\"'))Description
TRUEevaluated 344 times by 3 tests
Evaluated by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
FALSEnever evaluated
)
0-344
145 value = value.mid(1, value.length() - 2);
executed 344 times by 3 tests: value = value.mid(1, value.length() - 2);
Executed by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
344
146-
147 lines[key] = value;-
148 }
executed 344 times by 3 tests: end of block
Executed by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
344
149 }
executed 645 times by 3 tests: end of block
Executed by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
645
150-
151 QString key;-
152 switch (type) {-
153 case
executed 5 times by 1 test: case DesktopLocation:
Executed by:
  • tst_qstandardpaths
DesktopLocation:
executed 5 times by 1 test: case DesktopLocation:
Executed by:
  • tst_qstandardpaths
5
154 key = QLatin1String("DESKTOP");-
155 break;
executed 5 times by 1 test: break;
Executed by:
  • tst_qstandardpaths
5
156 case
executed 7 times by 2 tests: case DocumentsLocation:
Executed by:
  • tst_QFileSystemModel
  • tst_qstandardpaths
DocumentsLocation:
executed 7 times by 2 tests: case DocumentsLocation:
Executed by:
  • tst_QFileSystemModel
  • tst_qstandardpaths
7
157 key = QLatin1String("DOCUMENTS");-
158 break;
executed 7 times by 2 tests: break;
Executed by:
  • tst_QFileSystemModel
  • tst_qstandardpaths
7
159 case
executed 5 times by 1 test: case PicturesLocation:
Executed by:
  • tst_qstandardpaths
PicturesLocation:
executed 5 times by 1 test: case PicturesLocation:
Executed by:
  • tst_qstandardpaths
5
160 key = QLatin1String("PICTURES");-
161 break;
executed 5 times by 1 test: break;
Executed by:
  • tst_qstandardpaths
5
162 case
executed 5 times by 1 test: case MusicLocation:
Executed by:
  • tst_qstandardpaths
MusicLocation:
executed 5 times by 1 test: case MusicLocation:
Executed by:
  • tst_qstandardpaths
5
163 key = QLatin1String("MUSIC");-
164 break;
executed 5 times by 1 test: break;
Executed by:
  • tst_qstandardpaths
5
165 case
executed 5 times by 1 test: case MoviesLocation:
Executed by:
  • tst_qstandardpaths
MoviesLocation:
executed 5 times by 1 test: case MoviesLocation:
Executed by:
  • tst_qstandardpaths
5
166 key = QLatin1String("VIDEOS");-
167 break;
executed 5 times by 1 test: break;
Executed by:
  • tst_qstandardpaths
5
168 case
executed 6 times by 2 tests: case DownloadLocation:
Executed by:
  • tst_QTemporaryDir
  • tst_qstandardpaths
DownloadLocation:
executed 6 times by 2 tests: case DownloadLocation:
Executed by:
  • tst_QTemporaryDir
  • tst_qstandardpaths
6
169 key = QLatin1String("DOWNLOAD");-
170 break;
executed 6 times by 2 tests: break;
Executed by:
  • tst_QTemporaryDir
  • tst_qstandardpaths
6
171 default
executed 10 times by 1 test: default:
Executed by:
  • tst_qstandardpaths
:
executed 10 times by 1 test: default:
Executed by:
  • tst_qstandardpaths
10
172 break;
executed 10 times by 1 test: break;
Executed by:
  • tst_qstandardpaths
10
173 }-
174 if (!key.isEmpty()
!key.isEmpty()Description
TRUEevaluated 33 times by 3 tests
Evaluated by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qstandardpaths
) {
10-33
175 QString value = lines.value(key);-
176 if (!value.isEmpty()
!value.isEmpty()Description
TRUEevaluated 33 times by 3 tests
Evaluated by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
FALSEnever evaluated
) {
0-33
177-
178 if (value.startsWith(QLatin1String("$HOME"))
value.startsWi...ring("$HOME"))Description
TRUEevaluated 33 times by 3 tests
Evaluated by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
FALSEnever evaluated
)
0-33
179 value = QDir::homePath() + value.mid(5);
executed 33 times by 3 tests: value = QDir::homePath() + value.mid(5);
Executed by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
33
180 if (value.length() > 1
value.length() > 1Description
TRUEevaluated 33 times by 3 tests
Evaluated by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
FALSEnever evaluated
&& value.endsWith(QLatin1Char('/'))
value.endsWith...tin1Char('/'))Description
TRUEnever evaluated
FALSEevaluated 33 times by 3 tests
Evaluated by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
)
0-33
181 value.chop(1);
never executed: value.chop(1);
0
182 return
executed 33 times by 3 tests: return value;
Executed by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
value;
executed 33 times by 3 tests: return value;
Executed by:
  • tst_QFileSystemModel
  • tst_QTemporaryDir
  • tst_qstandardpaths
33
183 }-
184 }
never executed: end of block
0
185 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_qstandardpaths
10
186-
187-
188 QString path;-
189 switch (type) {-
190 case
never executed: case DesktopLocation:
DesktopLocation:
never executed: case DesktopLocation:
0
191 path = QDir::homePath() + QLatin1String("/Desktop");-
192 break;
never executed: break;
0
193 case
never executed: case DocumentsLocation:
DocumentsLocation:
never executed: case DocumentsLocation:
0
194 path = QDir::homePath() + QLatin1String("/Documents");-
195 break;
never executed: break;
0
196 case
never executed: case PicturesLocation:
PicturesLocation:
never executed: case PicturesLocation:
0
197 path = QDir::homePath() + QLatin1String("/Pictures");-
198 break;
never executed: break;
0
199-
200 case
executed 5 times by 1 test: case FontsLocation:
Executed by:
  • tst_qstandardpaths
FontsLocation:
executed 5 times by 1 test: case FontsLocation:
Executed by:
  • tst_qstandardpaths
5
201 path = QDir::homePath() + QLatin1String("/.fonts");-
202 break;
executed 5 times by 1 test: break;
Executed by:
  • tst_qstandardpaths
5
203-
204 case
never executed: case MusicLocation:
MusicLocation:
never executed: case MusicLocation:
0
205 path = QDir::homePath() + QLatin1String("/Music");-
206 break;
never executed: break;
0
207-
208 case
never executed: case MoviesLocation:
MoviesLocation:
never executed: case MoviesLocation:
0
209 path = QDir::homePath() + QLatin1String("/Videos");-
210 break;
never executed: break;
0
211 case
never executed: case DownloadLocation:
DownloadLocation:
never executed: case DownloadLocation:
0
212 path = QDir::homePath() + QLatin1String("/Downloads");-
213 break;
never executed: break;
0
214 case
executed 7 times by 1 test: case ApplicationsLocation:
Executed by:
  • tst_qstandardpaths
ApplicationsLocation:
executed 7 times by 1 test: case ApplicationsLocation:
Executed by:
  • tst_qstandardpaths
7
215 path = writableLocation(GenericDataLocation) + QLatin1String("/applications");-
216 break;
executed 7 times by 1 test: break;
Executed by:
  • tst_qstandardpaths
7
217-
218 default
never executed: default:
:
never executed: default:
0
219 break;
never executed: break;
0
220 }-
221-
222 return
executed 12 times by 1 test: return path;
Executed by:
  • tst_qstandardpaths
path;
executed 12 times by 1 test: return path;
Executed by:
  • tst_qstandardpaths
12
223}-
224-
225static QStringList xdgDataDirs()-
226{-
227 QStringList dirs;-
228-
229 QString xdgDataDirsEnv = QFile::decodeName(qgetenv("XDG_DATA_DIRS"));-
230 if (xdgDataDirsEnv.isEmpty()
xdgDataDirsEnv.isEmpty()Description
TRUEevaluated 2501 times by 23 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_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QToolButton
  • tst_languageChange
  • tst_qstandardpaths
FALSEevaluated 141 times by 3 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_qmimetype
  • tst_qstandardpaths
) {
141-2501
231 dirs.append(QString::fromLatin1("/usr/local/share"));-
232 dirs.append(QString::fromLatin1("/usr/share"));-
233 }
executed 2501 times by 23 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_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QToolButton
  • tst_languageChange
  • tst_qstandardpaths
else {
2501
234 dirs = xdgDataDirsEnv.split(QLatin1Char(':'), QString::SkipEmptyParts);-
235-
236-
237 QMutableListIterator<QString> it(dirs);-
238 while (it.hasNext()
it.hasNext()Description
TRUEevaluated 142 times by 3 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_qmimetype
  • tst_qstandardpaths
FALSEevaluated 141 times by 3 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_qmimetype
  • tst_qstandardpaths
) {
141-142
239 const QString dir = it.next();-
240 if (!dir.startsWith(QLatin1Char('/'))
!dir.startsWit...tin1Char('/'))Description
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_qmimetype
  • tst_qstandardpaths
FALSEevaluated 140 times by 2 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_qstandardpaths
)
2-140
241 it.remove();
executed 2 times by 2 tests: it.remove();
Executed by:
  • tst_qmimetype
  • tst_qstandardpaths
2
242 else-
243 it.setValue(QDir::cleanPath(dir));
executed 140 times by 2 tests: it.setValue(QDir::cleanPath(dir));
Executed by:
  • tst_QMimeDatabase
  • tst_qstandardpaths
140
244 }-
245-
246-
247-
248-
249-
250-
251-
252 dirs.removeDuplicates();-
253 }
executed 141 times by 3 tests: end of block
Executed by:
  • tst_QMimeDatabase
  • tst_qmimetype
  • tst_qstandardpaths
141
254 return
executed 2642 times by 25 tests: return dirs;
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
dirs;
executed 2642 times by 25 tests: return dirs;
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
2642
255}-
256-
257static QStringList xdgConfigDirs()-
258{-
259 QStringList dirs;-
260-
261 const QString xdgConfigDirs = QFile::decodeName(qgetenv("XDG_CONFIG_DIRS"));-
262 if (xdgConfigDirs.isEmpty()
xdgConfigDirs.isEmpty()Description
TRUEevaluated 1086 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 6 times by 1 test
Evaluated by:
  • tst_qstandardpaths
)
6-1086
263 dirs.append(QString::fromLatin1("/etc/xdg"));
executed 1086 times by 25 tests: dirs.append(QString::fromLatin1("/etc/xdg"));
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
1086
264 else-
265 dirs = xdgConfigDirs.split(QLatin1Char(':'));
executed 6 times by 1 test: dirs = xdgConfigDirs.split(QLatin1Char(':'));
Executed by:
  • tst_qstandardpaths
6
266 return
executed 1092 times by 25 tests: return dirs;
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
dirs;
executed 1092 times by 25 tests: return dirs;
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
1092
267}-
268-
269QStringList QStandardPaths::standardLocations(StandardLocation type)-
270{-
271 QStringList dirs;-
272 switch (type) {-
273 case
executed 9 times by 1 test: case ConfigLocation:
Executed by:
  • tst_qstandardpaths
ConfigLocation:
executed 9 times by 1 test: case ConfigLocation:
Executed by:
  • tst_qstandardpaths
9
274 case
executed 1082 times by 25 tests: case GenericConfigLocation:
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
GenericConfigLocation:
executed 1082 times by 25 tests: case GenericConfigLocation:
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
1082
275 dirs = xdgConfigDirs();-
276 break;
executed 1091 times by 25 tests: break;
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
1091
277 case
executed 1 time by 1 test: case AppConfigLocation:
Executed by:
  • tst_qstandardpaths
AppConfigLocation:
executed 1 time by 1 test: case AppConfigLocation:
Executed by:
  • tst_qstandardpaths
1
278 dirs = xdgConfigDirs();-
279 for (int i = 0; i < dirs.count()
i < dirs.count()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qstandardpaths
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qstandardpaths
; ++i)
1
280 appendOrganizationAndApp(dirs[i]);
executed 1 time by 1 test: appendOrganizationAndApp(dirs[i]);
Executed by:
  • tst_qstandardpaths
1
281 break;
executed 1 time by 1 test: break;
Executed by:
  • tst_qstandardpaths
1
282 case
executed 2634 times by 25 tests: case GenericDataLocation:
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
GenericDataLocation:
executed 2634 times by 25 tests: case GenericDataLocation:
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
2634
283 dirs = xdgDataDirs();-
284 break;
executed 2634 times by 25 tests: break;
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
2634
285 case
executed 4 times by 1 test: case ApplicationsLocation:
Executed by:
  • tst_qstandardpaths
ApplicationsLocation:
executed 4 times by 1 test: case ApplicationsLocation:
Executed by:
  • tst_qstandardpaths
4
286 dirs = xdgDataDirs();-
287 for (int i = 0; i < dirs.count()
i < dirs.count()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qstandardpaths
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qstandardpaths
; ++i)
4-6
288 dirs[i].append(QLatin1String("/applications"));
executed 6 times by 1 test: dirs[i].append(QLatin1String("/applications"));
Executed by:
  • tst_qstandardpaths
6
289 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_qstandardpaths
4
290 case
executed 1 time by 1 test: case AppDataLocation:
Executed by:
  • tst_qstandardpaths
AppDataLocation:
executed 1 time by 1 test: case AppDataLocation:
Executed by:
  • tst_qstandardpaths
1
291 case
executed 3 times by 1 test: case AppLocalDataLocation:
Executed by:
  • tst_qstandardpaths
AppLocalDataLocation:
executed 3 times by 1 test: case AppLocalDataLocation:
Executed by:
  • tst_qstandardpaths
3
292 dirs = xdgDataDirs();-
293 for (int i = 0; i < dirs.count()
i < dirs.count()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qstandardpaths
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qstandardpaths
; ++i)
4-8
294 appendOrganizationAndApp(dirs[i]);
executed 8 times by 1 test: appendOrganizationAndApp(dirs[i]);
Executed by:
  • tst_qstandardpaths
8
295 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_qstandardpaths
4
296 default
executed 27 times by 2 tests: default:
Executed by:
  • tst_QFileSystemModel
  • tst_qstandardpaths
:
executed 27 times by 2 tests: default:
Executed by:
  • tst_QFileSystemModel
  • tst_qstandardpaths
27
297 break;
executed 27 times by 2 tests: break;
Executed by:
  • tst_QFileSystemModel
  • tst_qstandardpaths
27
298 }-
299 const QString localDir = writableLocation(type);-
300 dirs.prepend(localDir);-
301 return
executed 3761 times by 48 tests: return dirs;
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
  • ...
dirs;
executed 3761 times by 48 tests: return dirs;
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
  • ...
3761
302}-
303-
304-
Switch to Source codePreprocessed file

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