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

@@ -7024,7 +7024,10 @@ QString BaseTextEditorWidget::foldReplacementText(const QTextBlock &) const
bool BaseTextEditor::open(QString *errorString, const QString &fileName, const QString &realFileName)
{
return editorWidget()->open(errorString, fileName, realFileName);
if (!editorWidget()->open(errorString, fileName, realFileName))
return false;
textDocument()->setMimeType(Core::MimeDatabase::findByFile(QFileInfo(fileName)).type());
return true;
}
QByteArray BaseTextEditor::saveState() const