Line | Source Code | Coverage |
---|
1 | | - |
2 | | - |
3 | | - |
4 | QMimeMagicRuleMatcher::QMimeMagicRuleMatcher(const QString &mime, unsigned thePriority) : | - |
5 | m_list(), | - |
6 | m_priority(thePriority), | - |
7 | m_mimetype(mime) | - |
8 | { | - |
9 | } | 0 |
10 | | - |
11 | bool QMimeMagicRuleMatcher::operator==(const QMimeMagicRuleMatcher &other) const | - |
12 | { | - |
13 | return m_list == other.m_list && | 0 |
14 | m_priority == other.m_priority; never executed: return m_list == other.m_list && m_priority == other.m_priority; | 0 |
15 | } | - |
16 | | - |
17 | void QMimeMagicRuleMatcher::addRule(const QMimeMagicRule &rule) | - |
18 | { | - |
19 | m_list.append(rule); | - |
20 | } | 0 |
21 | | - |
22 | void QMimeMagicRuleMatcher::addRules(const QList<QMimeMagicRule> &rules) | - |
23 | { | - |
24 | m_list.append(rules); | - |
25 | } | 0 |
26 | | - |
27 | QList<QMimeMagicRule> QMimeMagicRuleMatcher::magicRules() const | - |
28 | { | - |
29 | return m_list; never executed: return m_list; | 0 |
30 | } | - |
31 | | - |
32 | | - |
33 | bool QMimeMagicRuleMatcher::matches(const QByteArray &data) const | - |
34 | { | - |
35 | for (QForeachContainer<__typeof__(m_list)> _container_(m_list); !_container_.brk && _container_.i != _container_.e; __extension__ ({ ++_container_.brk; ++_container_.i; })) for (const QMimeMagicRule &magicRule = *_container_.i;; __extension__ ({--_container_.brk; break;})) { | - |
36 | if (magicRule.matches(data)) never evaluated: magicRule.matches(data) | 0 |
37 | return true; never executed: return true; | 0 |
38 | } | 0 |
39 | | - |
40 | return false; never executed: return false; | 0 |
41 | } | - |
42 | | - |
43 | | - |
44 | unsigned QMimeMagicRuleMatcher::priority() const | - |
45 | { | - |
46 | return m_priority; never executed: return m_priority; | 0 |
47 | } | - |
48 | | - |
49 | | - |
50 | | - |
| | |