Plugins: Fix that mimetype definition was not valid JSON

JSON officially does not support multiline strings, so we should use
the same mechanism that we already use for the plugin description
(i.e. additionally support arrays of strings which are interpreted
as lines).
This just happens to work because Qt's JSON parser eats it without
choking.

Change-Id: I25ef04600b209775c5a7af916c687fda4a8b1a4d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Eike Ziller
2017-07-21 14:50:23 +02:00
parent 5df0f97d2f
commit e8e46ab553
25 changed files with 448 additions and 447 deletions

View File

@@ -31,6 +31,7 @@
#include "pluginmanager.h" #include "pluginmanager.h"
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/qtcassert.h>
#include <QCoreApplication> #include <QCoreApplication>
#include <QDebug> #include <QDebug>
@@ -630,12 +631,9 @@ static inline QString msgInvalidFormat(const char *key, const QString &content)
.arg(QLatin1String(key), content); .arg(QLatin1String(key), content);
} }
static inline bool readMultiLineString(const QJsonValue &value, QString *out) bool PluginSpec::readMultiLineString(const QJsonValue &value, QString *out)
{ {
if (!out) { QTC_ASSERT(out, return false);
qCWarning(pluginLog) << Q_FUNC_INFO << "missing output parameter";
return false;
}
if (value.isString()) { if (value.isString()) {
*out = value.toString(); *out = value.toString();
} else if (value.isArray()) { } else if (value.isArray()) {
@@ -737,7 +735,7 @@ bool PluginSpecPrivate::readMetaData(const QJsonObject &pluginMetaData)
copyright = value.toString(); copyright = value.toString();
value = metaData.value(QLatin1String(DESCRIPTION)); value = metaData.value(QLatin1String(DESCRIPTION));
if (!value.isUndefined() && !readMultiLineString(value, &description)) if (!value.isUndefined() && !PluginSpec::readMultiLineString(value, &description))
return reportError(msgValueIsNotAString(DESCRIPTION)); return reportError(msgValueIsNotAString(DESCRIPTION));
value = metaData.value(QLatin1String(URL)); value = metaData.value(QLatin1String(URL));
@@ -751,7 +749,7 @@ bool PluginSpecPrivate::readMetaData(const QJsonObject &pluginMetaData)
category = value.toString(); category = value.toString();
value = metaData.value(QLatin1String(LICENSE)); value = metaData.value(QLatin1String(LICENSE));
if (!value.isUndefined() && !readMultiLineString(value, &license)) if (!value.isUndefined() && !PluginSpec::readMultiLineString(value, &license))
return reportError(msgValueIsNotAMultilineString(LICENSE)); return reportError(msgValueIsNotAMultilineString(LICENSE));
value = metaData.value(QLatin1String(PLATFORM)); value = metaData.value(QLatin1String(PLATFORM));

View File

@@ -131,6 +131,8 @@ public:
bool hasError() const; bool hasError() const;
QString errorString() const; QString errorString() const;
static bool readMultiLineString(const QJsonValue &value, QString *out);
private: private:
PluginSpec(); PluginSpec();

View File

@@ -17,14 +17,14 @@
\"Url\" : \"http://necessitas.kde.org\", \"Url\" : \"http://necessitas.kde.org\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'application/vnd.google.android.android_manifest\'> \" <mime-type type=\'application/vnd.google.android.android_manifest\'>\",
<comment>Android manifest file</comment> \" <comment>Android manifest file</comment>\",
<sub-class-of type=\'application/xml\'/> \" <sub-class-of type=\'application/xml\'/>\",
<glob pattern=\'AndroidManifest.xml\'/> \" <glob pattern=\'AndroidManifest.xml\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -19,13 +19,13 @@
\"Url\" : \"http://www.qt.io\", \"Url\" : \"http://www.qt.io\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'application/vnd.audc.text.clearcase.submit\'> \" <mime-type type=\'application/vnd.audc.text.clearcase.submit\'>\",
<comment>ClearCase submit template</comment> \" <comment>ClearCase submit template</comment>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -17,19 +17,19 @@
\"Url\" : \"http://www.qt.io\", \"Url\" : \"http://www.qt.io\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'text/x-cmake\'> \" <mime-type type=\'text/x-cmake\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>CMake Project file</comment> \" <comment>CMake Project file</comment>\",
<glob pattern=\'*.cmake\'/> \" <glob pattern=\'*.cmake\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'text/x-cmake-project\'> \" <mime-type type=\'text/x-cmake-project\'>\",
<sub-class-of type=\'text/x-cmake\'/> \" <sub-class-of type=\'text/x-cmake\'/>\",
<comment>CMake Project file</comment> \" <comment>CMake Project file</comment>\",
<glob pattern=\'CMakeLists.txt\'/> \" <glob pattern=\'CMakeLists.txt\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -131,8 +131,9 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
continue; continue;
const QJsonObject metaData = plugin->metaData(); const QJsonObject metaData = plugin->metaData();
const QJsonValue mimetypes = metaData.value("Mimetypes"); const QJsonValue mimetypes = metaData.value("Mimetypes");
if (mimetypes.isString()) QString mimetypeString;
Utils::addMimeTypes(plugin->name() + ".mimetypes", mimetypes.toString().trimmed().toUtf8()); if (ExtensionSystem::PluginSpec::readMultiLineString(mimetypes, &mimetypeString))
Utils::addMimeTypes(plugin->name() + ".mimetypes", mimetypeString.trimmed().toUtf8());
} }
if (ThemeEntry::availableThemes().isEmpty()) { if (ThemeEntry::availableThemes().isEmpty()) {

View File

@@ -18,101 +18,101 @@
\"Url\" : \"http://www.qt.io\", \"Url\" : \"http://www.qt.io\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\' encoding=\'UTF-8\'?> \"<?xml version=\'1.0\' encoding=\'UTF-8\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'text/x-csrc\'> \" <mime-type type=\'text/x-csrc\'>\",
<comment>C source code</comment> \" <comment>C source code</comment>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<alias type=\'text/x-c\'/> \" <alias type=\'text/x-c\'/>\",
<glob pattern=\'*.c\' case-sensitive=\'true\' weight=\'70\'/> \" <glob pattern=\'*.c\' case-sensitive=\'true\' weight=\'70\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'text/vnd.nvidia.cuda.csrc\'> \" <mime-type type=\'text/vnd.nvidia.cuda.csrc\'>\",
<sub-class-of type=\'text/x-csrc\'/> \" <sub-class-of type=\'text/x-csrc\'/>\",
<comment>NVIDIA CUDA C source code</comment> \" <comment>NVIDIA CUDA C source code</comment>\",
<glob pattern=\'*.cu\'/> \" <glob pattern=\'*.cu\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'text/x-chdr\'> \" <mime-type type=\'text/x-chdr\'>\",
<comment>C header</comment> \" <comment>C header</comment>\",
<sub-class-of type=\'text/x-csrc\'/> \" <sub-class-of type=\'text/x-csrc\'/>\",
<!-- reduce weight from freedesktop to avoid conflict with text/x-c++hdr --> \" <!-- reduce weight from freedesktop to avoid conflict with text/x-c++hdr -->\",
<glob pattern=\'*.h\' weight=\'30\'/> \" <glob pattern=\'*.h\' weight=\'30\'/>\",
</mime-type> \" </mime-type>\",
<!-- Those are used to find matching headers by the CppTools plugin, \" <!-- Those are used to find matching headers by the CppTools plugin,\",
so, they should match --> \" so, they should match -->\",
<mime-type type=\'text/x-c++hdr\'> \" <mime-type type=\'text/x-c++hdr\'>\",
<sub-class-of type=\'text/x-chdr\'/> \" <sub-class-of type=\'text/x-chdr\'/>\",
<comment>C++ header</comment> \" <comment>C++ header</comment>\",
<glob pattern=\'*.hh\' weight=\'70\'/> \" <glob pattern=\'*.hh\' weight=\'70\'/>\",
<glob pattern=\'*.hxx\' weight=\'70\'/> \" <glob pattern=\'*.hxx\' weight=\'70\'/>\",
<glob pattern=\'*.h++\' weight=\'70\'/> \" <glob pattern=\'*.h++\' weight=\'70\'/>\",
<glob pattern=\'*.hpp\' weight=\'70\'/> \" <glob pattern=\'*.hpp\' weight=\'70\'/>\",
<glob pattern=\'*.hp\' weight=\'70\'/> \" <glob pattern=\'*.hp\' weight=\'70\'/>\",
<!-- Additions to freedesktop: --> \" <!-- Additions to freedesktop: -->\",
<glob pattern=\'*.h\' weight=\'70\'/> \" <glob pattern=\'*.h\' weight=\'70\'/>\",
<glob pattern=\'*.H\' weight=\'70\'/> \" <glob pattern=\'*.H\' weight=\'70\'/>\",
<!-- Find include guards of header files without extension, for \" <!-- Find include guards of header files without extension, for\",
example, STL ones like <string>. Those can have a big initial \" example, STL ones like <string>. Those can have a big initial\",
comment exceeding 1000 chars, though. --> \" comment exceeding 1000 chars, though. -->\",
<magic priority=\'50\'> \" <magic priority=\'50\'>\",
<match value=\'#ifndef \' type=\'string\' offset=\'0:2000\'/> \" <match value=\'#ifndef \' type=\'string\' offset=\'0:2000\'/>\",
<match value=\'#if \' type=\'string\' offset=\'0:2000\'/> \" <match value=\'#if \' type=\'string\' offset=\'0:2000\'/>\",
<match value=\'#include \' type=\'string\' offset=\'0:2000\'/> \" <match value=\'#include \' type=\'string\' offset=\'0:2000\'/>\",
</magic> \" </magic>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'text/x-c++src\'> \" <mime-type type=\'text/x-c++src\'>\",
<comment>C++ source code</comment> \" <comment>C++ source code</comment>\",
<sub-class-of type=\'text/x-csrc\'/> \" <sub-class-of type=\'text/x-csrc\'/>\",
<glob pattern=\'*.cpp\' weight=\'70\'/> \" <glob pattern=\'*.cpp\' weight=\'70\'/>\",
<glob pattern=\'*.cxx\' weight=\'70\'/> \" <glob pattern=\'*.cxx\' weight=\'70\'/>\",
<glob pattern=\'*.cc\' weight=\'70\'/> \" <glob pattern=\'*.cc\' weight=\'70\'/>\",
<glob pattern=\'*.C\' case-sensitive=\'true\' weight=\'70\'/> \" <glob pattern=\'*.C\' case-sensitive=\'true\' weight=\'70\'/>\",
<glob pattern=\'*.c++\' weight=\'70\'/> \" <glob pattern=\'*.c++\' weight=\'70\'/>\",
<!-- Additions to freedesktop: --> \" <!-- Additions to freedesktop: -->\",
<glob pattern=\'*.cp\' weight=\'70\'/> \" <glob pattern=\'*.cp\' weight=\'70\'/>\",
<glob pattern=\'*.inl\' weight=\'70\'/> \" <glob pattern=\'*.inl\' weight=\'70\'/>\",
<glob pattern=\'*.tcc\' weight=\'70\'/> \" <glob pattern=\'*.tcc\' weight=\'70\'/>\",
<glob pattern=\'*.tpp\' weight=\'70\'/> \" <glob pattern=\'*.tpp\' weight=\'70\'/>\",
<glob pattern=\'*.t++\' weight=\'70\'/> \" <glob pattern=\'*.t++\' weight=\'70\'/>\",
<glob pattern=\'*.txx\' weight=\'70\'/> \" <glob pattern=\'*.txx\' weight=\'70\'/>\",
<magic priority=\'30\'> \" <magic priority=\'30\'>\",
<match value=\'-*- C++ -*-\' type=\'string\' offset=\'0:30\'/> \" <match value=\'-*- C++ -*-\' type=\'string\' offset=\'0:30\'/>\",
</magic> \" </magic>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'text/x-qdoc\'> \" <mime-type type=\'text/x-qdoc\'>\",
<comment>Qt documentation file</comment> \" <comment>Qt documentation file</comment>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<glob pattern=\'*.qdoc\' weight=\'70\'/> \" <glob pattern=\'*.qdoc\' weight=\'70\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'text/x-moc\'> \" <mime-type type=\'text/x-moc\'>\",
<comment>Qt MOC file</comment> \" <comment>Qt MOC file</comment>\",
<!-- Fix to freedesktop: moc is C++ source --> \" <!-- Fix to freedesktop: moc is C++ source -->\",
<sub-class-of type=\'text/x-c++src\'/> \" <sub-class-of type=\'text/x-c++src\'/>\",
<glob pattern=\'*.moc\' weight=\'70\'/> \" <glob pattern=\'*.moc\' weight=\'70\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'text/x-objc++src\'> \" <mime-type type=\'text/x-objc++src\'>\",
<comment>Objective-C++ source code</comment> \" <comment>Objective-C++ source code</comment>\",
<sub-class-of type=\'text/x-c++src\'/> \" <sub-class-of type=\'text/x-c++src\'/>\",
<sub-class-of type=\'text/x-objcsrc\'/> \" <sub-class-of type=\'text/x-objcsrc\'/>\",
<glob pattern=\'*.mm\' weight=\'70\'/> \" <glob pattern=\'*.mm\' weight=\'70\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'text/x-objcsrc\'> \" <mime-type type=\'text/x-objcsrc\'>\",
<comment>Objective-C source code</comment> \" <comment>Objective-C source code</comment>\",
<sub-class-of type=\'text/x-csrc\'/> \" <sub-class-of type=\'text/x-csrc\'/>\",
<glob pattern=\'*.m\' weight=\'70\'/> \" <glob pattern=\'*.m\' weight=\'70\'/>\",
<magic priority=\'30\'> \" <magic priority=\'30\'>\",
<match value=\'#import\' type=\'string\' offset=\'0\'/> \" <match value=\'#import\' type=\'string\' offset=\'0\'/>\",
</magic> \" </magic>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -17,13 +17,13 @@
\"Url\" : \"http://www.qt.io\", \"Url\" : \"http://www.qt.io\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'text/vnd.qtcreator.cvs.submit\'> \" <mime-type type=\'text/vnd.qtcreator.cvs.submit\'>\",
<comment>CVS submit template</comment> \" <comment>CVS submit template</comment>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -41,20 +41,20 @@
], ],
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'text/x-asm\'> \" <mime-type type=\'text/x-asm\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>Assembler</comment> \" <comment>Assembler</comment>\",
<glob pattern=\'*.asm\'/> \" <glob pattern=\'*.asm\'/>\",
</mime-type> \" </mime-type>\",
<!-- Catch-all for assemblers --> \" <!-- Catch-all for assemblers -->\",
<mime-type type=\'text/x-qtcreator-generic-asm\'> \" <mime-type type=\'text/x-qtcreator-generic-asm\'>\",
<sub-class-of type=\'text/x-asm\'/> \" <sub-class-of type=\'text/x-asm\'/>\",
<comment>Qt Creator Generic Assembler</comment> \" <comment>Qt Creator Generic Assembler</comment>\",
<glob pattern=\'*.asm\'/> \" <glob pattern=\'*.asm\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -17,34 +17,34 @@
\"Url\" : \"http://www.qt.io\", \"Url\" : \"http://www.qt.io\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'text/x-generic-project\'> \" <mime-type type=\'text/x-generic-project\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>Generic Qt Creator Project file</comment> \" <comment>Generic Qt Creator Project file</comment>\",
<glob pattern=\'*.creator\'/> \" <glob pattern=\'*.creator\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'application/vnd.qtcreator.generic.files\'> \" <mime-type type=\'application/vnd.qtcreator.generic.files\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>Generic Project Files</comment> \" <comment>Generic Project Files</comment>\",
<glob pattern=\'*.files\'/> \" <glob pattern=\'*.files\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'application/vnd.qtcreator.generic.includes\'> \" <mime-type type=\'application/vnd.qtcreator.generic.includes\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>Generic Project Include Paths</comment> \" <comment>Generic Project Include Paths</comment>\",
<glob pattern=\'*.includes\'/> \" <glob pattern=\'*.includes\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'application/vnd.qtcreator.generic.config\'> \" <mime-type type=\'application/vnd.qtcreator.generic.config\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>Generic Project Configuration File</comment> \" <comment>Generic Project Configuration File</comment>\",
<glob pattern=\'*.config\'/> \" <glob pattern=\'*.config\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -17,20 +17,20 @@
\"Url\" : \"http://www.qt.io\", \"Url\" : \"http://www.qt.io\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'text/vnd.qtcreator.git.commit\'> \" <mime-type type=\'text/vnd.qtcreator.git.commit\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>Git Commit File</comment> \" <comment>Git Commit File</comment>\",
<glob pattern=\'COMMIT_MSG\'/> \" <glob pattern=\'COMMIT_MSG\'/>\",
<glob pattern=\'COMMIT_EDITMSG\'/> \" <glob pattern=\'COMMIT_EDITMSG\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'text/vnd.qtcreator.git.rebase\'> \" <mime-type type=\'text/vnd.qtcreator.git.rebase\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>Git Commit File</comment> \" <comment>Git Commit File</comment>\",
<glob pattern=\'git-rebase-todo\'/> \" <glob pattern=\'git-rebase-todo\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -17,48 +17,48 @@
\"Url\" : \"http://www.qt.io\", \"Url\" : \"http://www.qt.io\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'application/x-glsl\'> \" <mime-type type=\'application/x-glsl\'>\",
<alias type=\'text/x-glsl\'/> \" <alias type=\'text/x-glsl\'/>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>GLSL Shader file</comment> \" <comment>GLSL Shader file</comment>\",
<glob pattern=\'*.glsl\'/> \" <glob pattern=\'*.glsl\'/>\",
<glob pattern=\'*.shader\'/> \" <glob pattern=\'*.shader\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'text/x-glsl-frag\'> \" <mime-type type=\'text/x-glsl-frag\'>\",
<sub-class-of type=\'text/x-glsl\'/> \" <sub-class-of type=\'text/x-glsl\'/>\",
<comment>GLSL Fragment Shader file</comment> \" <comment>GLSL Fragment Shader file</comment>\",
<glob pattern=\'*.frag\'/> \" <glob pattern=\'*.frag\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'text/x-glsl-es-frag\'> \" <mime-type type=\'text/x-glsl-es-frag\'>\",
<sub-class-of type=\'text/x-glsl\'/> \" <sub-class-of type=\'text/x-glsl\'/>\",
<comment>GLSL/ES Fragment Shader file</comment> \" <comment>GLSL/ES Fragment Shader file</comment>\",
<glob pattern=\'*.fsh\'/> \" <glob pattern=\'*.fsh\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'text/x-glsl-vert\'> \" <mime-type type=\'text/x-glsl-vert\'>\",
<sub-class-of type=\'text/x-glsl\'/> \" <sub-class-of type=\'text/x-glsl\'/>\",
<comment>GLSL Vertex Shader file</comment> \" <comment>GLSL Vertex Shader file</comment>\",
<glob pattern=\'*.vert\'/> \" <glob pattern=\'*.vert\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'text/x-glsl-es-vert\'> \" <mime-type type=\'text/x-glsl-es-vert\'>\",
<sub-class-of type=\'text/x-glsl\'/> \" <sub-class-of type=\'text/x-glsl\'/>\",
<comment>GLSL/ES Vertex Shader file</comment> \" <comment>GLSL/ES Vertex Shader file</comment>\",
<glob pattern=\'*.vsh\'/> \" <glob pattern=\'*.vsh\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'text/x-glsl-es-geometry\'> \" <mime-type type=\'text/x-glsl-es-geometry\'>\",
<sub-class-of type=\'text/x-glsl\'/> \" <sub-class-of type=\'text/x-glsl\'/>\",
<comment>GLSL/ES Geometry Shader file</comment> \" <comment>GLSL/ES Geometry Shader file</comment>\",
<glob pattern=\'*.gsh\'/> \" <glob pattern=\'*.gsh\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -17,15 +17,15 @@
\"Url\" : \"http://www.qt.io\", \"Url\" : \"http://www.qt.io\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'image/webp\'> \" <mime-type type=\'image/webp\'>\",
<comment>WebP Image file</comment> \" <comment>WebP Image file</comment>\",
<glob pattern=\'*.webp\'/> \" <glob pattern=\'*.webp\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -18,14 +18,14 @@
\"Experimental\" : true, \"Experimental\" : true,
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\' encoding=\'UTF-8\'?> \"<?xml version=\'1.0\' encoding=\'UTF-8\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'text/vnd.qtcreator.model\'> \" <mime-type type=\'text/vnd.qtcreator.model\'>\",
<sub-class-of type=\'text/xml\'/> \" <sub-class-of type=\'text/xml\'/>\",
<comment>Qt Creator Model File</comment> \" <comment>Qt Creator Model File</comment>\",
<glob pattern=\'*.qmodel\'/> \" <glob pattern=\'*.qmodel\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -18,27 +18,27 @@
\"Experimental\" : true, \"Experimental\" : true,
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'text/x-nim-project\'> \" <mime-type type=\'text/x-nim-project\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>Nim project file</comment> \" <comment>Nim project file</comment>\",
<glob pattern=\'*.nimproject\'/> \" <glob pattern=\'*.nimproject\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'text/x-nim\'> \" <mime-type type=\'text/x-nim\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>Nim source file </comment> \" <comment>Nim source file </comment>\",
<glob pattern=\'*.nim\'/> \" <glob pattern=\'*.nim\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'text/x-nim-script\'> \" <mime-type type=\'text/x-nim-script\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>Nim script file </comment> \" <comment>Nim script file </comment>\",
<glob pattern=\'*.nims\'/> \" <glob pattern=\'*.nims\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -17,16 +17,16 @@
\"Url\" : \"http://www.qt.io\", \"Url\" : \"http://www.qt.io\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'text/vnd.qtcreator.p4.submit\'> \" <mime-type type=\'text/vnd.qtcreator.p4.submit\'>\",
<comment>Perforce submit template</comment> \" <comment>Perforce submit template</comment>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<magic priority=\'50\'> \" <magic priority=\'50\'>\",
<match value=\'# A Perforce Change Specification.\' type=\'string\' offset=\'0\'/> \" <match value=\'# A Perforce Change Specification.\' type=\'string\' offset=\'0\'/>\",
</magic> \" </magic>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -17,19 +17,19 @@
\"Url\" : \"http://www.qt.io\", \"Url\" : \"http://www.qt.io\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'text/x-python-gui\'> \" <mime-type type=\'text/x-python-gui\'>\",
<sub-class-of type=\'text/x-python\'/> \" <sub-class-of type=\'text/x-python\'/>\",
<comment>Python source file without console</comment> \" <comment>Python source file without console</comment>\",
<glob pattern=\'*.pyw\'/> \" <glob pattern=\'*.pyw\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'text/x-python-project\'> \" <mime-type type=\'text/x-python-project\'>\",
<sub-class-of type=\'text/x-python\'/> \" <sub-class-of type=\'text/x-python\'/>\",
<comment>Qt Creator Python project file</comment> \" <comment>Qt Creator Python project file</comment>\",
<glob pattern=\'*.pyqtc\'/> \" <glob pattern=\'*.pyqtc\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -17,39 +17,39 @@
\"Url\" : \"http://www.qt.io\", \"Url\" : \"http://www.qt.io\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'application/vnd.qt.qmakeprofile\'> \" <mime-type type=\'application/vnd.qt.qmakeprofile\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>Qt Project file</comment> \" <comment>Qt Project file</comment>\",
<glob pattern=\'*.pro\'/> \" <glob pattern=\'*.pro\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'application/vnd.qt.qmakeproincludefile\'> \" <mime-type type=\'application/vnd.qt.qmakeproincludefile\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>Qt Project include file</comment> \" <comment>Qt Project include file</comment>\",
<glob pattern=\'*.pri\'/> \" <glob pattern=\'*.pri\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'application/vnd.qt.qmakeprofeaturefile\'> \" <mime-type type=\'application/vnd.qt.qmakeprofeaturefile\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>Qt Project feature file</comment> \" <comment>Qt Project feature file</comment>\",
<glob pattern=\'*.prf\'/> \" <glob pattern=\'*.prf\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'application/vnd.qt.qmakeproconfigurationfile\'> \" <mime-type type=\'application/vnd.qt.qmakeproconfigurationfile\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>Qt Project configuration file</comment> \" <comment>Qt Project configuration file</comment>\",
<glob pattern=\'.qmake.conf\'/> \" <glob pattern=\'.qmake.conf\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'application/vnd.qt.qmakeprocachefile\'> \" <mime-type type=\'application/vnd.qt.qmakeprocachefile\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>Qt Project cache file</comment> \" <comment>Qt Project cache file</comment>\",
<glob pattern=\'.qmake.cache\'/> \" <glob pattern=\'.qmake.cache\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'application/vnd.qt.qmakeprostashfile\'> \" <mime-type type=\'application/vnd.qt.qmakeprostashfile\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>Qt Project stash file</comment> \" <comment>Qt Project stash file</comment>\",
<glob pattern=\'.qmake.stash\'/> \" <glob pattern=\'.qmake.stash\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -18,45 +18,45 @@
\"Url\" : \"http://www.qt.io\", \"Url\" : \"http://www.qt.io\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'text/x-qml\'> \" <mime-type type=\'text/x-qml\'>\",
<alias type=\'application/x-qml\'/> \" <alias type=\'application/x-qml\'/>\",
<!-- sub class is missing in the freedesktop.org definition --> \" <!-- sub class is missing in the freedesktop.org definition -->\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>QML file</comment> \" <comment>QML file</comment>\",
<glob pattern=\'*.qml\' weight=\'70\'/> \" <glob pattern=\'*.qml\' weight=\'70\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'application/x-qt.qbs+qml\'> \" <mime-type type=\'application/x-qt.qbs+qml\'>\",
<alias type=\'text/x-qt.qbs+qml\'/> \" <alias type=\'text/x-qt.qbs+qml\'/>\",
<sub-class-of type=\'text/x-qml\'/> \" <sub-class-of type=\'text/x-qml\'/>\",
<comment>Qt Build Suite file</comment> \" <comment>Qt Build Suite file</comment>\",
<glob pattern=\'*.qbs\' weight=\'70\'/> \" <glob pattern=\'*.qbs\' weight=\'70\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'application/x-qt.ui+qml\'> \" <mime-type type=\'application/x-qt.ui+qml\'>\",
<alias type=\'text/x-qt.ui+qml\'/> \" <alias type=\'text/x-qt.ui+qml\'/>\",
<sub-class-of type=\'text/x-qml\'/> \" <sub-class-of type=\'text/x-qml\'/>\",
<comment>QtQuick Designer ui file</comment> \" <comment>QtQuick Designer ui file</comment>\",
<glob pattern=\'*.ui.qml\' weight=\'70\'/> \" <glob pattern=\'*.ui.qml\' weight=\'70\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'application/x-qmlproject\'> \" <mime-type type=\'application/x-qmlproject\'>\",
<alias type=\'text/x-qmlproject\'/> \" <alias type=\'text/x-qmlproject\'/>\",
<sub-class-of type=\'text/x-qml\'/> \" <sub-class-of type=\'text/x-qml\'/>\",
<comment>Qt Creator Qt UI project file</comment> \" <comment>Qt Creator Qt UI project file</comment>\",
<glob pattern=\'*.qmlproject\' weight=\'70\'/> \" <glob pattern=\'*.qmlproject\' weight=\'70\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'application/x-qt.meta-info+qml\'> \" <mime-type type=\'application/x-qt.meta-info+qml\'>\",
<alias type=\'text/x-qt.meta-info+qml\'/> \" <alias type=\'text/x-qt.meta-info+qml\'/>\",
<sub-class-of type=\'text/x-qml\'/> \" <sub-class-of type=\'text/x-qml\'/>\",
<comment>QML file</comment> \" <comment>QML file</comment>\",
<glob pattern=\'*.qmltypes\' weight=\'70\'/> \" <glob pattern=\'*.qmltypes\' weight=\'70\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'application/json\'> \" <mime-type type=\'application/json\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>JSON file</comment> \" <comment>JSON file</comment>\",
<glob pattern=\'*.json\' weight=\'70\'/> \" <glob pattern=\'*.json\' weight=\'70\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -17,15 +17,15 @@
\"Url\" : \"http://www.qt.io\", \"Url\" : \"http://www.qt.io\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'application/x-qmlproject\'> \" <mime-type type=\'application/x-qmlproject\'>\",
<sub-class-of type=\'text/x-qml\'/> \" <sub-class-of type=\'text/x-qml\'/>\",
<comment>QML Project file</comment> \" <comment>QML Project file</comment>\",
<glob pattern=\'*.qmlproject\'/> \" <glob pattern=\'*.qmlproject\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -18,25 +18,25 @@
\"Url\" : \"http://www.qt.io\", \"Url\" : \"http://www.qt.io\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'application/x-linguist-translation\'> \" <mime-type type=\'application/x-linguist-translation\'>\",
<comment>Linguist compiled translations</comment> \" <comment>Linguist compiled translations</comment>\",
<glob pattern=\'*.qm\'/> \" <glob pattern=\'*.qm\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'application/x-linguist\'> \" <mime-type type=\'application/x-linguist\'>\",
<comment>Linguist source translations</comment> \" <comment>Linguist source translations</comment>\",
<magic> \" <magic>\",
<match value=\'&lt;TS\' type=\'string\' offset=\'0:256\'/> \" <match value=\'&lt;TS\' type=\'string\' offset=\'0:256\'/>\",
</magic> \" </magic>\",
<glob pattern=\'*.ts\' weight=\'70\'/> \" <glob pattern=\'*.ts\' weight=\'70\'/>\",
</mime-type> \" </mime-type>\",
<mime-type type=\'application/scxml+xml\'> \" <mime-type type=\'application/scxml+xml\'>\",
<comment>SCXML State Chart</comment> \" <comment>SCXML State Chart</comment>\",
<sub-class-of type=\'application/xml\'/> \" <sub-class-of type=\'application/xml\'/>\",
<glob pattern=\'*.scxml\'/> \" <glob pattern=\'*.scxml\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -17,14 +17,14 @@
\"Url\" : \"http://www.qt.io\", \"Url\" : \"http://www.qt.io\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'application/vnd.qt.xml.resource\'> \" <mime-type type=\'application/vnd.qt.xml.resource\'>\",
<sub-class-of type=\'text/xml\'/> \" <sub-class-of type=\'text/xml\'/>\",
<comment>Qt Resource file</comment> \" <comment>Qt Resource file</comment>\",
<glob pattern=\'*.qrc\'/> \" <glob pattern=\'*.qrc\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -18,14 +18,14 @@
\"Experimental\" : true, \"Experimental\" : true,
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'application/scxml+xml\'> \" <mime-type type=\'application/scxml+xml\'>\",
<sub-class-of type=\'text/xml\'/> \" <sub-class-of type=\'text/xml\'/>\",
<comment>SCXML file</comment> \" <comment>SCXML file</comment>\",
<glob pattern=\'*.scxml\'/> \" <glob pattern=\'*.scxml\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -17,13 +17,13 @@
\"Url\" : \"http://www.qt.io\", \"Url\" : \"http://www.qt.io\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\'?> \"<?xml version=\'1.0\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'text/vnd.qtcreator.svn.submit\'> \" <mime-type type=\'text/vnd.qtcreator.svn.submit\'>\",
<comment>Subversion submit template</comment> \" <comment>Subversion submit template</comment>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }

View File

@@ -16,15 +16,15 @@
\"Url\" : \"http://www.qt.io\", \"Url\" : \"http://www.qt.io\",
$$dependencyList, $$dependencyList,
\"Mimetypes\" : \" \"Mimetypes\" : [
<?xml version=\'1.0\' encoding=\'UTF-8\'?> \"<?xml version=\'1.0\' encoding=\'UTF-8\'?>\",
<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> \"<mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'>\",
<mime-type type=\'text/x-tasklist\'> \" <mime-type type=\'text/x-tasklist\'>\",
<sub-class-of type=\'text/plain\'/> \" <sub-class-of type=\'text/plain\'/>\",
<comment>Qt Creator task list file</comment> \" <comment>Qt Creator task list file</comment>\",
<glob pattern=\'*.tasks\'/> \" <glob pattern=\'*.tasks\'/>\",
<glob pattern=\'*.tasks.txt\'/> \" <glob pattern=\'*.tasks.txt\'/>\",
</mime-type> \" </mime-type>\",
</mime-info> \"</mime-info>\"
\" ]
} }