Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | static void initResources() | - |
7 | { | - |
8 | do { extern int qInitResources_mimetypes (); qInitResources_mimetypes (); } while (0); | - |
9 | }executed 2 times by 2 tests: end of block Executed by:- tst_QMimeDatabase
- tst_qmimetype
| 2 |
10 | | - |
11 | | - |
12 | | - |
13 | static QString fallbackParent(const QString &mimeTypeName) | - |
14 | { | - |
15 | const QString myGroup = mimeTypeName.left(mimeTypeName.indexOf(QLatin1Char('/'))); | - |
16 | | - |
17 | if (myGroup == QLatin1String("text")TRUE | evaluated 28 times by 1 test | FALSE | evaluated 40 times by 1 test |
&& mimeTypeName != QLatin1String("text/plain")TRUE | evaluated 8 times by 1 test | FALSE | evaluated 20 times by 1 test |
) | 8-40 |
18 | returnexecuted 8 times by 1 test: return QLatin1String("text/plain"); QLatin1String("text/plain");executed 8 times by 1 test: return QLatin1String("text/plain"); | 8 |
19 | | - |
20 | if (myGroup != QLatin1String("inode")TRUE | evaluated 52 times by 1 test | FALSE | evaluated 8 times by 1 test |
&& | 8-52 |
21 | | - |
22 | myGroup != QLatin1String("all")TRUE | evaluated 52 times by 1 test | FALSE | never evaluated |
&& myGroup != QLatin1String("fonts")TRUE | evaluated 52 times by 1 test | FALSE | never evaluated |
&& myGroup != QLatin1String("print")TRUE | evaluated 52 times by 1 test | FALSE | never evaluated |
&& myGroup != QLatin1String("uri")TRUE | evaluated 52 times by 1 test | FALSE | never evaluated |
| 0-52 |
23 | && mimeTypeName != QLatin1String("application/octet-stream")TRUE | evaluated 36 times by 1 test | FALSE | evaluated 16 times by 1 test |
) { | 16-36 |
24 | returnexecuted 36 times by 1 test: return QLatin1String("application/octet-stream"); QLatin1String("application/octet-stream");executed 36 times by 1 test: return QLatin1String("application/octet-stream"); | 36 |
25 | } | - |
26 | returnexecuted 24 times by 1 test: return QString(); QString();executed 24 times by 1 test: return QString(); | 24 |
27 | } | - |
28 | | - |
29 | QMimeProviderBase::QMimeProviderBase(QMimeDatabasePrivate *db) | - |
30 | : m_db(db) | - |
31 | { | - |
32 | }executed 27 times by 24 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
| 27 |
33 | | - |
34 | __attribute__((visibility("default"))) int qmime_secondsBetweenChecks = 5; | - |
35 | | - |
36 | bool QMimeProviderBase::shouldCheck() | - |
37 | { | - |
38 | if (m_lastCheck.isValid()TRUE | evaluated 16372 times by 23 testsEvaluated 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
| FALSE | evaluated 25 times by 24 testsEvaluated 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
|
&& m_lastCheck.elapsed() < qmime_secondsBetweenChecks * 1000TRUE | evaluated 16245 times by 23 testsEvaluated 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
| FALSE | evaluated 127 times by 4 testsEvaluated by:- tst_QFileDialog2
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QMimeDatabase
|
) | 25-16372 |
39 | returnexecuted 16245 times by 23 tests: return false; 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
false;executed 16245 times by 23 tests: return false; 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
| 16245 |
40 | m_lastCheck.start(); | - |
41 | returnexecuted 152 times by 24 tests: return true; 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
true;executed 152 times by 24 tests: return true; 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
| 152 |
42 | } | - |
43 | | - |
44 | QMimeBinaryProvider::QMimeBinaryProvider(QMimeDatabasePrivate *db) | - |
45 | : QMimeProviderBase(db), m_mimetypeListLoaded(false) | - |
46 | { | - |
47 | }executed 25 times by 24 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
| 25 |
48 | | - |
49 | | - |
50 | | - |
51 | | - |
52 | | - |
53 | struct QMimeBinaryProvider::CacheFile | - |
54 | { | - |
55 | CacheFile(const QString &fileName); | - |
56 | ~CacheFile(); | - |
57 | | - |
58 | bool isValid() const { returnexecuted 24 times by 23 tests: return m_valid; 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
m_valid;executed 24 times by 23 tests: return m_valid; 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
} | 24 |
59 | inline quint16 getUint16(int offset) const | - |
60 | { | - |
61 | returnexecuted 54 times by 23 tests: return qFromBigEndian(*reinterpret_cast<quint16 *>(data + offset)); 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
qFromBigEndian(*reinterpret_cast<quint16 *>(data + offset));executed 54 times by 23 tests: return qFromBigEndian(*reinterpret_cast<quint16 *>(data + offset)); 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
| 54 |
62 | } | - |
63 | inline quint32 getUint32(int offset) const | - |
64 | { | - |
65 | returnexecuted 316408 times by 23 tests: return qFromBigEndian(*reinterpret_cast<quint32 *>(data + offset)); 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
qFromBigEndian(*reinterpret_cast<quint32 *>(data + offset));executed 316408 times by 23 tests: return qFromBigEndian(*reinterpret_cast<quint32 *>(data + offset)); 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
| 316408 |
66 | } | - |
67 | inline const char *getCharStar(int offset) const | - |
68 | { | - |
69 | returnexecuted 143248 times by 23 tests: return reinterpret_cast<const char *>(data + offset); 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
reinterpret_cast<const char *>(data + offset);executed 143248 times by 23 tests: return reinterpret_cast<const char *>(data + offset); 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
| 143248 |
70 | } | - |
71 | bool load(); | - |
72 | bool reload(); | - |
73 | | - |
74 | QFile file; | - |
75 | uchar *data; | - |
76 | QDateTime m_mtime; | - |
77 | bool m_valid; | - |
78 | }; | - |
79 | | - |
80 | QMimeBinaryProvider::CacheFile::CacheFile(const QString &fileName) | - |
81 | : file(fileName), m_valid(false) | - |
82 | { | - |
83 | load(); | - |
84 | }executed 24 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_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
| 24 |
85 | | - |
86 | QMimeBinaryProvider::CacheFile::~CacheFile() | - |
87 | { | - |
88 | } | - |
89 | | - |
90 | bool QMimeBinaryProvider::CacheFile::load() | - |
91 | { | - |
92 | if (!file.open(QIODevice::ReadOnly)TRUE | never evaluated | FALSE | evaluated 27 times by 23 testsEvaluated 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
|
) | 0-27 |
93 | return never executed: return false; false;never executed: return false; | 0 |
94 | data = file.map(0, file.size()); | - |
95 | if (dataTRUE | evaluated 27 times by 23 testsEvaluated 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
| FALSE | never evaluated |
) { | 0-27 |
96 | const int major = getUint16(0); | - |
97 | const int minor = getUint16(2); | - |
98 | m_valid = (major == 1TRUE | evaluated 27 times by 23 testsEvaluated 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
| FALSE | never evaluated |
&& minor >= 1TRUE | evaluated 27 times by 23 testsEvaluated 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
| FALSE | never evaluated |
&& minor <= 2TRUE | evaluated 27 times by 23 testsEvaluated 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
| FALSE | never evaluated |
); | 0-27 |
99 | }executed 27 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_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
| 27 |
100 | m_mtime = QFileInfo(file).lastModified(); | - |
101 | returnexecuted 27 times by 23 tests: return m_valid; 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
m_valid;executed 27 times by 23 tests: return m_valid; 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
| 27 |
102 | } | - |
103 | | - |
104 | bool QMimeBinaryProvider::CacheFile::reload() | - |
105 | { | - |
106 | | - |
107 | m_valid = false; | - |
108 | if (file.isOpen()TRUE | evaluated 3 times by 1 test | FALSE | never evaluated |
) { | 0-3 |
109 | file.close(); | - |
110 | }executed 3 times by 1 test: end of block | 3 |
111 | data = 0; | - |
112 | returnexecuted 3 times by 1 test: return load(); load();executed 3 times by 1 test: return load(); | 3 |
113 | } | - |
114 | | - |
115 | QMimeBinaryProvider::CacheFile *QMimeBinaryProvider::CacheFileList::findCacheFile(const QString &fileName) const | - |
116 | { | - |
117 | for (const_iterator it = begin(); it != end()TRUE | evaluated 3 times by 1 test | FALSE | evaluated 24 times by 23 testsEvaluated 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
|
; ++it) { | 3-24 |
118 | if ((*TRUE | evaluated 2 times by 1 test | FALSE | evaluated 1 time by 1 test |
it)->file.fileName() == fileNameTRUE | evaluated 2 times by 1 test | FALSE | evaluated 1 time by 1 test |
) | 1-2 |
119 | returnexecuted 2 times by 1 test: return *it; *it;executed 2 times by 1 test: return *it; | 2 |
120 | }executed 1 time by 1 test: end of block | 1 |
121 | returnexecuted 24 times by 23 tests: return 0; 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
0;executed 24 times by 23 tests: return 0; 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
| 24 |
122 | } | - |
123 | | - |
124 | QMimeBinaryProvider::~QMimeBinaryProvider() | - |
125 | { | - |
126 | qDeleteAll(m_cacheFiles); | - |
127 | }executed 25 times by 25 tests: end of block Executed by:- tst_QMimeDatabase
- tst_languagechange - unknown status
- tst_qaccessibility - unknown status
- tst_qcalendarwidget - unknown status
- tst_qcombobox - unknown status
- tst_qcompleter - unknown status
- tst_qdatetimeedit - unknown status
- tst_qdebug - unknown status
- tst_qfiledialog - unknown status
- tst_qfiledialog2 - unknown status
- tst_qfileiconprovider - unknown status
- tst_qfilesystemmodel - unknown status
- tst_qfontcombobox - unknown status
- tst_qgraphicsproxywidget - unknown status
- tst_qgraphicswidget - unknown status
- tst_qguiapplication - unknown status
- tst_qguivariant - unknown status
- tst_qicon - unknown status
- tst_qmimedatabase-cache - unknown status
- tst_qmimetype
- tst_qprinter - unknown status
- tst_qsidebar - unknown status
- tst_qstyle - unknown status
- tst_qsystemtrayicon - unknown status
- tst_qtoolbutton - unknown status
| 25 |
128 | | - |
129 | | - |
130 | enum { | - |
131 | PosAliasListOffset = 4, | - |
132 | PosParentListOffset = 8, | - |
133 | PosLiteralListOffset = 12, | - |
134 | PosReverseSuffixTreeOffset = 16, | - |
135 | PosGlobListOffset = 20, | - |
136 | PosMagicListOffset = 24, | - |
137 | | - |
138 | PosIconsListOffset = 32, | - |
139 | PosGenericIconsListOffset = 36 | - |
140 | }; | - |
141 | | - |
142 | bool QMimeBinaryProvider::isValid() | - |
143 | { | - |
144 | | - |
145 | if (!qEnvironmentVariableIsEmpty("QT_NO_MIME_CACHE")TRUE | evaluated 1 time by 1 test | FALSE | evaluated 24 times by 24 testsEvaluated 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
|
) | 1-24 |
146 | returnexecuted 1 time by 1 test: return false; false;executed 1 time by 1 test: return false; | 1 |
147 | | - |
148 | ((!(m_cacheFiles.isEmpty())) ? qt_assert("m_cacheFiles.isEmpty()",__FILE__,199) : qt_noop()); | - |
149 | checkCache(); | - |
150 | | - |
151 | if (m_cacheFiles.count() > 1TRUE | never evaluated | FALSE | evaluated 24 times by 24 testsEvaluated 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
|
) | 0-24 |
152 | return never executed: return true; true;never executed: return true; | 0 |
153 | if (m_cacheFiles.isEmpty()TRUE | evaluated 1 time by 1 test | FALSE | evaluated 23 times by 23 testsEvaluated 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
|
) | 1-23 |
154 | returnexecuted 1 time by 1 test: return false; false;executed 1 time by 1 test: return false; | 1 |
155 | | - |
156 | | - |
157 | const QString foundFile = m_cacheFiles.constFirst()->file.fileName(); | - |
158 | const QString localCacheFile = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/mime/mime.cache"); | - |
159 | | - |
160 | returnexecuted 23 times by 23 tests: return foundFile != localCacheFile; 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
foundFile != localCacheFile;executed 23 times by 23 tests: return foundFile != localCacheFile; 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
| 23 |
161 | | - |
162 | | - |
163 | | - |
164 | } | - |
165 | | - |
166 | bool QMimeBinaryProvider::CacheFileList::checkCacheChanged() | - |
167 | { | - |
168 | bool somethingChanged = false; | - |
169 | QMutableListIterator<CacheFile *> it(*this); | - |
170 | while (it.hasNext()TRUE | evaluated 97 times by 4 testsEvaluated by:- tst_QFileDialog2
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QMimeDatabase
| FALSE | evaluated 96 times by 24 testsEvaluated 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
|
) { | 96-97 |
171 | CacheFile *cacheFile = it.next(); | - |
172 | QFileInfo fileInfo(cacheFile->file); | - |
173 | if (!fileInfo.exists()TRUE | evaluated 1 time by 1 test | FALSE | evaluated 96 times by 4 testsEvaluated by:- tst_QFileDialog2
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QMimeDatabase
|
) { | 1-96 |
174 | delete cacheFile; | - |
175 | it.remove(); | - |
176 | somethingChanged = true; | - |
177 | }executed 1 time by 1 test: end of block else if (fileInfo.lastModified() > cacheFile->m_mtimeTRUE | evaluated 3 times by 1 test | FALSE | evaluated 93 times by 4 testsEvaluated by:- tst_QFileDialog2
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QMimeDatabase
|
) { | 1-93 |
178 | if (!cacheFile->reload()TRUE | never evaluated | FALSE | evaluated 3 times by 1 test |
) { | 0-3 |
179 | delete cacheFile; | - |
180 | it.remove(); | - |
181 | } never executed: end of block | 0 |
182 | somethingChanged = true; | - |
183 | }executed 3 times by 1 test: end of block | 3 |
184 | }executed 97 times by 4 tests: end of block Executed by:- tst_QFileDialog2
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QMimeDatabase
| 97 |
185 | returnexecuted 96 times by 24 tests: return somethingChanged; 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
somethingChanged;executed 96 times by 24 tests: return somethingChanged; 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
| 96 |
186 | } | - |
187 | | - |
188 | void QMimeBinaryProvider::checkCache() | - |
189 | { | - |
190 | if (!shouldCheck()TRUE | evaluated 11745 times by 23 testsEvaluated 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
| FALSE | evaluated 96 times by 24 testsEvaluated 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
|
) | 96-11745 |
191 | return;executed 11745 times by 23 tests: return; 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
| 11745 |
192 | | - |
193 | | - |
194 | if (m_cacheFiles.checkCacheChanged()TRUE | evaluated 4 times by 1 test | FALSE | evaluated 92 times by 24 testsEvaluated 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
|
) | 4-92 |
195 | m_mimetypeListLoaded = false;executed 4 times by 1 test: m_mimetypeListLoaded = false; | 4 |
196 | | - |
197 | | - |
198 | const QStringList cacheFileNames = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QLatin1String("mime/mime.cache")); | - |
199 | if (cacheFileNames != m_cacheFileNamesTRUE | evaluated 25 times by 23 testsEvaluated 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
| FALSE | evaluated 71 times by 5 testsEvaluated by:- tst_QFileDialog2
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QMimeDatabase
- tst_qmimetype
|
) { | 25-71 |
200 | for (const QString &cacheFileName : cacheFileNames) { | - |
201 | CacheFile *cacheFile = m_cacheFiles.findCacheFile(cacheFileName); | - |
202 | if (!cacheFileTRUE | evaluated 24 times by 23 testsEvaluated 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
| FALSE | evaluated 2 times by 1 test |
) { | 2-24 |
203 | | - |
204 | cacheFile = new CacheFile(cacheFileName); | - |
205 | if (cacheFile->isValid()TRUE | evaluated 24 times by 23 testsEvaluated 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
| FALSE | never evaluated |
) | 0-24 |
206 | m_cacheFiles.append(cacheFile);executed 24 times by 23 tests: m_cacheFiles.append(cacheFile); 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
| 24 |
207 | else | - |
208 | delete cacheFile; never executed: delete cacheFile; | 0 |
209 | } | - |
210 | }executed 26 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_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
| 26 |
211 | m_cacheFileNames = cacheFileNames; | - |
212 | m_mimetypeListLoaded = false; | - |
213 | }executed 25 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_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
| 25 |
214 | }executed 96 times by 24 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
| 96 |
215 | | - |
216 | static QMimeType mimeTypeForNameUnchecked(const QString &name) | - |
217 | { | - |
218 | QMimeTypePrivate data; | - |
219 | data.name = name; | - |
220 | | - |
221 | | - |
222 | | - |
223 | | - |
224 | returnexecuted 7911 times by 23 tests: return QMimeType(data); 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
QMimeType(data);executed 7911 times by 23 tests: return QMimeType(data); 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
| 7911 |
225 | } | - |
226 | | - |
227 | QMimeType QMimeBinaryProvider::mimeTypeForName(const QString &name) | - |
228 | { | - |
229 | checkCache(); | - |
230 | if (!m_mimetypeListLoadedTRUE | evaluated 28 times by 23 testsEvaluated 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
| FALSE | evaluated 4553 times by 20 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFontComboBox
- tst_QGraphicsProxyWidget
- tst_QGuiApplication
- tst_QGuiVariant
- tst_QIcon
- tst_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_languageChange
|
) | 28-4553 |
231 | loadMimeTypeList();executed 28 times by 23 tests: loadMimeTypeList(); 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
| 28 |
232 | if (!m_mimetypeNames.contains(name)TRUE | evaluated 8 times by 1 test | FALSE | evaluated 4573 times by 23 testsEvaluated 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
|
) | 8-4573 |
233 | returnexecuted 8 times by 1 test: return QMimeType(); QMimeType();executed 8 times by 1 test: return QMimeType(); | 8 |
234 | returnexecuted 4573 times by 23 tests: return mimeTypeForNameUnchecked(name); 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
mimeTypeForNameUnchecked(name);executed 4573 times by 23 tests: return mimeTypeForNameUnchecked(name); 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
| 4573 |
235 | } | - |
236 | | - |
237 | QStringList QMimeBinaryProvider::findByFileName(const QString &fileName, QString *foundSuffix) | - |
238 | { | - |
239 | checkCache(); | - |
240 | if (fileName.isEmpty()TRUE | evaluated 2 times by 1 test | FALSE | evaluated 2523 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) | 2-2523 |
241 | returnexecuted 2 times by 1 test: return QStringList(); QStringList();executed 2 times by 1 test: return QStringList(); | 2 |
242 | const QString lowerFileName = fileName.toLower(); | - |
243 | QMimeGlobMatchResult result; | - |
244 | | - |
245 | for (CacheFile *cacheFile : qAsConst(m_cacheFiles)) { | - |
246 | matchGlobList(result, cacheFile, cacheFile->getUint32(PosLiteralListOffset), fileName); | - |
247 | matchGlobList(result, cacheFile, cacheFile->getUint32(PosGlobListOffset), fileName); | - |
248 | const int reverseSuffixTreeOffset = cacheFile->getUint32(PosReverseSuffixTreeOffset); | - |
249 | const int numRoots = cacheFile->getUint32(reverseSuffixTreeOffset); | - |
250 | const int firstRootOffset = cacheFile->getUint32(reverseSuffixTreeOffset + 4); | - |
251 | matchSuffixTree(result, cacheFile, numRoots, firstRootOffset, lowerFileName, fileName.length() - 1, false); | - |
252 | if (result.m_matchingMimeTypes.isEmpty()TRUE | evaluated 34 times by 3 testsEvaluated by:- tst_QGraphicsWidget
- tst_QIcon
- tst_QMimeDatabase
| FALSE | evaluated 2492 times by 21 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFontComboBox
- tst_QGraphicsProxyWidget
- tst_QGuiApplication
- tst_QGuiVariant
- tst_QIcon
- tst_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
|
) | 34-2492 |
253 | matchSuffixTree(result, cacheFile, numRoots, firstRootOffset, fileName, fileName.length() - 1, true);executed 34 times by 3 tests: matchSuffixTree(result, cacheFile, numRoots, firstRootOffset, fileName, fileName.length() - 1, true); Executed by:- tst_QGraphicsWidget
- tst_QIcon
- tst_QMimeDatabase
| 34 |
254 | }executed 2526 times by 22 tests: end of block Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 2526 |
255 | if (foundSuffixTRUE | evaluated 8 times by 1 test | FALSE | evaluated 2515 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) | 8-2515 |
256 | *executed 8 times by 1 test: *foundSuffix = result.m_foundSuffix; foundSuffix = result.m_foundSuffix;executed 8 times by 1 test: *foundSuffix = result.m_foundSuffix; | 8 |
257 | returnexecuted 2523 times by 22 tests: return result.m_matchingMimeTypes; Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
result.m_matchingMimeTypes;executed 2523 times by 22 tests: return result.m_matchingMimeTypes; Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 2523 |
258 | } | - |
259 | | - |
260 | void QMimeBinaryProvider::matchGlobList(QMimeGlobMatchResult &result, CacheFile *cacheFile, int off, const QString &fileName) | - |
261 | { | - |
262 | const int numGlobs = cacheFile->getUint32(off); | - |
263 | | - |
264 | for (int i = 0; i < numGlobsTRUE | evaluated 45324 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| FALSE | evaluated 5052 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
; ++i) { | 5052-45324 |
265 | const int globOffset = cacheFile->getUint32(off + 4 + 12 * i); | - |
266 | const int mimeTypeOffset = cacheFile->getUint32(off + 4 + 12 * i + 4); | - |
267 | const int flagsAndWeight = cacheFile->getUint32(off + 4 + 12 * i + 8); | - |
268 | const int weight = flagsAndWeight & 0xff; | - |
269 | const bool caseSensitive = flagsAndWeight & 0x100; | - |
270 | const Qt::CaseSensitivity qtCaseSensitive = caseSensitiveTRUE | evaluated 2523 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| FALSE | evaluated 42801 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
? Qt::CaseSensitive : Qt::CaseInsensitive; | 2523-42801 |
271 | const QString pattern = QLatin1String(cacheFile->getCharStar(globOffset)); | - |
272 | | - |
273 | const char *mimeType = cacheFile->getCharStar(mimeTypeOffset); | - |
274 | | - |
275 | QMimeGlobPattern glob(pattern, QString() , weight, qtCaseSensitive); | - |
276 | | - |
277 | | - |
278 | if (glob.matchFileName(fileName)TRUE | evaluated 16 times by 1 test | FALSE | evaluated 45308 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) | 16-45308 |
279 | result.addMatch(QLatin1String(mimeType), weight, pattern);executed 16 times by 1 test: result.addMatch(QLatin1String(mimeType), weight, pattern); | 16 |
280 | }executed 45324 times by 22 tests: end of block Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 45324 |
281 | }executed 5052 times by 22 tests: end of block Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 5052 |
282 | | - |
283 | bool QMimeBinaryProvider::matchSuffixTree(QMimeGlobMatchResult &result, QMimeBinaryProvider::CacheFile *cacheFile, int numEntries, int firstOffset, const QString &fileName, int charPos, bool caseSensitiveCheck) | - |
284 | { | - |
285 | QChar fileChar = fileName[charPos]; | - |
286 | int min = 0; | - |
287 | int max = numEntries - 1; | - |
288 | while (min <= maxTRUE | evaluated 18328 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| FALSE | evaluated 2554 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) { | 2554-18328 |
289 | const int mid = (min + max) / 2; | - |
290 | const int off = firstOffset + 12 * mid; | - |
291 | const QChar ch = cacheFile->getUint32(off); | - |
292 | if (ch < fileCharTRUE | evaluated 7882 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| FALSE | evaluated 10446 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) | 7882-10446 |
293 | min = mid + 1;executed 7882 times by 22 tests: min = mid + 1; Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 7882 |
294 | else if (ch > fileCharTRUE | evaluated 354 times by 3 testsEvaluated by:- tst_QGraphicsWidget
- tst_QIcon
- tst_QMimeDatabase
| FALSE | evaluated 10092 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) | 354-10092 |
295 | max = mid - 1;executed 354 times by 3 tests: max = mid - 1; Executed by:- tst_QGraphicsWidget
- tst_QIcon
- tst_QMimeDatabase
| 354 |
296 | else { | - |
297 | --charPos; | - |
298 | int numChildren = cacheFile->getUint32(off + 4); | - |
299 | int childrenOffset = cacheFile->getUint32(off + 8); | - |
300 | bool success = false; | - |
301 | if (charPos > 0TRUE | evaluated 10086 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| FALSE | evaluated 6 times by 1 test |
) | 6-10086 |
302 | success = matchSuffixTree(result, cacheFile, numChildren, childrenOffset, fileName, charPos, caseSensitiveCheck);executed 10086 times by 22 tests: success = matchSuffixTree(result, cacheFile, numChildren, childrenOffset, fileName, charPos, caseSensitiveCheck); Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 10086 |
303 | if (!successTRUE | evaluated 2608 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| FALSE | evaluated 7484 times by 21 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFontComboBox
- tst_QGraphicsProxyWidget
- tst_QGuiApplication
- tst_QGuiVariant
- tst_QIcon
- tst_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
|
) { | 2608-7484 |
304 | for (int i = 0; i < numChildrenTRUE | evaluated 5043 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| FALSE | evaluated 2484 times by 21 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFontComboBox
- tst_QGraphicsProxyWidget
- tst_QGuiApplication
- tst_QGuiVariant
- tst_QIcon
- tst_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
|
; ++i) { | 2484-5043 |
305 | const int childOff = childrenOffset + 12 * i; | - |
306 | const int mch = cacheFile->getUint32(childOff); | - |
307 | if (mch != 0TRUE | evaluated 124 times by 3 testsEvaluated by:- tst_QGraphicsWidget
- tst_QIcon
- tst_QMimeDatabase
| FALSE | evaluated 4919 times by 21 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFontComboBox
- tst_QGraphicsProxyWidget
- tst_QGuiApplication
- tst_QGuiVariant
- tst_QIcon
- tst_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
|
) | 124-4919 |
308 | break;executed 124 times by 3 tests: break; Executed by:- tst_QGraphicsWidget
- tst_QIcon
- tst_QMimeDatabase
| 124 |
309 | const int mimeTypeOffset = cacheFile->getUint32(childOff + 4); | - |
310 | const char *mimeType = cacheFile->getCharStar(mimeTypeOffset); | - |
311 | const int flagsAndWeight = cacheFile->getUint32(childOff + 8); | - |
312 | const int weight = flagsAndWeight & 0xff; | - |
313 | const bool caseSensitive = flagsAndWeight & 0x100; | - |
314 | if (caseSensitiveCheckTRUE | evaluated 4 times by 1 test | FALSE | evaluated 4915 times by 21 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFontComboBox
- tst_QGraphicsProxyWidget
- tst_QGuiApplication
- tst_QGuiVariant
- tst_QIcon
- tst_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
|
|| !caseSensitiveTRUE | evaluated 4911 times by 21 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFontComboBox
- tst_QGraphicsProxyWidget
- tst_QGuiApplication
- tst_QGuiVariant
- tst_QIcon
- tst_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
| FALSE | evaluated 4 times by 1 test |
) { | 4-4915 |
315 | result.addMatch(QLatin1String(mimeType), weight, QLatin1Char('*') + fileName.mid(charPos+1)); | - |
316 | success = true; | - |
317 | }executed 4915 times by 21 tests: end of block Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFontComboBox
- tst_QGraphicsProxyWidget
- tst_QGuiApplication
- tst_QGuiVariant
- tst_QIcon
- tst_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
| 4915 |
318 | }executed 4919 times by 21 tests: end of block Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFontComboBox
- tst_QGraphicsProxyWidget
- tst_QGuiApplication
- tst_QGuiVariant
- tst_QIcon
- tst_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
| 4919 |
319 | }executed 2608 times by 22 tests: end of block Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 2608 |
320 | returnexecuted 10092 times by 22 tests: return success; Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
success;executed 10092 times by 22 tests: return success; Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 10092 |
321 | } | - |
322 | } | - |
323 | returnexecuted 2554 times by 22 tests: return false; Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
false;executed 2554 times by 22 tests: return false; Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 2554 |
324 | } | - |
325 | | - |
326 | bool QMimeBinaryProvider::matchMagicRule(QMimeBinaryProvider::CacheFile *cacheFile, int numMatchlets, int firstOffset, const QByteArray &data) | - |
327 | { | - |
328 | const char *dataPtr = data.constData(); | - |
329 | const int dataSize = data.size(); | - |
330 | for (int matchlet = 0; matchlet < numMatchletsTRUE | evaluated 10116 times by 1 test | FALSE | evaluated 5890 times by 1 test |
; ++matchlet) { | 5890-10116 |
331 | const int off = firstOffset + matchlet * 32; | - |
332 | const int rangeStart = cacheFile->getUint32(off); | - |
333 | const int rangeLength = cacheFile->getUint32(off + 4); | - |
334 | | - |
335 | const int valueLength = cacheFile->getUint32(off + 12); | - |
336 | const int valueOffset = cacheFile->getUint32(off + 16); | - |
337 | const int maskOffset = cacheFile->getUint32(off + 20); | - |
338 | const char *mask = maskOffsetTRUE | evaluated 215 times by 1 test | FALSE | evaluated 9901 times by 1 test |
? cacheFile->getCharStar(maskOffset) : __null; | 215-9901 |
339 | | - |
340 | if (!QMimeMagicRule::matchSubstring(dataPtr, dataSize, rangeStart, rangeLength, valueLength, cacheFile->getCharStar(valueOffset), mask)TRUE | evaluated 10071 times by 1 test | FALSE | evaluated 45 times by 1 test |
) | 45-10071 |
341 | continue;executed 10071 times by 1 test: continue; | 10071 |
342 | | - |
343 | const int numChildren = cacheFile->getUint32(off + 24); | - |
344 | const int firstChildOffset = cacheFile->getUint32(off + 28); | - |
345 | if (numChildren == 0TRUE | evaluated 23 times by 1 test | FALSE | evaluated 22 times by 1 test |
) | 22-23 |
346 | returnexecuted 23 times by 1 test: return true; true;executed 23 times by 1 test: return true; | 23 |
347 | | - |
348 | if (matchMagicRule(cacheFile, numChildren, firstChildOffset, data)TRUE | evaluated 4 times by 1 test | FALSE | evaluated 18 times by 1 test |
) | 4-18 |
349 | returnexecuted 4 times by 1 test: return true; true;executed 4 times by 1 test: return true; | 4 |
350 | }executed 18 times by 1 test: end of block | 18 |
351 | returnexecuted 5890 times by 1 test: return false; false;executed 5890 times by 1 test: return false; | 5890 |
352 | } | - |
353 | | - |
354 | QMimeType QMimeBinaryProvider::findByMagic(const QByteArray &data, int *accuracyPtr) | - |
355 | { | - |
356 | checkCache(); | - |
357 | for (CacheFile *cacheFile : qAsConst(m_cacheFiles)) { | - |
358 | const int magicListOffset = cacheFile->getUint32(PosMagicListOffset); | - |
359 | const int numMatches = cacheFile->getUint32(magicListOffset); | - |
360 | | - |
361 | const int firstMatchOffset = cacheFile->getUint32(magicListOffset + 8); | - |
362 | | - |
363 | for (int i = 0; i < numMatchesTRUE | evaluated 5895 times by 1 test | FALSE | evaluated 9 times by 1 test |
; ++i) { | 9-5895 |
364 | const int off = firstMatchOffset + i * 16; | - |
365 | const int numMatchlets = cacheFile->getUint32(off + 8); | - |
366 | const int firstMatchletOffset = cacheFile->getUint32(off + 12); | - |
367 | if (matchMagicRule(cacheFile, numMatchlets, firstMatchletOffset, data)TRUE | evaluated 23 times by 1 test | FALSE | evaluated 5872 times by 1 test |
) { | 23-5872 |
368 | const int mimeTypeOffset = cacheFile->getUint32(off + 4); | - |
369 | const char *mimeType = cacheFile->getCharStar(mimeTypeOffset); | - |
370 | *accuracyPtr = cacheFile->getUint32(off); | - |
371 | | - |
372 | | - |
373 | returnexecuted 23 times by 1 test: return mimeTypeForNameUnchecked(QLatin1String(mimeType)); mimeTypeForNameUnchecked(QLatin1String(mimeType));executed 23 times by 1 test: return mimeTypeForNameUnchecked(QLatin1String(mimeType)); | 23 |
374 | } | - |
375 | }executed 5872 times by 1 test: end of block | 5872 |
376 | }executed 9 times by 1 test: end of block | 9 |
377 | returnexecuted 9 times by 1 test: return QMimeType(); QMimeType();executed 9 times by 1 test: return QMimeType(); | 9 |
378 | } | - |
379 | | - |
380 | QStringList QMimeBinaryProvider::parents(const QString &mime) | - |
381 | { | - |
382 | checkCache(); | - |
383 | const QByteArray mimeStr = mime.toLatin1(); | - |
384 | QStringList result; | - |
385 | for (CacheFile *cacheFile : qAsConst(m_cacheFiles)) { | - |
386 | const int parentListOffset = cacheFile->getUint32(PosParentListOffset); | - |
387 | const int numEntries = cacheFile->getUint32(parentListOffset); | - |
388 | | - |
389 | int begin = 0; | - |
390 | int end = numEntries - 1; | - |
391 | while (begin <= endTRUE | evaluated 466 times by 1 test | FALSE | evaluated 34 times by 1 test |
) { | 34-466 |
392 | const int medium = (begin + end) / 2; | - |
393 | const int off = parentListOffset + 4 + 8 * medium; | - |
394 | const int mimeOffset = cacheFile->getUint32(off); | - |
395 | const char *aMime = cacheFile->getCharStar(mimeOffset); | - |
396 | const int cmp = qstrcmp(aMime, mimeStr); | - |
397 | if (cmp < 0TRUE | evaluated 230 times by 1 test | FALSE | evaluated 236 times by 1 test |
) { | 230-236 |
398 | begin = medium + 1; | - |
399 | }executed 230 times by 1 test: end of block else if (cmp > 0TRUE | evaluated 210 times by 1 test | FALSE | evaluated 26 times by 1 test |
) { | 26-230 |
400 | end = medium - 1; | - |
401 | }executed 210 times by 1 test: end of block else { | 210 |
402 | const int parentsOffset = cacheFile->getUint32(off + 4); | - |
403 | const int numParents = cacheFile->getUint32(parentsOffset); | - |
404 | for (int i = 0; i < numParentsTRUE | evaluated 34 times by 1 test | FALSE | evaluated 26 times by 1 test |
; ++i) { | 26-34 |
405 | const int parentOffset = cacheFile->getUint32(parentsOffset + 4 + 4 * i); | - |
406 | const char *aParent = cacheFile->getCharStar(parentOffset); | - |
407 | result.append(QString::fromLatin1(aParent)); | - |
408 | }executed 34 times by 1 test: end of block | 34 |
409 | break;executed 26 times by 1 test: break; | 26 |
410 | } | - |
411 | } | - |
412 | }executed 60 times by 1 test: end of block | 60 |
413 | if (result.isEmpty()TRUE | evaluated 34 times by 1 test | FALSE | evaluated 26 times by 1 test |
) { | 26-34 |
414 | const QString parent = fallbackParent(mime); | - |
415 | if (!parent.isEmpty()TRUE | evaluated 22 times by 1 test | FALSE | evaluated 12 times by 1 test |
) | 12-22 |
416 | result.append(parent);executed 22 times by 1 test: result.append(parent); | 22 |
417 | }executed 34 times by 1 test: end of block | 34 |
418 | returnexecuted 60 times by 1 test: return result; result;executed 60 times by 1 test: return result; | 60 |
419 | } | - |
420 | | - |
421 | QString QMimeBinaryProvider::resolveAlias(const QString &name) | - |
422 | { | - |
423 | checkCache(); | - |
424 | const QByteArray input = name.toLatin1(); | - |
425 | for (CacheFile *cacheFile : qAsConst(m_cacheFiles)) { | - |
426 | const int aliasListOffset = cacheFile->getUint32(PosAliasListOffset); | - |
427 | const int numEntries = cacheFile->getUint32(aliasListOffset); | - |
428 | int begin = 0; | - |
429 | int end = numEntries - 1; | - |
430 | while (begin <= endTRUE | evaluated 36002 times by 23 testsEvaluated 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
| FALSE | evaluated 4609 times by 23 testsEvaluated 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
|
) { | 4609-36002 |
431 | const int medium = (begin + end) / 2; | - |
432 | const int off = aliasListOffset + 4 + 8 * medium; | - |
433 | const int aliasOffset = cacheFile->getUint32(off); | - |
434 | const char *alias = cacheFile->getCharStar(aliasOffset); | - |
435 | const int cmp = qstrcmp(alias, input); | - |
436 | if (cmp < 0TRUE | evaluated 18281 times by 23 testsEvaluated 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
| FALSE | evaluated 17721 times by 23 testsEvaluated 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
|
) { | 17721-18281 |
437 | begin = medium + 1; | - |
438 | }executed 18281 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_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
else if (cmp > 0TRUE | evaluated 17712 times by 23 testsEvaluated 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
| FALSE | evaluated 9 times by 1 test |
) { | 9-18281 |
439 | end = medium - 1; | - |
440 | }executed 17712 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_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
else { | 17712 |
441 | const int mimeOffset = cacheFile->getUint32(off + 4); | - |
442 | const char *mimeType = cacheFile->getCharStar(mimeOffset); | - |
443 | returnexecuted 9 times by 1 test: return QLatin1String(mimeType); QLatin1String(mimeType);executed 9 times by 1 test: return QLatin1String(mimeType); | 9 |
444 | } | - |
445 | } | - |
446 | }executed 4609 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_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
| 4609 |
447 | | - |
448 | returnexecuted 4598 times by 23 tests: return name; 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
name;executed 4598 times by 23 tests: return name; 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
| 4598 |
449 | } | - |
450 | | - |
451 | QStringList QMimeBinaryProvider::listAliases(const QString &name) | - |
452 | { | - |
453 | checkCache(); | - |
454 | QStringList result; | - |
455 | const QByteArray input = name.toLatin1(); | - |
456 | for (CacheFile *cacheFile : qAsConst(m_cacheFiles)) { | - |
457 | const int aliasListOffset = cacheFile->getUint32(PosAliasListOffset); | - |
458 | const int numEntries = cacheFile->getUint32(aliasListOffset); | - |
459 | for (int pos = 0; pos < numEntriesTRUE | evaluated 776 times by 1 test | FALSE | evaluated 4 times by 1 test |
; ++pos) { | 4-776 |
460 | const int off = aliasListOffset + 4 + 8 * pos; | - |
461 | const int mimeOffset = cacheFile->getUint32(off + 4); | - |
462 | const char *mimeType = cacheFile->getCharStar(mimeOffset); | - |
463 | | - |
464 | if (input == mimeTypeTRUE | evaluated 4 times by 1 test | FALSE | evaluated 772 times by 1 test |
) { | 4-772 |
465 | const int aliasOffset = cacheFile->getUint32(off); | - |
466 | const char *alias = cacheFile->getCharStar(aliasOffset); | - |
467 | result.append(QString::fromLatin1(alias)); | - |
468 | }executed 4 times by 1 test: end of block | 4 |
469 | }executed 776 times by 1 test: end of block | 776 |
470 | }executed 4 times by 1 test: end of block | 4 |
471 | returnexecuted 4 times by 1 test: return result; result;executed 4 times by 1 test: return result; | 4 |
472 | } | - |
473 | | - |
474 | void QMimeBinaryProvider::loadMimeTypeList() | - |
475 | { | - |
476 | if (!m_mimetypeListLoadedTRUE | evaluated 28 times by 23 testsEvaluated 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
| FALSE | evaluated 5 times by 1 test |
) { | 5-28 |
477 | m_mimetypeListLoaded = true; | - |
478 | m_mimetypeNames.clear(); | - |
479 | | - |
480 | | - |
481 | const QStringList typesFilenames = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QLatin1String("mime/types")); | - |
482 | for (const QString &typeFilename : typesFilenames) { | - |
483 | QFile file(typeFilename); | - |
484 | if (file.open(QIODevice::ReadOnly)TRUE | evaluated 31 times by 23 testsEvaluated 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
| FALSE | never evaluated |
) { | 0-31 |
485 | while (!file.atEnd()TRUE | evaluated 19818 times by 23 testsEvaluated 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
| FALSE | evaluated 31 times by 23 testsEvaluated 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
|
) { | 31-19818 |
486 | QByteArray line = file.readLine(); | - |
487 | line.chop(1); | - |
488 | m_mimetypeNames.insert(QString::fromLatin1(line.constData(), line.size())); | - |
489 | }executed 19818 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_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
| 19818 |
490 | }executed 31 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_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
| 31 |
491 | }executed 31 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_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
| 31 |
492 | }executed 28 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_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
| 28 |
493 | }executed 33 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_QMimeDatabase
- tst_QPrinter
- tst_QSidebar
- tst_QStyle
- tst_QSystemTrayIcon
- tst_QToolButton
- tst_languageChange
| 33 |
494 | | - |
495 | QList<QMimeType> QMimeBinaryProvider::allMimeTypes() | - |
496 | { | - |
497 | QList<QMimeType> result; | - |
498 | loadMimeTypeList(); | - |
499 | result.reserve(m_mimetypeNames.count()); | - |
500 | | - |
501 | for (QSet<QString>::const_iterator it = m_mimetypeNames.constBegin(); | - |
502 | it != m_mimetypeNames.constEnd()TRUE | evaluated 3315 times by 1 test | FALSE | evaluated 5 times by 1 test |
; ++it) | 5-3315 |
503 | result.append(mimeTypeForNameUnchecked(*it));executed 3315 times by 1 test: result.append(mimeTypeForNameUnchecked(*it)); | 3315 |
504 | | - |
505 | returnexecuted 5 times by 1 test: return result; result;executed 5 times by 1 test: return result; | 5 |
506 | } | - |
507 | | - |
508 | void QMimeBinaryProvider::loadMimeTypePrivate(QMimeTypePrivate &data) | - |
509 | { | - |
510 | | - |
511 | | - |
512 | | - |
513 | | - |
514 | if (data.loadedTRUE | evaluated 10 times by 1 test | FALSE | evaluated 2447 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) | 10-2447 |
515 | return;executed 10 times by 1 test: return; | 10 |
516 | data.loaded = true; | - |
517 | | - |
518 | | - |
519 | const QString file = data.name + QLatin1String(".xml"); | - |
520 | | - |
521 | QStringList mimeFiles = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QString::fromLatin1("mime/") + file.toLower()); | - |
522 | if (mimeFiles.isEmpty()TRUE | never evaluated | FALSE | evaluated 2447 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) { | 0-2447 |
523 | mimeFiles = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QString::fromLatin1("mime/") + file); | - |
524 | } never executed: end of block | 0 |
525 | if (mimeFiles.isEmpty()TRUE | never evaluated | FALSE | evaluated 2447 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) { | 0-2447 |
526 | QMessageLogger(__FILE__, 577, __PRETTY_FUNCTION__).warning() << "No file found for" << file << ", even though update-mime-info said it would exist.\n" | - |
527 | "Either it was just removed, or the directory doesn't have executable permission..." | - |
528 | << QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QLatin1String("mime"), QStandardPaths::LocateDirectory); | - |
529 | return; never executed: return; | 0 |
530 | } | - |
531 | | - |
532 | QString mainPattern; | - |
533 | | - |
534 | for (QStringList::const_reverse_iterator it = mimeFiles.crbegin(), end = mimeFiles.crend(); it != endTRUE | evaluated 2447 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| FALSE | evaluated 2447 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
; ++it) { | 2447 |
535 | QFile qfile(*it); | - |
536 | if (!qfile.open(QFile::ReadOnly)TRUE | never evaluated | FALSE | evaluated 2447 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) | 0-2447 |
537 | continue; never executed: continue; | 0 |
538 | | - |
539 | QXmlStreamReader xml(&qfile); | - |
540 | if (xml.readNextStartElement()TRUE | evaluated 2447 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| FALSE | never evaluated |
) { | 0-2447 |
541 | if (xml.name() != QLatin1String("mime-type")TRUE | never evaluated | FALSE | evaluated 2447 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) { | 0-2447 |
542 | continue; never executed: continue; | 0 |
543 | } | - |
544 | const QStringRef name = xml.attributes().value(QLatin1String("type")); | - |
545 | if (name.isEmpty()TRUE | never evaluated | FALSE | evaluated 2447 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) | 0-2447 |
546 | continue; never executed: continue; | 0 |
547 | if (name.compare(data.name, Qt::CaseInsensitive)TRUE | never evaluated | FALSE | evaluated 2447 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) | 0-2447 |
548 | QMessageLogger(__FILE__, 599, __PRETTY_FUNCTION__).warning() << "Got name" << name << "in file" << file << "expected" << data.name; never executed: QMessageLogger(__FILE__, 599, __PRETTY_FUNCTION__).warning() << "Got name" << name << "in file" << file << "expected" << data.name; | 0 |
549 | | - |
550 | while (xml.readNextStartElement()TRUE | evaluated 117409 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| FALSE | evaluated 2447 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) { | 2447-117409 |
551 | const QStringRef tag = xml.name(); | - |
552 | if (tag == QLatin1String("comment")TRUE | evaluated 114909 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| FALSE | evaluated 2500 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) { | 2500-114909 |
553 | QString lang = xml.attributes().value(QLatin1String("xml:lang")).toString(); | - |
554 | const QString text = xml.readElementText(); | - |
555 | if (lang.isEmpty()TRUE | evaluated 2447 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| FALSE | evaluated 112462 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) { | 2447-112462 |
556 | lang = QLatin1String("en_US"); | - |
557 | }executed 2447 times by 22 tests: end of block Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 2447 |
558 | data.localeComments.insert(lang, text); | - |
559 | continue;executed 114909 times by 22 tests: continue; Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 114909 |
560 | } else if (tag == QLatin1String("icon")TRUE | never evaluated | FALSE | evaluated 2500 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) { | 0-2500 |
561 | data.iconName = xml.attributes().value(QLatin1String("name")).toString(); | - |
562 | } never executed: end of block else if (tag == QLatin1String("glob-deleteall")TRUE | evaluated 1 time by 1 test | FALSE | evaluated 2499 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
) { | 0-2499 |
563 | data.globPatterns.clear(); | - |
564 | }executed 1 time by 1 test: end of block else if (tag == QLatin1String("glob")TRUE | evaluated 2463 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| FALSE | evaluated 36 times by 2 testsEvaluated by:- tst_QIcon
- tst_QMimeDatabase
|
) { | 1-2463 |
565 | const QString pattern = xml.attributes().value(QLatin1String("pattern")).toString(); | - |
566 | if (mainPattern.isEmpty()TRUE | evaluated 2443 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| FALSE | evaluated 20 times by 2 testsEvaluated by:- tst_QIcon
- tst_QMimeDatabase
|
&& pattern.startsWith(QLatin1Char('*'))TRUE | evaluated 2442 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| FALSE | evaluated 1 time by 1 test |
) { | 1-2443 |
567 | mainPattern = pattern; | - |
568 | }executed 2442 times by 22 tests: end of block Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 2442 |
569 | if (!data.globPatterns.contains(pattern)TRUE | evaluated 2463 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| FALSE | never evaluated |
) | 0-2463 |
570 | data.globPatterns.append(pattern);executed 2463 times by 22 tests: data.globPatterns.append(pattern); Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 2463 |
571 | }executed 2463 times by 22 tests: end of block Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 2463 |
572 | xml.skipCurrentElement(); | - |
573 | }executed 2500 times by 22 tests: end of block Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 2500 |
574 | ((!(xml.name() == QLatin1String("mime-type"))) ? qt_assert("xml.name() == QLatin1String(\"mime-type\")",__FILE__,625) : qt_noop()); | - |
575 | }executed 2447 times by 22 tests: end of block Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 2447 |
576 | }executed 2447 times by 22 tests: end of block Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 2447 |
577 | | - |
578 | | - |
579 | | - |
580 | | - |
581 | if (!mainPattern.isEmpty()TRUE | evaluated 2442 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| FALSE | evaluated 5 times by 1 test |
&& (data.globPatterns.isEmpty()TRUE | evaluated 1 time by 1 test | FALSE | evaluated 2441 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
|| data.globPatterns.constFirst() != mainPatternTRUE | never evaluated | FALSE | evaluated 2441 times by 22 testsEvaluated by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
|
)) { | 0-2442 |
582 | | - |
583 | data.globPatterns.removeAll(mainPattern); | - |
584 | data.globPatterns.prepend(mainPattern); | - |
585 | }executed 1 time by 1 test: end of block | 1 |
586 | }executed 2447 times by 22 tests: end of block Executed by:- tst_QAccessibility
- tst_QCalendarWidget
- tst_QComboBox
- tst_QCompleter
- tst_QDateTimeEdit
- 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
| 2447 |
587 | | - |
588 | | - |
589 | QString QMimeBinaryProvider::iconForMime(CacheFile *cacheFile, int posListOffset, const QByteArray &inputMime) | - |
590 | { | - |
591 | const int iconsListOffset = cacheFile->getUint32(posListOffset); | - |
592 | const int numIcons = cacheFile->getUint32(iconsListOffset); | - |
593 | int begin = 0; | - |
594 | int end = numIcons - 1; | - |
595 | while (begin <= endTRUE | evaluated 34 times by 1 test | FALSE | evaluated 6 times by 1 test |
) { | 6-34 |
596 | const int medium = (begin + end) / 2; | - |
597 | const int off = iconsListOffset + 4 + 8 * medium; | - |
598 | const int mimeOffset = cacheFile->getUint32(off); | - |
599 | const char *mime = cacheFile->getCharStar(mimeOffset); | - |
600 | const int cmp = qstrcmp(mime, inputMime); | - |
601 | if (cmp < 0TRUE | evaluated 18 times by 1 test | FALSE | evaluated 16 times by 1 test |
) | 16-18 |
602 | begin = medium + 1;executed 18 times by 1 test: begin = medium + 1; | 18 |
603 | else if (cmp > 0TRUE | evaluated 14 times by 1 test | FALSE | evaluated 2 times by 1 test |
) | 2-14 |
604 | end = medium - 1;executed 14 times by 1 test: end = medium - 1; | 14 |
605 | else { | - |
606 | const int iconOffset = cacheFile->getUint32(off + 4); | - |
607 | returnexecuted 2 times by 1 test: return QLatin1String(cacheFile->getCharStar(iconOffset)); QLatin1String(cacheFile->getCharStar(iconOffset));executed 2 times by 1 test: return QLatin1String(cacheFile->getCharStar(iconOffset)); | 2 |
608 | } | - |
609 | } | - |
610 | returnexecuted 6 times by 1 test: return QString(); QString();executed 6 times by 1 test: return QString(); | 6 |
611 | } | - |
612 | | - |
613 | void QMimeBinaryProvider::loadIcon(QMimeTypePrivate &data) | - |
614 | { | - |
615 | checkCache(); | - |
616 | const QByteArray inputMime = data.name.toLatin1(); | - |
617 | for (CacheFile *cacheFile : qAsConst(m_cacheFiles)) { | - |
618 | const QString icon = iconForMime(cacheFile, PosIconsListOffset, inputMime); | - |
619 | if (!icon.isEmpty()TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
) { | 0-4 |
620 | data.iconName = icon; | - |
621 | return; never executed: return; | 0 |
622 | } | - |
623 | }executed 4 times by 1 test: end of block | 4 |
624 | }executed 4 times by 1 test: end of block | 4 |
625 | | - |
626 | void QMimeBinaryProvider::loadGenericIcon(QMimeTypePrivate &data) | - |
627 | { | - |
628 | checkCache(); | - |
629 | const QByteArray inputMime = data.name.toLatin1(); | - |
630 | for (CacheFile *cacheFile : qAsConst(m_cacheFiles)) { | - |
631 | const QString icon = iconForMime(cacheFile, PosGenericIconsListOffset, inputMime); | - |
632 | if (!icon.isEmpty()TRUE | evaluated 2 times by 1 test | FALSE | evaluated 2 times by 1 test |
) { | 2 |
633 | data.genericIconName = icon; | - |
634 | return;executed 2 times by 1 test: return; | 2 |
635 | } | - |
636 | }executed 2 times by 1 test: end of block | 2 |
637 | }executed 2 times by 1 test: end of block | 2 |
638 | | - |
639 | | - |
640 | | - |
641 | QMimeXMLProvider::QMimeXMLProvider(QMimeDatabasePrivate *db) | - |
642 | : QMimeProviderBase(db), m_loaded(false) | - |
643 | { | - |
644 | initResources(); | - |
645 | }executed 2 times by 2 tests: end of block Executed by:- tst_QMimeDatabase
- tst_qmimetype
| 2 |
646 | | - |
647 | QMimeXMLProvider::~QMimeXMLProvider() | - |
648 | { | - |
649 | } | - |
650 | | - |
651 | bool QMimeXMLProvider::isValid() | - |
652 | { | - |
653 | return never executed: return true; true;never executed: return true; | 0 |
654 | } | - |
655 | | - |
656 | QMimeType QMimeXMLProvider::mimeTypeForName(const QString &name) | - |
657 | { | - |
658 | ensureLoaded(); | - |
659 | | - |
660 | returnexecuted 2183 times by 1 test: return m_nameMimeTypeMap.value(name); m_nameMimeTypeMap.value(name);executed 2183 times by 1 test: return m_nameMimeTypeMap.value(name); | 2183 |
661 | } | - |
662 | | - |
663 | QStringList QMimeXMLProvider::findByFileName(const QString &fileName, QString *foundSuffix) | - |
664 | { | - |
665 | ensureLoaded(); | - |
666 | | - |
667 | const QStringList matchingMimeTypes = m_mimeTypeGlobs.matchingGlobs(fileName, foundSuffix); | - |
668 | returnexecuted 96 times by 1 test: return matchingMimeTypes; matchingMimeTypes;executed 96 times by 1 test: return matchingMimeTypes; | 96 |
669 | } | - |
670 | | - |
671 | QMimeType QMimeXMLProvider::findByMagic(const QByteArray &data, int *accuracyPtr) | - |
672 | { | - |
673 | ensureLoaded(); | - |
674 | | - |
675 | QString candidate; | - |
676 | | - |
677 | for (const QMimeMagicRuleMatcher &matcher : qAsConst(m_magicMatchers)) { | - |
678 | if (matcher.matches(data)TRUE | evaluated 37 times by 1 test | FALSE | evaluated 11003 times by 1 test |
) { | 37-11003 |
679 | const int priority = matcher.priority(); | - |
680 | if (priority > *accuracyPtrTRUE | evaluated 23 times by 1 test | FALSE | evaluated 14 times by 1 test |
) { | 14-23 |
681 | *accuracyPtr = priority; | - |
682 | candidate = matcher.mimetype(); | - |
683 | }executed 23 times by 1 test: end of block | 23 |
684 | }executed 37 times by 1 test: end of block | 37 |
685 | }executed 11040 times by 1 test: end of block | 11040 |
686 | returnexecuted 32 times by 1 test: return mimeTypeForName(candidate); mimeTypeForName(candidate);executed 32 times by 1 test: return mimeTypeForName(candidate); | 32 |
687 | } | - |
688 | | - |
689 | void QMimeXMLProvider::ensureLoaded() | - |
690 | { | - |
691 | if (!m_loadedTRUE | evaluated 1 time by 1 test | FALSE | evaluated 4556 times by 1 test |
|| shouldCheck()TRUE | evaluated 56 times by 1 test | FALSE | evaluated 4500 times by 1 test |
) { | 1-4556 |
692 | bool fdoXmlFound = false; | - |
693 | QStringList allFiles; | - |
694 | | - |
695 | const QStringList packageDirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QLatin1String("mime/packages"), QStandardPaths::LocateDirectory); | - |
696 | | - |
697 | for (const QString &packageDir : packageDirs) { | - |
698 | QDir dir(packageDir); | - |
699 | const QStringList files = dir.entryList(QDir::Files | QDir::NoDotAndDotDot); | - |
700 | | - |
701 | if (!fdoXmlFoundTRUE | evaluated 88 times by 1 test | FALSE | never evaluated |
) | 0-88 |
702 | fdoXmlFound = files.contains(QLatin1String("freedesktop.org.xml"));executed 88 times by 1 test: fdoXmlFound = files.contains(QLatin1String("freedesktop.org.xml")); | 88 |
703 | QStringList::const_iterator endIt(files.constEnd()); | - |
704 | for (QStringList::const_iterator it(files.constBegin()); it != endItTRUE | evaluated 261 times by 1 test | FALSE | evaluated 88 times by 1 test |
; ++it) { | 88-261 |
705 | allFiles.append(packageDir + QLatin1Char('/') + *it); | - |
706 | }executed 261 times by 1 test: end of block | 261 |
707 | }executed 88 times by 1 test: end of block | 88 |
708 | | - |
709 | if (!fdoXmlFoundTRUE | never evaluated | FALSE | evaluated 57 times by 1 test |
) { | 0-57 |
710 | | - |
711 | allFiles.prepend(QLatin1String(":/qt-project.org/qmime/freedesktop.org.xml")); | - |
712 | } never executed: end of block | 0 |
713 | | - |
714 | if (m_allFiles == allFilesTRUE | evaluated 52 times by 1 test | FALSE | evaluated 5 times by 1 test |
) | 5-52 |
715 | return;executed 52 times by 1 test: return; | 52 |
716 | m_allFiles = allFiles; | - |
717 | | - |
718 | m_nameMimeTypeMap.clear(); | - |
719 | m_aliases.clear(); | - |
720 | m_parents.clear(); | - |
721 | m_mimeTypeGlobs.clear(); | - |
722 | m_magicMatchers.clear(); | - |
723 | | - |
724 | | - |
725 | | - |
726 | for (const QString &file : qAsConst(allFiles)) | - |
727 | load(file);executed 17 times by 1 test: load(file); | 17 |
728 | }executed 5 times by 1 test: end of block | 5 |
729 | }executed 4505 times by 1 test: end of block | 4505 |
730 | | - |
731 | void QMimeXMLProvider::load(const QString &fileName) | - |
732 | { | - |
733 | QString errorMessage; | - |
734 | if (!load(fileName, &errorMessage)TRUE | never evaluated | FALSE | evaluated 17 times by 1 test |
) | 0-17 |
735 | QMessageLogger(__FILE__, 801, __PRETTY_FUNCTION__).warning("QMimeDatabase: Error loading %s\n%s", QString(fileName).toLocal8Bit().constData(), QString(errorMessage).toLocal8Bit().constData()); never executed: QMessageLogger(__FILE__, 801, __PRETTY_FUNCTION__).warning("QMimeDatabase: Error loading %s\n%s", QString(fileName).toLocal8Bit().constData(), QString(errorMessage).toLocal8Bit().constData()); | 0 |
736 | }executed 17 times by 1 test: end of block | 17 |
737 | | - |
738 | bool QMimeXMLProvider::load(const QString &fileName, QString *errorMessage) | - |
739 | { | - |
740 | m_loaded = true; | - |
741 | | - |
742 | QFile file(fileName); | - |
743 | if (!file.open(QIODevice::ReadOnly | QIODevice::Text)TRUE | never evaluated | FALSE | evaluated 17 times by 1 test |
) { | 0-17 |
744 | if (errorMessageTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
745 | * never executed: *errorMessage = QString::fromLatin1("Cannot open %1: %2").arg(fileName, file.errorString()); errorMessage = QString::fromLatin1("Cannot open %1: %2").arg(fileName, file.errorString());never executed: *errorMessage = QString::fromLatin1("Cannot open %1: %2").arg(fileName, file.errorString()); | 0 |
746 | return never executed: return false; false;never executed: return false; | 0 |
747 | } | - |
748 | | - |
749 | if (errorMessageTRUE | evaluated 17 times by 1 test | FALSE | never evaluated |
) | 0-17 |
750 | errorMessage->clear();executed 17 times by 1 test: errorMessage->clear(); | 17 |
751 | | - |
752 | QMimeTypeParser parser(*this); | - |
753 | returnexecuted 17 times by 1 test: return parser.parse(&file, fileName, errorMessage); parser.parse(&file, fileName, errorMessage);executed 17 times by 1 test: return parser.parse(&file, fileName, errorMessage); | 17 |
754 | } | - |
755 | | - |
756 | void QMimeXMLProvider::addGlobPattern(const QMimeGlobPattern &glob) | - |
757 | { | - |
758 | m_mimeTypeGlobs.addGlob(glob); | - |
759 | }executed 4136 times by 1 test: end of block | 4136 |
760 | | - |
761 | void QMimeXMLProvider::addMimeType(const QMimeType &mt) | - |
762 | { | - |
763 | m_nameMimeTypeMap.insert(mt.name(), mt); | - |
764 | }executed 3319 times by 1 test: end of block | 3319 |
765 | | - |
766 | QStringList QMimeXMLProvider::parents(const QString &mime) | - |
767 | { | - |
768 | ensureLoaded(); | - |
769 | QStringList result = m_parents.value(mime); | - |
770 | if (result.isEmpty()TRUE | evaluated 34 times by 1 test | FALSE | evaluated 26 times by 1 test |
) { | 26-34 |
771 | const QString parent = fallbackParent(mime); | - |
772 | if (!parent.isEmpty()TRUE | evaluated 22 times by 1 test | FALSE | evaluated 12 times by 1 test |
) | 12-22 |
773 | result.append(parent);executed 22 times by 1 test: result.append(parent); | 22 |
774 | }executed 34 times by 1 test: end of block | 34 |
775 | returnexecuted 60 times by 1 test: return result; result;executed 60 times by 1 test: return result; | 60 |
776 | } | - |
777 | | - |
778 | void QMimeXMLProvider::addParent(const QString &child, const QString &parent) | - |
779 | { | - |
780 | m_parents[child].append(parent); | - |
781 | }executed 1560 times by 1 test: end of block | 1560 |
782 | | - |
783 | QStringList QMimeXMLProvider::listAliases(const QString &name) | - |
784 | { | - |
785 | ensureLoaded(); | - |
786 | | - |
787 | returnexecuted 4 times by 1 test: return m_aliases.keys(name); m_aliases.keys(name);executed 4 times by 1 test: return m_aliases.keys(name); | 4 |
788 | } | - |
789 | | - |
790 | QString QMimeXMLProvider::resolveAlias(const QString &name) | - |
791 | { | - |
792 | ensureLoaded(); | - |
793 | returnexecuted 2177 times by 1 test: return m_aliases.value(name, name); m_aliases.value(name, name);executed 2177 times by 1 test: return m_aliases.value(name, name); | 2177 |
794 | } | - |
795 | | - |
796 | void QMimeXMLProvider::addAlias(const QString &alias, const QString &name) | - |
797 | { | - |
798 | m_aliases.insert(alias, name); | - |
799 | }executed 975 times by 1 test: end of block | 975 |
800 | | - |
801 | QList<QMimeType> QMimeXMLProvider::allMimeTypes() | - |
802 | { | - |
803 | ensureLoaded(); | - |
804 | returnexecuted 5 times by 1 test: return m_nameMimeTypeMap.values(); m_nameMimeTypeMap.values();executed 5 times by 1 test: return m_nameMimeTypeMap.values(); | 5 |
805 | } | - |
806 | | - |
807 | void QMimeXMLProvider::addMagicMatcher(const QMimeMagicRuleMatcher &matcher) | - |
808 | { | - |
809 | m_magicMatchers.append(matcher); | - |
810 | }executed 1733 times by 1 test: end of block | 1733 |
811 | | - |
812 | | - |
| | |