![]() |
Qt 6.x
The Qt SDK
|
Result of the globs parsing, as data structures ready for efficient MIME type matching. More...
#include <qmimeglobpattern_p.h>
Public Types | |
typedef QHash< QString, QStringList > | PatternsMap |
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 |
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.
Definition at line 127 of file qmimeglobpattern_p.h.
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().
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().
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().
Definition at line 215 of file qmimeglobpattern.cpp.
References m_fastPatterns, m_highWeightGlobs, m_lowWeightGlobs, mimeType, and QMimeGlobPatternList::removeMimeType().
Referenced by QMimeXMLProvider::excludeMimeTypeGlobs().
PatternsMap QMimeAllGlobPatterns::m_fastPatterns |
Definition at line 134 of file qmimeglobpattern_p.h.
Referenced by addGlob(), clear(), matchingGlobs(), and removeMimeType().
QMimeGlobPatternList QMimeAllGlobPatterns::m_highWeightGlobs |
Definition at line 135 of file qmimeglobpattern_p.h.
Referenced by addGlob(), clear(), matchingGlobs(), and removeMimeType().
QMimeGlobPatternList QMimeAllGlobPatterns::m_lowWeightGlobs |
Definition at line 136 of file qmimeglobpattern_p.h.
Referenced by addGlob(), clear(), matchingGlobs(), and removeMimeType().