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:
hjk
2014-09-03 13:10:57 +02:00
parent 480efb0254
commit 2e17339b05
7 changed files with 4 additions and 74 deletions

View File

@@ -546,14 +546,6 @@ void CppEditorWidget::keyPressEvent(QKeyEvent *e)
TextEditor::BaseTextEditorWidget::keyPressEvent(e);
}
bool CppEditor::open(QString *errorString, const QString &fileName, const QString &realFileName)
{
if (!TextEditor::BaseTextEditor::open(errorString, fileName, realFileName))
return false;
textDocument()->setMimeType(Core::MimeDatabase::findByFile(QFileInfo(fileName)).type());
return true;
}
void CppEditorWidget::applyFontSettings()
{
// This also makes the document apply font settings