forked from qt-creator/qt-creator
QtSupport: Register mimetype for qm and ts files
ts appears in freedesktop, but it is ambiguous. Change-Id: Iacc1386551f79eb885c03db7329f592394428f66 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
4829e94672
commit
b70081ae71
14
src/plugins/qtsupport/QtSupport.mimetypes.xml
Normal file
14
src/plugins/qtsupport/QtSupport.mimetypes.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
|
||||||
|
<mime-type type="application/x-linguist-translation">
|
||||||
|
<comment>Linguist translated messages (machine-readable)</comment>
|
||||||
|
<glob pattern="*.qm"/>
|
||||||
|
</mime-type>
|
||||||
|
<mime-type type="application/x-linguist">
|
||||||
|
<comment>Linguist message catalog</comment>
|
||||||
|
<magic>
|
||||||
|
<match value="<TS" type="string" offset="0:256"/>
|
||||||
|
</magic>
|
||||||
|
<glob pattern="*.ts" weight="70"/>
|
||||||
|
</mime-type>
|
||||||
|
</mime-info>
|
@@ -8,5 +8,6 @@
|
|||||||
<file>images/dark_qml.png</file>
|
<file>images/dark_qml.png</file>
|
||||||
<file>images/dark_qt_project.png</file>
|
<file>images/dark_qt_project.png</file>
|
||||||
<file>images/dark_qt_qrc.png</file>
|
<file>images/dark_qt_qrc.png</file>
|
||||||
|
<file>QtSupport.mimetypes.xml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@@ -50,7 +50,9 @@
|
|||||||
#include <projectexplorer/project.h>
|
#include <projectexplorer/project.h>
|
||||||
#include <projectexplorer/projecttree.h>
|
#include <projectexplorer/projecttree.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
|
||||||
#include <utils/macroexpander.h>
|
#include <utils/macroexpander.h>
|
||||||
|
#include <utils/mimetypes/mimedatabase.h>
|
||||||
|
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
|
|
||||||
@@ -69,6 +71,8 @@ bool QtSupportPlugin::initialize(const QStringList &arguments, QString *errorMes
|
|||||||
ProFileEvaluator::initialize();
|
ProFileEvaluator::initialize();
|
||||||
new ProFileCacheManager(this);
|
new ProFileCacheManager(this);
|
||||||
|
|
||||||
|
Utils::MimeDatabase::addMimeTypes(QLatin1String(":qtsupport/QtSupport.mimetypes.xml"));
|
||||||
|
|
||||||
JsExpander::registerQObjectForJs(QLatin1String("QtSupport"), new CodeGenerator);
|
JsExpander::registerQObjectForJs(QLatin1String("QtSupport"), new CodeGenerator);
|
||||||
|
|
||||||
addAutoReleasedObject(new QtVersionManager);
|
addAutoReleasedObject(new QtVersionManager);
|
||||||
|
Reference in New Issue
Block a user