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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user