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

@@ -197,8 +197,8 @@ Core::GeneratedFiles GenericProjectWizard::generateFiles(const QWizard *w,
Core::MimeType headerTy = mimeDatabase->findByType(QLatin1String("text/x-chdr"));
QStringList nameFilters;
foreach (const QRegExp &rx, headerTy.globPatterns())
nameFilters.append(rx.pattern());
foreach (const Core::MimeGlobPattern &gp, headerTy.globPatterns())
nameFilters.append(gp.regExp().pattern());
QStringList includePaths;
foreach (const QString &path, paths) {