forked from qt-creator/qt-creator
Use new mime database
Change-Id: I4305872b6b11ef3e8a364280ffa5209a5a793600 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user