Commit 501346c3 authored by Tobias Hunger's avatar Tobias Hunger

CPaster: Update mime types

Change-Id: I98b2dd5621f230e0d7ed76eaead59b88464b6198
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 228b7cce
......@@ -34,7 +34,10 @@
#include <utils/networkaccessmanager.h>
#include <cpptools/cpptoolsconstants.h>
#include <designer/designerconstants.h>
#include <glsleditor/glsleditorconstants.h>
#include <qmljstools/qmljstoolsconstants.h>
#include <resourceeditor/resourceeditorconstants.h>
#include <coreplugin/icore.h>
#include <coreplugin/dialogs/ioptionspage.h>
......@@ -83,19 +86,29 @@ void Protocol::list()
Protocol::ContentType Protocol::contentType(const QString &mt)
{
if (mt == QLatin1String(CppTools::Constants::C_SOURCE_MIMETYPE)
if (mt == QLatin1String(CppTools::Constants::C_SOURCE_MIMETYPE)
|| mt == QLatin1String(CppTools::Constants::C_HEADER_MIMETYPE)
|| mt == QLatin1String(CppTools::Constants::CPP_SOURCE_MIMETYPE)
|| mt == QLatin1String(CppTools::Constants::OBJECTIVE_CPP_SOURCE_MIMETYPE)
|| mt == QLatin1String(CppTools::Constants::CPP_HEADER_MIMETYPE))
|| mt == QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE)
|| mt == QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_VERT)
|| mt == QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_FRAG)
|| mt == QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_VERT_ES)
|| mt == QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_FRAG_ES))
return C;
if (mt == QLatin1String(CppTools::Constants::CPP_SOURCE_MIMETYPE)
|| mt == QLatin1String(CppTools::Constants::CPP_HEADER_MIMETYPE)
|| mt == QLatin1String(CppTools::Constants::OBJECTIVE_CPP_SOURCE_MIMETYPE)
|| mt == QLatin1String(CppTools::Constants::OBJECTIVE_CPP_SOURCE_MIMETYPE))
return Cpp;
if (mt == QLatin1String(QmlJSTools::Constants::QML_MIMETYPE)
|| mt == QLatin1String(QmlJSTools::Constants::JS_MIMETYPE)
|| mt == QLatin1String(QmlJSTools::Constants::JSON_MIMETYPE))
return JavaScript;
if (mt == QLatin1String("text/x-patch"))
return Diff;
if (mt == QLatin1String("text/xml") || mt == QLatin1String("application/xml"))
if (mt == QLatin1String("text/xml")
|| mt == QLatin1String("application/xml")
|| mt == QLatin1String(ResourceEditor::Constants::C_RESOURCE_MIMETYPE)
|| mt == QLatin1String(Designer::Constants::FORM_MIMETYPE))
return Xml;
return Text;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment