Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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 AddMatchFilterFunc &filterFunc) 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 127 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(), isFastPattern(), m_fastPatterns, m_highWeightGlobs, m_lowWeightGlobs, QString::mid(), Q_ASSERT, and QString::toLower().

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 264 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 AddMatchFilterFunc & filterFunc ) const

Definition at line 235 of file qmimeglobpattern.cpp.

References fileName, m_fastPatterns, m_highWeightGlobs, m_lowWeightGlobs, QMimeGlobPatternList::match(), mime, QString::right(), QString::toLower(), 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().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_fastPatterns

PatternsMap QMimeAllGlobPatterns::m_fastPatterns

Definition at line 138 of file qmimeglobpattern_p.h.

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

◆ m_highWeightGlobs

QMimeGlobPatternList QMimeAllGlobPatterns::m_highWeightGlobs

Definition at line 139 of file qmimeglobpattern_p.h.

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

◆ m_lowWeightGlobs

QMimeGlobPatternList QMimeAllGlobPatterns::m_lowWeightGlobs

Definition at line 140 of file qmimeglobpattern_p.h.

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


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