[Development] Qml mime types

Mohamed Fawzi Fawzi.Mohamed at digia.com
Thu Dec 13 11:22:42 CET 2012

The thinking was to register the types also in the freedesktop.org database.
And Qtcreator will use that hierarchy from the beginning.

About the charset I was referring to http://tools.ietf.org/html/rfc6657 which amends the text/* types.
I am interpreting it incorrectly?
Without it one has to go for application/* as preferred type, because if I am not mistaken qml does specify utf-8 as its *only* valid encoding, and I don't think we want to burden the applications with it.

Your defence of +qml seems good, I will try to make a proposal based on keeping that in account.

The other option would be to move just qml in the standard tree, and formalize the the +qml suffix, but that seems like a lot more overhead.

From: development-bounces+fawzi.mohamed=digia.com at qt-project.org [development-bounces+fawzi.mohamed=digia.com at qt-project.org] on behalf of Marc Mutz [marc.mutz at kdab.com]
Sent: Thursday, December 13, 2012 1:19 AM
To: development at qt-project.org
Subject: Re: [Development] Qml mime types

On Wednesday December 12 2012, Mohamed Fawzi wrote:
> text/plain; charset=utf-8
>    text/vnd.qt.qml-base : a file using the qml syntax in some context
>      text/vnd.qt.qml : the current .qml files
>      text/vnd.qt.qbs : a qbs file
>      text/vnd.qt.qml-meta-info : qmltypes meta info
>      text/vnd.qt.qml-project : a qmlproject file

You can't have a hierarchy like that, btw. Not outside xdg.

No client will treat text/vnd.qt.qml as a text/vnd.qt.qml-base if it doesn't
know the former. You need a database like xdg's for this, but most users of
mime-types will treat an unknown text/ subpart according to the RFCs: as

Which means btw that text/vnd.qt.{qml,etc} will have to specify that clients
SHOULD add a charset parameter and that that charset SHOULD be utf-8, but
that receivers SHOULD accept also charsets != utf-8, and missing charsets
(defaulting to us-ascii in that case). Just because that's a requirement of

I briefly considered suggesting a variant= or dialect= parameter:

  text/vnd.qt.qml; charset=utf-8; dialect=qt-quick-v1

mp/signed uses that (protocol=; micalg=, cf. source of Thiago's mail), but it
requires special handling in clients and only really works in email (and
http), not on the desktop, so I'm not suggesting that.

If you want more subtyping than text/plain as a parent, you need to use
something like +qml. You could also use vnd.qt.qml.* (ie. a prefix), but I'm
not sure 3rd parties would like to place their mime types in the vnd.qt
tree :)

There are trees other than vnd., btw, but I forgot which ones. One of them
might lend itself better to this kind of prefixing that vnd.


Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
Development mailing list
Development at qt-project.org

More information about the Development mailing list