forked from qt-creator/qt-creator
TextEditor: Reset mimetype after open() in all BaseTextEditors
This was already done in all major editors and should not harm all others. Change-Id: I7e19d285c4b85419a9a1f9afa961addecf682eaf Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -56,7 +56,6 @@
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/id.h>
|
||||
#include <coreplugin/mimedatabase.h>
|
||||
#include <coreplugin/modemanager.h>
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
@@ -173,13 +172,6 @@ QModelIndex QmlJSEditorWidget::outlineModelIndex()
|
||||
return m_outlineModelIndex;
|
||||
}
|
||||
|
||||
bool QmlJSEditor::open(QString *errorString, const QString &fileName, const QString &realFileName)
|
||||
{
|
||||
bool b = BaseTextEditor::open(errorString, fileName, realFileName);
|
||||
textDocument()->setMimeType(MimeDatabase::findByFile(QFileInfo(fileName)).type());
|
||||
return b;
|
||||
}
|
||||
|
||||
static void appendExtraSelectionsForMessages(
|
||||
QList<QTextEdit::ExtraSelection> *selections,
|
||||
const QList<DiagnosticMessage> &messages,
|
||||
|
||||
Reference in New Issue
Block a user