forked from qt-creator/qt-creator
Editor: Fix: "Open File With..." with empty File
and no extension is now handled as a plain text file. Task-number: QTCREATORBUG-7591 Change-Id: I21471315cb6144f27c374e0919fd16e62f7d8f2a Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
committed by
David Schulz
parent
61fb4f55c8
commit
1035224774
@@ -1173,9 +1173,10 @@ Core::Id EditorManager::getOpenWithEditorId(const QString &fileName,
|
||||
bool *isExternalEditor) const
|
||||
{
|
||||
// Collect editors that can open the file
|
||||
const MimeType mt = ICore::mimeDatabase()->findByFile(fileName);
|
||||
MimeType mt = ICore::mimeDatabase()->findByFile(fileName);
|
||||
//Unable to determine mime type of fileName. Falling back to text/plain",
|
||||
if (!mt)
|
||||
return Id();
|
||||
mt = ICore::mimeDatabase()->findByType(QLatin1String("text/plain"));
|
||||
QStringList allEditorIds;
|
||||
QStringList allEditorDisplayNames;
|
||||
QList<Id> externalEditorIds;
|
||||
|
||||
Reference in New Issue
Block a user