KDECore
kmimeglobsfileparser.cpp
Go to the documentation of this file.
36 const QStringList globFiles = KGlobal::dirs()->findAllResources("xdgdata-mime", QString::fromLatin1("globs"));
47 KMimeGlobsFileParser::AllGlobs KMimeGlobsFileParser::parseGlobFiles(const QStringList& globFiles, QStringList& parsedFiles)
52 // At each level, we must be able to override (not just add to) the information that we read at higher levels
57 QString fileNamev2 = fileName + QLatin1Char('2'); // NOTE: this relies on u-m-d always generating the old globs file
76 // If we're not going to get the "cs" flag because smi is too old, then we need to emulate it for *.C at least.
77 const bool caseSensitiveHackNeeded = (KMimeType::sharedMimeInfoVersion() <= KDE_MAKE_VERSION(0, 60, 0));
123 if (caseSensitiveHackNeeded && (pattern == QLatin1String("*.C") || pattern == QLatin1String("*.c") || pattern == QLatin1String("core")))
136 // kDebug() << "Adding pattern" << pattern << "to mimetype" << mimeTypeName << "from globs file, with weight" << weight;
138 // kDebug() << " Adding pattern" << pattern << "to mimetype" << mimeTypeName << "from globs file, with weight" << weight << "flags" << flags;
167 //kDebug() << "pattern" << pattern << "glob.weight=" << glob.weight << "isFast=" << isFastPattern(pattern) << glob.flags;
169 // Store each patterns into either m_fastPatternDict (*.txt, *.html etc. with default weight 50)
173 if (glob.weight == 50 && isFastPattern(pattern) && ((glob.flags & KMimeTypeRepository::CaseSensitive) == 0)) {
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Fri Jul 12 2013 08:50:16 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2013 The KDE developers.
Generated on Fri Jul 12 2013 08:50:16 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.