qmimetype.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/mimetypes/qmimetype.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11QMimeTypePrivate::QMimeTypePrivate()-
12 : loaded(false)-
13{}
executed 7974 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
7974
14-
15QMimeTypePrivate::QMimeTypePrivate(const QMimeType &other)-
16 : loaded(other.d->loaded),-
17 name(other.d->name),-
18 localeComments(other.d->localeComments),-
19 genericIconName(other.d->genericIconName),-
20 iconName(other.d->iconName),-
21 globPatterns(other.d->globPatterns)-
22{}
never executed: end of block
0
23-
24void QMimeTypePrivate::clear()-
25{-
26 name.clear();-
27 localeComments.clear();-
28 genericIconName.clear();-
29 iconName.clear();-
30 globPatterns.clear();-
31 loaded = false;-
32}
executed 3319 times by 1 test: end of block
Executed by:
  • tst_QMimeDatabase
3319
33-
34void QMimeTypePrivate::addGlobPattern(const QString &pattern)-
35{-
36 globPatterns.append(pattern);-
37}
executed 4136 times by 1 test: end of block
Executed by:
  • tst_QMimeDatabase
4136
38QMimeType::QMimeType() :-
39 d(new QMimeTypePrivate())-
40{-
41}
executed 40 times by 3 tests: end of block
Executed by:
  • tst_QDebug
  • tst_QMimeDatabase
  • tst_qmimetype
40
42-
43-
44-
45-
46-
47QMimeType::QMimeType(const QMimeType &other) :-
48 d(other.d)-
49{-
50}
executed 14717 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_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QToolButton
  • tst_languageChange
  • tst_qmimetype
