forked from qt-creator/qt-creator
QmlProjectManager: Detect file types correctly
Just calling everything "Source" is not very helpful. Change-Id: I74a19e46782aa301c5726130200aeb16ef916d78 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -353,10 +353,10 @@ void QmlProject::generateProjectTree()
|
||||
auto newRoot = new Internal::QmlProjectNode(this);
|
||||
|
||||
for (const QString &f : m_projectItem.data()->files()) {
|
||||
FileType fileType = FileType::Source; // ### FIXME
|
||||
if (f == projectFilePath().toString())
|
||||
fileType = FileType::Project;
|
||||
newRoot->addNestedNode(new FileNode(Utils::FileName::fromString(f), fileType, false));
|
||||
const Utils::FileName fileName = Utils::FileName::fromString(f);
|
||||
const FileType fileType = (fileName == projectFilePath())
|
||||
? FileType::Project : FileNode::fileTypeForFileName(fileName);
|
||||
newRoot->addNestedNode(new FileNode(fileName, fileType, false));
|
||||
}
|
||||
newRoot->addNestedNode(new FileNode(projectFilePath(), FileType::Project, false));
|
||||
|
||||
|
Reference in New Issue
Block a user