From b84aa8e837ea9146fd1882eeef43a68fb12620cf Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Wed, 3 May 2017 14:17:18 +0200 Subject: [PATCH] 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 --- src/plugins/resourceeditor/resourcenode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/resourceeditor/resourcenode.cpp b/src/plugins/resourceeditor/resourcenode.cpp index ffe74eeb42a..cdf418ec438 100644 --- a/src/plugins/resourceeditor/resourcenode.cpp +++ b/src/plugins/resourceeditor/resourcenode.cpp @@ -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) {