MIME database: Add support for attribut weight; Add magic matcher for byte patterns.

This affects how files are identified by the MIME database.
Although this is a general improvement, it was triggered by the following bug report.

Task-number: QTCREATORBUG-1793
Reviewed-by: Friedemann Kleint
This commit is contained in:
Leandro Melo
2010-09-13 16:26:16 +02:00
parent 8ea7389ca8
commit 463488f7d7
8 changed files with 255 additions and 90 deletions

View File

@@ -244,10 +244,10 @@ static QStringList qmlFilesInDirectory(const QString &path)
Core::MimeType qmlSourceTy = db->findByType(QmlJSEditor::Constants::QML_MIMETYPE);
QStringList pattern;
foreach (const QRegExp &glob, jsSourceTy.globPatterns())
pattern << glob.pattern();
foreach (const QRegExp &glob, qmlSourceTy.globPatterns())
pattern << glob.pattern();
foreach (const Core::MimeGlobPattern &glob, jsSourceTy.globPatterns())
pattern << glob.regExp().pattern();
foreach (const Core::MimeGlobPattern &glob, qmlSourceTy.globPatterns())
pattern << glob.regExp().pattern();
QStringList files;