From 681c5177f9c1af68e103a3f084528d33b702b2d8 Mon Sep 17 00:00:00 2001
From: Eike Ziller <eike.ziller@theqtcompany.com>
Date: Fri, 24 Apr 2015 10:53:21 +0200
Subject: [PATCH] Fix that CSS files where opened in C++ editor

For some reason freedesktop.org claims that CSS files
are text/x-csrc, so we explicitly make plain text editor
the handler for text/css.

Change-Id: I9685706523fff450ab10d1d0eb1850090e55c51a
Task-number: QTCREATORBUG-14334
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
---
 src/plugins/texteditor/plaintexteditorfactory.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/plugins/texteditor/plaintexteditorfactory.cpp b/src/plugins/texteditor/plaintexteditorfactory.cpp
index a06234c53b2..40a892fdabe 100644
--- a/src/plugins/texteditor/plaintexteditorfactory.cpp
+++ b/src/plugins/texteditor/plaintexteditorfactory.cpp
@@ -64,6 +64,7 @@ PlainTextEditorFactory::PlainTextEditorFactory()
     setId(Core::Constants::K_DEFAULT_TEXT_EDITOR_ID);
     setDisplayName(qApp->translate("OpenWith::Editors", Core::Constants::K_DEFAULT_TEXT_EDITOR_DISPLAY_NAME));
     addMimeType(QLatin1String(TextEditor::Constants::C_TEXTEDITOR_MIMETYPE_TEXT));
+    addMimeType(QLatin1String("text/css")); // for some reason freedesktop thinks css is text/x-csrc
 
     setDocumentCreator([]() { return new TextDocument(Core::Constants::K_DEFAULT_TEXT_EDITOR_ID); });
     setEditorWidgetCreator([]() { return new PlainTextEditorWidget; });
-- 
GitLab