14717
51-
52-
53-
54-
55-
56QMimeType &QMimeType::operator=(const QMimeType &other)-
57{-
58 if (d != other.d
d != other.dDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEnever evaluated
)
0-4
59 d = other.d;
executed 4 times by 1 test: d = other.d;
Executed by:
  • tst_QMimeDatabase
4
60 return
executed 4 times by 1 test: return *this;
Executed by:
  • tst_QMimeDatabase
*this;
executed 4 times by 1 test: return *this;
Executed by:
  • tst_QMimeDatabase
4
61}-
62-
63-
64-
65-
66-
67-
68QMimeType::QMimeType(const QMimeTypePrivate &dd) :-
69 d(new QMimeTypePrivate(dd))-
70{-
71}
executed 11236 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
11236
72QMimeType::~QMimeType()-
73{-
74}-
75-
76-
77-
78-
79-
80-
81-
82bool QMimeType::operator==(const QMimeType &other) const-
83{-
84 return
executed 3 times by 1 test: return d == other.d || d->name == other.d->name;
Executed by:
  • tst_qmimetype
d == other.d || d->name == other.d->name;
executed 3 times by 1 test: return d == other.d || d->name == other.d->name;
Executed by:
  • tst_qmimetype
3
85}-
86uint qHash(const QMimeType &key, uint seed) noexcept-
87{-
88 return
never executed: return qHash(key.d->name, seed);
qHash(key.d->name, seed);
never executed: return qHash(key.d->name, seed);
0
89}-
90bool QMimeType::isValid() const-
91{-
92 return
executed 6692 times by 23 tests: return !d->name.isEmpty();
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_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QToolButton
  • tst_languageChange
  • tst_qmimetype
!d->name.isEmpty();
executed 6692 times by 23 tests: return !d->name.isEmpty();
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_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QToolButton
  • tst_languageChange
  • tst_qmimetype
6692
93}-
94-
95-
96-
97-
98-
99-
100bool QMimeType::isDefault() const-
101{-
102 return
executed 18 times by 1 test: return d->name == QMimeDatabasePrivate::instance()->defaultMimeType();
Executed by:
  • tst_QMimeDatabase
d->name == QMimeDatabasePrivate::instance()->defaultMimeType();
executed 18 times by 1 test: return d->name == QMimeDatabasePrivate::instance()->defaultMimeType();
Executed by:
  • tst_QMimeDatabase
18
103}-
104-
105-
106-
107-
108-
109QString QMimeType::name() const-
110{-
111 return
executed 12543 times by 3 tests: return d->name;
Executed by:
  • tst_QDebug
  • tst_QMimeDatabase
  • tst_qmimetype
d->name;
executed 12543 times by 3 tests: return d->name;
Executed by:
  • tst_QDebug
  • tst_QMimeDatabase
  • tst_qmimetype
12543
112}-
113-
114-
115-
116-
117-
118-
119QString QMimeType::comment() const-
120{-
121 QMimeDatabasePrivate::instance()->provider()->loadMimeTypePrivate(*d);-
122-
123 QStringList languageList;-
124 languageList << QLocale().name();-
125 languageList << QLocale().uiLanguages();-
126 for (const QString &language : qAsConst(languageList)) {-
127 const QString lang = language == QLatin1String("C")
language == QLatin1String("C")Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
? QLatin1String("en_US") : language;
4-14
128 const QString comm = d->localeComments.value(lang);-
129 if (!comm.isEmpty()
!comm.isEmpty()Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
)
4-14
130 return
executed 14 times by 1 test: return comm;
Executed by:
  • tst_QMimeDatabase
comm;
executed 14 times by 1 test: return comm;
Executed by:
  • tst_QMimeDatabase
14
131 const int pos = lang.indexOf(QLatin1Char('_'));-
132 if (pos != -1
pos != -1Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEnever evaluated
) {
0-4
133-
134 const QString shortLang = lang.left(pos);-
135 const QString commShort = d->localeComments.value(shortLang);-
136 if (!commShort.isEmpty()
!commShort.isEmpty()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEnever evaluated
)
0-4
137 return
executed 4 times by 1 test: return commShort;
Executed by:
  • tst_QMimeDatabase
commShort;
executed 4 times by 1 test: return commShort;
Executed by:
  • tst_QMimeDatabase
4
138 }
never executed: end of block
0
139 }
never executed: end of block
0
140-
141-
142 return
never executed: return d->name;
d->name;
never executed: return d->name;
0
143}-
144QString QMimeType::genericIconName() const-
145{-
146 QMimeDatabasePrivate::instance()->provider()->loadGenericIcon(*d);-
147 if (d->genericIconName.isEmpty()
d->genericIconName.isEmpty()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_qmimetype
) {
4-5
148-
149-
150-
151-
152-
153 QString group = name();-
154 const int slashindex = group.indexOf(QLatin1Char('/'));-
155 if (slashindex != -1
slashindex != -1Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEnever evaluated
)
0-4
156 group = group.left(slashindex);
executed 4 times by 1 test: group = group.left(slashindex);
Executed by:
  • tst_QMimeDatabase
4
157 return
executed 4 times by 1 test: return group + QLatin1String("-x-generic");
Executed by:
  • tst_QMimeDatabase
group + QLatin1String("-x-generic");
executed 4 times by 1 test: return group + QLatin1String("-x-generic");
Executed by:
  • tst_QMimeDatabase
4
158 }-
159 return
executed 5 times by 2 tests: return d->genericIconName;
Executed by:
  • tst_QMimeDatabase
  • tst_qmimetype
d->genericIconName;
executed 5 times by 2 tests: return d->genericIconName;
Executed by:
  • tst_QMimeDatabase
  • tst_qmimetype
5
160}-
161-
162-
163-
164-
165-
166-
167-
168QString QMimeType::iconName() const-
169{-
170 QMimeDatabasePrivate::instance()->provider()->loadIcon(*d);-
171 if (d->iconName.isEmpty()
d->iconName.isEmpty()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_qmimetype
) {
3-6
172-
173 d->iconName = name();-
174 const int slashindex = d->iconName.indexOf(QLatin1Char('/'));-
175 if (slashindex != -1
slashindex != -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEnever evaluated
)
0-6
176 d->iconName[slashindex] = QLatin1Char('-');
executed 6 times by 1 test: d->iconName[slashindex] = QLatin1Char('-');
Executed by:
  • tst_QMimeDatabase
6
177 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_QMimeDatabase
6
178 return
executed 9 times by 2 tests: return d->iconName;
Executed by:
  • tst_QMimeDatabase
  • tst_qmimetype
d->iconName;
executed 9 times by 2 tests: return d->iconName;
Executed by:
  • tst_QMimeDatabase
  • tst_qmimetype
9
179}-
180-
181-
182-
183-
184-
185QStringList QMimeType::globPatterns() const-
186{-
187 QMimeDatabasePrivate::instance()->provider()->loadMimeTypePrivate(*d);-
188 return
executed 21 times by 2 tests: return d->globPatterns;
Executed by:
  • tst_QMimeDatabase
  • tst_qmimetype
d->globPatterns;
executed 21 times by 2 tests: return d->globPatterns;
Executed by:
  • tst_QMimeDatabase
  • tst_qmimetype
21
189}-
190QStringList QMimeType::parentMimeTypes() const-
191{-
192 return
executed 16 times by 1 test: return QMimeDatabasePrivate::instance()->provider()->parents(d->name);
Executed by:
  • tst_QMimeDatabase
QMimeDatabasePrivate::instance()->provider()->parents(d->name);
executed 16 times by 1 test: return QMimeDatabasePrivate::instance()->provider()->parents(d->name);
Executed by:
  • tst_QMimeDatabase
16
193}-
194-
195static void collectParentMimeTypes(const QString &mime, QStringList &allParents)-
196{-
197 const QStringList parents = QMimeDatabasePrivate::instance()->provider()->parents(mime);-
198 for (const QString &parent : parents) {-
199-
200 if (!allParents.contains(parent)
!allParents.contains(parent)Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
)
4-24
201 allParents.append(parent);
executed 24 times by 1 test: allParents.append(parent);
Executed by:
  • tst_QMimeDatabase
24
202 }
executed 28 times by 1 test: end of block
Executed by:
  • tst_QMimeDatabase
28
203-
204-
205 for (const QString &parent : parents)-
206 collectParentMimeTypes(parent, allParents);
executed 28 times by 1 test: collectParentMimeTypes(parent, allParents);
Executed by:
  • tst_QMimeDatabase
28
207}
executed 36 times by 1 test: end of block
Executed by:
  • tst_QMimeDatabase
36
208QStringList QMimeType::allAncestors() const-
209{-
210 QStringList allParents;-
211 collectParentMimeTypes(d->name, allParents);-
212 return
executed 8 times by 1 test: return allParents;
Executed by:
  • tst_QMimeDatabase
allParents;
executed 8 times by 1 test: return allParents;
Executed by:
  • tst_QMimeDatabase
8
213}-
214QStringList QMimeType::aliases() const-
215{-
216 return
executed 8 times by 1 test: return QMimeDatabasePrivate::instance()->provider()->listAliases(d->name);
Executed by:
  • tst_QMimeDatabase
QMimeDatabasePrivate::instance()->provider()->listAliases(d->name);
executed 8 times by 1 test: return QMimeDatabasePrivate::instance()->provider()->listAliases(d->name);
Executed by:
  • tst_QMimeDatabase
8
217}-
218-
219-
220-
221-
222-
223QStringList QMimeType::suffixes() const-
224{-
225 QMimeDatabasePrivate::instance()->provider()->loadMimeTypePrivate(*d);-
226-
227 QStringList result;-
228 for (const QString &pattern : qAsConst(d->globPatterns)) {-
229-
230 if (pattern.startsWith(QLatin1String("*."))
pattern.starts...1String("*."))Description
TRUEevaluated 2466 times by 23 tests
Evaluated 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
  • tst_qmimetype
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
&&
4-2466
231 pattern.length() > 2
pattern.length() > 2Description
TRUEevaluated 2466 times by 23 tests
Evaluated 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
  • tst_qmimetype
FALSEnever evaluated
&&
0-2466
232 pattern.indexOf(QLatin1Char('*'), 2) < 0
pattern.indexO...r('*'), 2) < 0Description
TRUEevaluated 2466 times by 23 tests
Evaluated 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
  • tst_qmimetype
FALSEnever evaluated
&& pattern.indexOf(QLatin1Char('?'), 2) < 0
pattern.indexO...r('?'), 2) < 0Description
TRUEevaluated 2466 times by 23 tests
Evaluated 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
  • tst_qmimetype
FALSEnever evaluated
) {
0-2466
233 const QString suffix = pattern.mid(2);-
234 result.append(suffix);-
235 }
executed 2466 times by 23 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
  • tst_qmimetype
