Use new mime database

Change-Id: I4305872b6b11ef3e8a364280ffa5209a5a793600
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Eike Ziller
2015-02-04 09:32:46 +01:00
parent 365c1ddb90
commit 5a3a940ad3
112 changed files with 609 additions and 3226 deletions

View File

@@ -36,10 +36,11 @@
#include <coreplugin/documentmanager.h>
#include <coreplugin/fileiconprovider.h>
#include <coreplugin/mimedatabase.h>
#include <qmljstools/qmljstoolsconstants.h>
#include <utils/mimetypes/mimedatabase.h>
#include <QCoreApplication>
#include <QDir>
#include <QDebug>
@@ -51,8 +52,8 @@ static bool priority(const QStringList &files)
{
if (files.isEmpty())
return false;
Core::MimeType mt = Core::MimeDatabase::findByFile(files.at(0));
QString type = mt.type();
Utils::MimeDatabase mdb;
QString type = mdb.mimeTypeForFile(files.at(0)).name();
if (type.startsWith(QLatin1String("image/"))
|| type == QLatin1String(QmlJSTools::Constants::QML_MIMETYPE)
|| type == QLatin1String(QmlJSTools::Constants::JS_MIMETYPE))