qmljs: differnt language constants for the different qml flavors

Added separated qbs, qmltypes, QtQuick1, and QtQuick2
and "generic" Qml languages.
Cleaned up the mime types a bit, preparing for registered mime
types.

Change-Id: I0e484c93e003176cd659acc546baa6d024defa19
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Fawzi Mohamed
2012-12-06 12:11:12 +01:00
parent a839a46d4f
commit 174baf5ea1
14 changed files with 92 additions and 22 deletions

View File

@@ -5,10 +5,24 @@
<sub-class-of type="text/plain"/>
<comment>QML file</comment>
<glob pattern="*.qml"/>
<glob pattern="*.qmlproject"/>
<glob pattern="*.qmltypes"/>
</mime-type>
<mime-type type="application/x-qt.qbs+qml">
<alias type="text/x-qt.qbs+qml"/>
<sub-class-of type="application/x-qml"/>
<comment>Qt Build Suite file</comment>
<glob pattern="*.qbs"/>
<glob pattern="*.qbp"/>
</mime-type>
<mime-type type="application/x-qmlproject">
<alias type="text/x-qmlproject"/>
<sub-class-of type="application/x-qml"/>
<comment>Qt Creator Qt UI project file</comment>
<glob pattern="*.qmlproject"/>
</mime-type>
<mime-type type="application/x-qt.meta-info+qml">
<alias type="text/x-qt.meta-info+qml"/>
<sub-class-of type="application/x-qml"/>
<comment>QML file</comment>
<glob pattern="*.qmltypes"/>
</mime-type>
<mime-type type="application/javascript">
<alias type="application/x-javascript"/>

View File

@@ -59,6 +59,9 @@ QmlJSEditorFactory::QmlJSEditorFactory(QObject *parent)
{
m_mimeTypes
<< QLatin1String(QmlJSTools::Constants::QML_MIMETYPE)
<< QLatin1String(QmlJSTools::Constants::QMLPROJECT_MIMETYPE)
<< QLatin1String(QmlJSTools::Constants::QBS_MIMETYPE)
<< QLatin1String(QmlJSTools::Constants::QMLTYPES_MIMETYPE)
<< QLatin1String(QmlJSTools::Constants::JS_MIMETYPE)
<< QLatin1String(QmlJSTools::Constants::JSON_MIMETYPE)
;