diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 3df5b510f106dd4098abc2186b74d26066740740..e235e09acc933bd1801325fcc988e0760cb84379 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -992,11 +992,11 @@ IEditor *EditorManager::createEditor(const QString &editorKind, EditorFactoryList factories; if (editorKind.isEmpty()) { // Find by mime type - const MimeType mimeType = m_d->m_core->mimeDatabase()->findByFile(QFileInfo(fileName)); + MimeType mimeType = m_d->m_core->mimeDatabase()->findByFile(QFileInfo(fileName)); if (!mimeType) { - qWarning("%s unable to determine mime type of %s/%s.", + qWarning("%s unable to determine mime type of %s/%s. Falling back to text/plain", Q_FUNC_INFO, fileName.toUtf8().constData(), editorKind.toUtf8().constData()); - return 0; + mimeType = m_d->m_core->mimeDatabase()->findByType(QLatin1String("text/plain")); } factories = editorFactories(mimeType, true); } else {