2466
236 }
executed 2470 times by 23 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
  • tst_qmimetype
2470
237-
238 return
executed 2448 times by 23 tests: return result;
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
  • tst_qmimetype
result;
executed 2448 times by 23 tests: return result;
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
  • tst_qmimetype
2448
239}-
240-
241-
242-
243-
244-
245-
246QString QMimeType::preferredSuffix() const-
247{-
248 const QStringList suffixList = suffixes();-
249 return
executed 2447 times by 22 tests: return suffixList.isEmpty() ? QString() : suffixList.at(0);
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
suffixList.isEmpty() ? QString() : suffixList.at(0);
executed 2447 times by 22 tests: return suffixList.isEmpty() ? QString() : suffixList.at(0);
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
250}-
251-
252-
253-
254-
255-
256QString QMimeType::filterString() const-
257{-
258 QMimeDatabasePrivate::instance()->provider()->loadMimeTypePrivate(*d);-
259 QString filter;-
260-
261 if (!d->globPatterns.empty()
!d->globPatterns.empty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
262 filter += comment() + QLatin1String(" (");-
263 for (int i = 0; i < d->globPatterns.size()
i < d->globPatterns.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
264 if (i != 0
i != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
265 filter += QLatin1Char(' ');
never executed: filter += QLatin1Char(' ');
0
266 filter += d->globPatterns.at(i);-
267 }
never executed: end of block
0
268 filter += QLatin1Char(')');-
269 }
never executed: end of block
0
270-
271 return
never executed: return filter;
filter;
never executed: return filter;
0
272}-
273-
274-
275-
276-
277-
278-
279-
280bool QMimeType::inherits(const QString &mimeTypeName) const-
281{-
282 if (d->name == mimeTypeName
d->name == mimeTypeNameDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
)
4-52
283 return
executed 4 times by 1 test: return true;
Executed by:
  • tst_QMimeDatabase
true;
executed 4 times by 1 test: return true;
Executed by:
  • tst_QMimeDatabase
4
284 return
executed 52 times by 1 test: return QMimeDatabasePrivate::instance()->inherits(d->name, mimeTypeName);
Executed by:
  • tst_QMimeDatabase
QMimeDatabasePrivate::instance()->inherits(d->name, mimeTypeName);
executed 52 times by 1 test: return QMimeDatabasePrivate::instance()->inherits(d->name, mimeTypeName);
Executed by:
  • tst_QMimeDatabase
52
285}-
286-
287-
288QDebug operator<<(QDebug debug, const QMimeType &mime)-
289{-
290 QDebugStateSaver saver(debug);-
291 if (!mime.isValid()
!mime.isValid()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDebug
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDebug
) {
1
292 debug.nospace() << "QMimeType(invalid)";-
293 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QDebug
else {
1
294 debug.nospace() << "QMimeType(" << mime.name() << ")";-
295 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QDebug
1
296 return
executed 2 times by 1 test: return debug;
Executed by:
  • tst_QDebug
debug;
executed 2 times by 1 test: return debug;
Executed by:
  • tst_QDebug
2
297}-
298-
299-
300-
Switch to Source codePreprocessed file

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