forked from qt-creator/qt-creator
ProjectExplorer: Shorten space needed to store a FileType
Use class enum to shorten the FileType to quint16. This frees up a couple of bytes per FileNode and we can have many of those. Change-Id: I3a9ae25059690fefa15305a4268269647d6dc1c9 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -224,7 +224,7 @@ void ServerModeReader::generateProjectTree(CMakeProjectNode *root)
|
||||
const int oldCount = knownFiles.count();
|
||||
knownFiles.insert(s);
|
||||
if (oldCount != knownFiles.count())
|
||||
fileGroupNodes.append(new FileNode(s, SourceType, fg->isGenerated));
|
||||
fileGroupNodes.append(new FileNode(s, FileType::Source, fg->isGenerated));
|
||||
}
|
||||
}
|
||||
root->buildTree(fileGroupNodes);
|
||||
@@ -418,7 +418,7 @@ void ServerModeReader::extractCMakeInputsData(const QVariantMap &data)
|
||||
const int oldCount = m_cmakeFiles.count();
|
||||
m_cmakeFiles.insert(sfn);
|
||||
if (!isCMake && oldCount < m_cmakeFiles.count())
|
||||
m_cmakeInputsFileNodes.append(new FileNode(sfn, ProjectFileType, isTemporary));
|
||||
m_cmakeInputsFileNodes.append(new FileNode(sfn, FileType::Project, isTemporary));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user