[media-types] registering vnd.qt.*qml types

Mohamed Fawzi <Fawzi.Mohamed@digia.com> Tue, 29 January 2013 14:15 UTC

Return-Path: <Fawzi.Mohamed@digia.com>
X-Original-To: media-types@ietfa.amsl.com
Delivered-To: media-types@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6E4BA21F87EE for <media-types@ietfa.amsl.com>; Tue, 29 Jan 2013 06:15:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.911
X-Spam-Level:
X-Spam-Status: No, score=-0.911 tagged_above=-999 required=5 tests=[AWL=0.260, BAYES_00=-2.599, HTML_MESSAGE=0.001, J_CHICKENPOX_42=0.6, J_CHICKENPOX_43=0.6, SARE_SUB_OBFU_Q1=0.227]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LbOrP2qzbmAa for <media-types@ietfa.amsl.com>; Tue, 29 Jan 2013 06:15:42 -0800 (PST)
Received: from smtp1.digia.com (smtp1.digia.com [82.118.214.156]) by ietfa.amsl.com (Postfix) with ESMTP id 159F521F879E for <media-types@ietfa.amsl.com>; Tue, 29 Jan 2013 06:15:41 -0800 (PST)
Received: from smtp1.digia.com (unknown [127.0.0.1]) by IMSVA80 (Postfix) with ESMTP id B3B1D3700B8 for <media-types@ietfa.amsl.com>; Tue, 29 Jan 2013 16:15:40 +0200 (EET)
Received: from IT-EXCAS02-HKI.it.local (unknown [10.9.52.71]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp1.digia.com (Postfix) with ESMTP id 9C24E3700B0 for <media-types@ietfa.amsl.com>; Tue, 29 Jan 2013 16:15:40 +0200 (EET)
Received: from IT-EXMB01-HKI.it.local ([fe80::78ea:e84d:88b4:9f3d]) by IT-EXCAS02-HKI.it.local ([fe80::5efe:10.9.52.71%11]) with mapi id 14.02.0283.003; Tue, 29 Jan 2013 16:15:40 +0200
From: Mohamed Fawzi <Fawzi.Mohamed@digia.com>
To: "<media-types@ietfa.amsl.com>" <media-types@ietfa.amsl.com>
Thread-Topic: registering vnd.qt.*qml types
Thread-Index: AQHN/isRbf+YPdtIf0WHN3jLdAiGNQ==
Date: Tue, 29 Jan 2013 14:15:19 +0000
Message-ID: <D932B8DA-88F9-447A-A0A1-AA1D1BB7D3A8@digia.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.9.78.17]
Content-Type: multipart/alternative; boundary="_000_D932B8DA88F9447AA0A1AA1D1BB7D3A8digiacom_"
MIME-Version: 1.0
Subject: [media-types] registering vnd.qt.*qml types
X-BeenThere: media-types@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "IANA mailing list for reviewing Media Type \(MIME Type, Content Type\) registration requests." <media-types.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/media-types>, <mailto:media-types-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/media-types>
List-Post: <mailto:media-types@ietf.org>
List-Help: <mailto:media-types-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/media-types>, <mailto:media-types-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 29 Jan 2013 14:15:43 -0000

Hi,

after some discussion on the development@qt-project.org<mailto:development@qt-project.org> mailing list we
http://qt-project.org/ decided to register some qml
http://qt-project.org/wiki/Introduction_to_Qt_Quick types in the vendor tree.

Before heading to
http://www.iana.org/cgi-bin/mediatypes.pl
We wanted to post them here for review.

We would like to register

text/vnd.qt.qml => a file adhering to the QML grammar/syntax .qml suffix, subclass of text/plain; charset=utf-8

and as subclasses of that

  text/vnd.qt.qbs+qml => .qbs suffix
  text/vnd.qt.meta-info+qml => .qmltypes suffix
  text/vnd.qt.project+qml => .qmlproject suffix

I have also a patch for the free desktop shared-mime-info that reflects that change.
I am pasting it at the end of this email for reference.

Fawzi

======= diff of free desktop shared-mime-info ========
diff --git a/freedesktop.org.xml.in b/freedesktop.org.xml.in
index 3bb477e..ffe0410 100644
--- a/freedesktop.org.xml.in
+++ b/freedesktop.org.xml.in
@@ -1625,13 +1625,26 @@ command to generate the output files.
     </magic>
     <glob pattern="*.ui"/>
   </mime-type>
