[Development] Qml mime types

Alan Alpert 416365416c at gmail.com
Mon Jan 7 19:18:49 CET 2013


On Mon, Jan 7, 2013 at 2:21 AM, Mohamed Fawzi <Fawzi.Mohamed at digia.com> wrote:
> I would like to close the discussion if possible.
> Is the following hierarchy acceptable?
>
> text/plain; charset=utf-8
>  text/vnd.qt.qml => a file adhering to the QML grammar/syntax .qml suffix
>    text/vnd.qt.qtquick1+qml => .qml suffix  + magic 'import QtQuick 1.' within the first 256 chars
>    text/vnd.qt.qtquick2+qml => .qml suffix  + magic 'import QtQuick 2.' within the first 256 chars
>    text/vnd.qt.qbs+qml => .qbs suffix
>    text/vnd.qt.meta-info+qml => .qmltypes suffix
>    text/vnd.qt.project+qml => .qmlproject suffix
>
> It is not completely fool proof, but should work with the recommended matching algorithm, and as text/vnd.qt.qml come lexographically before text/vnd.qt.qtquick* it should be the default choice if no match happens (again in the normal case).
> Different extensions can be easily added in the future, and the hierarchy seems sane.

+2 Looks good to me.

I can see ways around the QtQuick 1/2 detection but it's plenty good
enough for the common case; and the fall-back of qml should work fine
too.

--
Alan Alpert



More information about the Development mailing list