forked from qt-creator/qt-creator
Remove unneeded checks for validity of mime types
mimeTypeForFile(...) is documented to never return an invalid mime type (it will fall back to binary if everything else fails), so remove unneeded checks. This also removes fallback code that used text/plain in case of invalid mime type, which is probably a relict from the old mime implementation. Change-Id: I88ed41fa3b81704f110f9f481b0f01424a487cbb Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -160,8 +160,6 @@ static QString otherFile()
|
||||
if (current.isEmpty())
|
||||
return QString();
|
||||
const Utils::MimeType currentMimeType = Utils::mimeTypeForFile(current);
|
||||
if (!currentMimeType.isValid())
|
||||
return QString();
|
||||
// Determine potential suffixes of candidate files
|
||||
// 'ui' -> 'cpp', 'cpp/h' -> 'ui'.
|
||||
QStringList candidateSuffixes;
|
||||
|
||||
Reference in New Issue
Block a user