ResourceNode: Set proper fileType based on file name

Set the fileType of ResourceFiles based on their file name. This
makes sure that QML files will be treated as QML, which fixes e.g.
QTCREATORBUG-18032 (and probably other strange bugs).

Task-number: QTCREATORBUG-18032
Change-Id: I05b1048d998ea1bed196611d529771c582bce441
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
Tobias Hunger
2017-05-03 14:17:18 +02:00
committed by Marco Benelli
parent ccdf335425
commit b84aa8e837

View File

@@ -658,7 +658,7 @@ ResourceTopLevelNode *ResourceFolderNode::resourceNode() const
}
ResourceFileNode::ResourceFileNode(const FileName &filePath, const QString &qrcPath, const QString &displayName)
: FileNode(filePath, FileType::Unknown, false)
: FileNode(filePath, FileNode::fileTypeForFileName(filePath), false)
, m_qrcPath(qrcPath)
, m_displayName(displayName)
{