forked from qt-creator/qt-creator
CPaster: Update mime types
Change-Id: I98b2dd5621f230e0d7ed76eaead59b88464b6198 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -34,7 +34,10 @@
|
|||||||
#include <utils/networkaccessmanager.h>
|
#include <utils/networkaccessmanager.h>
|
||||||
|
|
||||||
#include <cpptools/cpptoolsconstants.h>
|
#include <cpptools/cpptoolsconstants.h>
|
||||||
|
#include <designer/designerconstants.h>
|
||||||
|
#include <glsleditor/glsleditorconstants.h>
|
||||||
#include <qmljstools/qmljstoolsconstants.h>
|
#include <qmljstools/qmljstoolsconstants.h>
|
||||||
|
#include <resourceeditor/resourceeditorconstants.h>
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <coreplugin/dialogs/ioptionspage.h>
|
#include <coreplugin/dialogs/ioptionspage.h>
|
||||||
|
|
||||||
@@ -83,19 +86,29 @@ void Protocol::list()
|
|||||||
|
|
||||||
Protocol::ContentType Protocol::contentType(const QString &mt)
|
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::C_HEADER_MIMETYPE)
|
||||||
|| mt == QLatin1String(CppTools::Constants::CPP_SOURCE_MIMETYPE)
|
|| mt == QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE)
|
||||||
|| mt == QLatin1String(CppTools::Constants::OBJECTIVE_CPP_SOURCE_MIMETYPE)
|
|| mt == QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_VERT)
|
||||||
|| mt == QLatin1String(CppTools::Constants::CPP_HEADER_MIMETYPE))
|
|| 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;
|
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)
|
if (mt == QLatin1String(QmlJSTools::Constants::QML_MIMETYPE)
|
||||||
|| mt == QLatin1String(QmlJSTools::Constants::JS_MIMETYPE)
|
|| mt == QLatin1String(QmlJSTools::Constants::JS_MIMETYPE)
|
||||||
|| mt == QLatin1String(QmlJSTools::Constants::JSON_MIMETYPE))
|
|| mt == QLatin1String(QmlJSTools::Constants::JSON_MIMETYPE))
|
||||||
return JavaScript;
|
return JavaScript;
|
||||||
if (mt == QLatin1String("text/x-patch"))
|
if (mt == QLatin1String("text/x-patch"))
|
||||||
return Diff;
|
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 Xml;
|
||||||
return Text;
|
return Text;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user