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

Result of the globs parsing, as data structures ready for efficient MIME type matching. More...

#include <qmimeglobpattern_p.h>

+ Collaboration diagram for QMimeAllGlobPatterns:

Public Types

typedef QHash< QString, QStringListPatternsMap
 

Public Member Functions

void addGlob (const QMimeGlobPattern &glob)
 
void removeMimeType (const QString &mimeType)
 
void matchingGlobs (const QString &fileName, QMimeGlobMatchResult &result) const
 
void clear ()
 

Public Attributes

PatternsMap m_fastPatterns
 
QMimeGlobPatternList m_highWeightGlobs
 
QMimeGlobPatternList m_lowWeightGlobs
 

Detailed Description

Result of the globs parsing, as data structures ready for efficient MIME type matching.

This contains: 1) a map of fast regular patterns (e.g. *.txt is stored as "txt" in a qhash's key) 2) a linear list of high-weight globs 3) a linear list of low-weight globs

Definition at line 124 of file qmimeglobpattern_p.h.

Member Typedef Documentation

◆ PatternsMap

Member Function Documentation

◆ addGlob()

void QMimeAllGlobPatterns::addGlob ( const QMimeGlobPattern glob)

Definition at line 189 of file qmimeglobpattern.cpp.

References QList< T >::append(), extension(), QMimeGlobPatternList::hasPattern(), QMimeGlobPattern::isCaseSensitive(), isFastPattern(), m_fastPatterns, m_highWeightGlobs, m_lowWeightGlobs, QMimeGlobPattern::mimeType(), QMimeGlobPattern::pattern(), Q_ASSERT, and QMimeGlobPattern::weight().

Referenced by QMimeXMLProvider::addGlobPattern().

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

◆ clear()

void QMimeAllGlobPatterns::clear ( )

Definition at line 260 of file qmimeglobpattern.cpp.

References QList< T >::clear(), QHash< Key, T >::clear(), m_fastPatterns, m_highWeightGlobs, and m_lowWeightGlobs.

Referenced by QMimeXMLProvider::ensureLoaded().

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

◆ matchingGlobs()

void QMimeAllGlobPatterns::matchingGlobs ( const QString fileName,
QMimeGlobMatchResult result 
) const

Definition at line 235 of file qmimeglobpattern.cpp.

References fileName, m_fastPatterns, m_highWeightGlobs, m_lowWeightGlobs, QMimeGlobPatternList::match(), mime, QString::size(), and QHash< Key, T >::value().

Referenced by QMimeXMLProvider::addFileNameMatches().

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

◆ removeMimeType()

void QMimeAllGlobPatterns::removeMimeType ( const QString mimeType)

Definition at line 215 of file qmimeglobpattern.cpp.

References m_fastPatterns, m_highWeightGlobs, m_lowWeightGlobs, mimeType, and QMimeGlobPatternList::removeMimeType().

Referenced by QMimeXMLProvider::excludeMimeTypeGlobs().

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

Member Data Documentation

◆ m_fastPatterns

PatternsMap QMimeAllGlobPatterns::m_fastPatterns

Definition at line 134 of file qmimeglobpattern_p.h.

Referenced by addGlob(), clear(), matchingGlobs(), and removeMimeType().

◆ m_highWeightGlobs

QMimeGlobPatternList QMimeAllGlobPatterns::m_highWeightGlobs

Definition at line 135 of file qmimeglobpattern_p.h.

Referenced by addGlob(), clear(), matchingGlobs(), and removeMimeType().

◆ m_lowWeightGlobs

QMimeGlobPatternList QMimeAllGlobPatterns::m_lowWeightGlobs

Definition at line 136 of file qmimeglobpattern_p.h.

Referenced by addGlob(), clear(), matchingGlobs(), and removeMimeType().


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