-  <mime-type type="text/x-qml">
+  <mime-type type="text/vnd.qt.qml">
     <_comment>Qt Markup Language file</_comment>
-    <magic priority="80">
-      <match type="string" value="import Qt " offset="0:256"/>
-    </magic>
+    <sub-class-of type="text/plain; charset=utf-8"/>
     <glob pattern="*.qml"/>
   </mime-type>
+  <mime-type type="text/vnd.qt.qbs+qml">
+    <_comment>Qt Build Suite file</_comment>
+    <sub-class-of type="text/vnd.qt.qml"/>
+    <glob pattern="*.qbs"/>
+  </mime-type>
+  <mime-type type="text/vnd.qt.meta-info+qml">
+    <_comment>File describing qml type information</_comment>
+    <sub-class-of type="text/vnd.qt.qml"/>
+    <glob pattern="*.qmltypes"/>
+  </mime-type>
+  <mime-type type="text/vnd.qt.project+qml">
+    <_comment>Qt Creator Qt Quick UI project file</_comment>
+    <sub-class-of type="text/vnd.qt.qml"/>
+    <glob pattern="*.qmlproject"/>
+  </mime-type>
   <mime-type type="application/x-desktop">
     <_comment>desktop configuration file</_comment>
     <sub-class-of type="text/plain"/>
diff --git a/tests/helloworld.qbs b/tests/helloworld.qbs
new file mode 100644
index 0000000..05c8af1
--- /dev/null
+++ b/tests/helloworld.qbs
@@ -0,0 +1,9 @@
+import qbs 1.0
+
+Application {
+    name: "HelloWorld"
+    Depends { name: "cpp" }
+    files: [
+        "main.cpp"
+    ]
+}
diff --git a/tests/list b/tests/list
index 6af5885..c607a7e 100644
--- a/tests/list
+++ b/tests/list
@@ -248,8 +248,14 @@ ssh-public-key.txt text/plain
 test.vcf text/vcard
 # Test Go source code
 test.go text/x-go oxo
-# Qt Quick (QML) file
-rectangle.qml text/x-qml
+# Qt Markup Language file
+rectangle.qml text/vnd.qt.qml
+# Qt Build Suite file
+helloworld.qbs text/vnd.qt.qbs+qml
+# File describing qml type information
+plugin.qmltypes text/vnd.qt.meta-info+qml
+# Qt Creator Qt Quick UI project file
+main.qmlproject text/vnd.qt.project+qml
 # QtiPlot (qti) file
 test.qti application/x-qtiplot
 # Scheme source code
diff --git a/tests/main.qmlproject b/tests/main.qmlproject
new file mode 100644
index 0000000..4d32f75
--- /dev/null
+++ b/tests/main.qmlproject
@@ -0,0 +1,18 @@
+import QmlProject 1.1
+
+Project {
+    mainFile: "main.qml"
+
+    /* Include .qml, .js, and image files from current directory and subdirectories */
+    QmlFiles {
+        directory: "."
+    }
+    JavaScriptFiles {
+        directory: "."
+    }
+    ImageFiles {
+        directory: "."
+    }
+    /* List of plugin directories passed to QML runtime */
+    // importPaths: [ "../exampleplugin" ]
+}
diff --git a/tests/plugin.qmltypes b/tests/plugin.qmltypes
new file mode 100644
index 0000000..ff35e72
--- /dev/null
+++ b/tests/plugin.qmltypes
@@ -0,0 +1,25 @@
+import QtQuick.tooling 1.1
+
+// This file describes the plugin-supplied types contained in the library.
+// It is used for QML tooling purposes only.
+
+Module {
+    Component {
+        name: "QDeclarative1AbstractAnimation"
+        prototype: "QObject"
+        exports: ["QtQuick/Animation 1.0"]
+        Enum {
+            name: "Loops"
+            values: {
+                "Infinite": -2
+            }
+        }
+        Property { name: "running"; type: "bool" }
+        Signal { name: "started" }
+        Signal {
+            name: "loopCountChanged"
+            Parameter { type: "int" }
+        }
+        Method { name: "complete" }
+    }
+}
diff --git a/tests/rectangle.qml b/tests/rectangle.qml
index 1635c1d..cc5d859 100644
--- a/tests/rectangle.qml
+++ b/tests/rectangle.qml
@@ -1,4 +1,5 @@
-import Qt 4.7
+import QtQuick 1.1
+
 Rectangle {
   width: 400; height: 200
   color: "lightblue"