Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QMimeMagicRuleMatcher Class Reference

The QMimeMagicRuleMatcher class checks a number of rules based on operator "or". More...

#include <qmimemagicrulematcher_p.h>

+ Collaboration diagram for QMimeMagicRuleMatcher:

Public Member Functions

 QMimeMagicRuleMatcher (const QString &mime, unsigned priority=65535)
 
void swap (QMimeMagicRuleMatcher &other) noexcept
 
bool operator== (const QMimeMagicRuleMatcher &other) const
 
void addRule (const QMimeMagicRule &rule)
 
void addRules (const QList< QMimeMagicRule > &rules)
 
QList< QMimeMagicRulemagicRules () const
 
bool matches (const QByteArray &data) const
 
unsigned priority () const
 
QString mimetype () const
 

Detailed Description

The QMimeMagicRuleMatcher class checks a number of rules based on operator "or".

\inmodule QtCore

It is used for rules parsed from XML files.

See also
QMimeType, QMimeDatabase, MagicRule, MagicStringRule, MagicByteRule, GlobPattern
QMimeTypeParserBase, MimeTypeParser

Definition at line 28 of file qmimemagicrulematcher_p.h.

Constructor & Destructor Documentation

◆ QMimeMagicRuleMatcher()

QMimeMagicRuleMatcher::QMimeMagicRuleMatcher ( const QString mime,
unsigned  priority = 65535 
)
explicit

Definition at line 25 of file qmimemagicrulematcher.cpp.

Member Function Documentation

◆ addRule()

void QMimeMagicRuleMatcher::addRule ( const QMimeMagicRule rule)

Definition at line 38 of file qmimemagicrulematcher.cpp.

References QList< T >::append(), and rule.

+ Here is the call graph for this function:

◆ addRules()

void QMimeMagicRuleMatcher::addRules ( const QList< QMimeMagicRule > &  rules)

Definition at line 43 of file qmimemagicrulematcher.cpp.

References QList< T >::append().

Referenced by QMimeTypeParserBase::parse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ magicRules()

QList< QMimeMagicRule > QMimeMagicRuleMatcher::magicRules ( ) const

Definition at line 48 of file qmimemagicrulematcher.cpp.

◆ matches()

bool QMimeMagicRuleMatcher::matches ( const QByteArray data) const

Definition at line 54 of file qmimemagicrulematcher.cpp.

◆ mimetype()

QString QMimeMagicRuleMatcher::mimetype ( ) const
inline

Definition at line 50 of file qmimemagicrulematcher_p.h.

◆ operator==()

bool QMimeMagicRuleMatcher::operator== ( const QMimeMagicRuleMatcher other) const

Definition at line 32 of file qmimemagicrulematcher.cpp.

References other().

+ Here is the call graph for this function:

◆ priority()

unsigned QMimeMagicRuleMatcher::priority ( ) const

Definition at line 65 of file qmimemagicrulematcher.cpp.

◆ swap()

void QMimeMagicRuleMatcher::swap ( QMimeMagicRuleMatcher other)
inlinenoexcept

Definition at line 33 of file qmimemagicrulematcher_p.h.

References other(), and qSwap().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: