QmlDesigner: Concat source ids into one struct

SourceIdsData is reducing the parameter count and later shares the
initialization the watcher notifier.

Task-number: QDS-9479
Change-Id: I30fca678a857821a376906071d6c219c4dd2e4b7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Marco Bubke
2023-03-21 14:02:55 +01:00
parent 492c2f89c4
commit f07e8a5918
2 changed files with 161 additions and 220 deletions

View File

@@ -60,11 +60,11 @@ ProjectStorageUpdater::Components createComponents(
ModuleId moduleId, ModuleId moduleId,
ModuleId pathModuleId, ModuleId pathModuleId,
FileSystemInterface &fileSystem, FileSystemInterface &fileSystem,
const QString &directory) const Utils::PathString &directory)
{ {
ProjectStorageUpdater::Components components; ProjectStorageUpdater::Components components;
auto qmlFileNames = fileSystem.qmlFileNames(directory); auto qmlFileNames = fileSystem.qmlFileNames(QString{directory});
components.reserve(static_cast<std::size_t>(qmlDirParserComponents.size() + qmlFileNames.size())); components.reserve(static_cast<std::size_t>(qmlDirParserComponents.size() + qmlFileNames.size()));
@@ -166,53 +166,34 @@ void ProjectStorageUpdater::update(QStringList directories,
ProjectPartId projectPartId) ProjectPartId projectPartId)
{ {
Storage::Synchronization::SynchronizationPackage package; Storage::Synchronization::SynchronizationPackage package;
SourceIdsData sourceIdsData{static_cast<std::size_t>(directories.size())};
SourceIds notUpdatedFileStatusSourceIds;
SourceIds notUpdatedSourceIds;
std::vector<IdPaths> idPaths; std::vector<IdPaths> idPaths;
idPaths.reserve(2); idPaths.reserve(4);
SourceIds watchedDirectorySourceIds;
watchedDirectorySourceIds.reserve(directories.size());
SourceIds watchedQmldirSourceIds;
watchedQmldirSourceIds.reserve(directories.size());
SourceIds watchedQmlSourceIds;
watchedQmldirSourceIds.reserve(directories.size() * 100);
SourceIds watchedQmltypesSourceIds;
watchedQmltypesSourceIds.reserve(directories.size());
updateDirectories(directories, updateDirectories(directories, package, sourceIdsData);
package, updateQmlTypes(qmlTypesPaths, package, sourceIdsData);
notUpdatedFileStatusSourceIds,
notUpdatedSourceIds,
watchedDirectorySourceIds,
watchedQmldirSourceIds,
watchedQmlSourceIds,
watchedQmltypesSourceIds);
updateQmlTypes(qmlTypesPaths,
package,
notUpdatedFileStatusSourceIds,
notUpdatedSourceIds,
watchedQmltypesSourceIds);
package.updatedSourceIds = filterNotUpdatedSourceIds(std::move(package.updatedSourceIds), package.updatedSourceIds = filterNotUpdatedSourceIds(std::move(package.updatedSourceIds),
std::move(notUpdatedSourceIds)); std::move(sourceIdsData.notUpdatedSourceIds));
package.updatedFileStatusSourceIds = filterNotUpdatedSourceIds( package.updatedFileStatusSourceIds = filterNotUpdatedSourceIds(
std::move(package.updatedFileStatusSourceIds), std::move(notUpdatedFileStatusSourceIds)); std::move(package.updatedFileStatusSourceIds),
std::move(sourceIdsData.notUpdatedFileStatusSourceIds));
m_projectStorage.synchronize(std::move(package)); m_projectStorage.synchronize(std::move(package));
idPaths.push_back({projectPartId, SourceType::Directory, std::move(watchedDirectorySourceIds)}); idPaths.push_back(
idPaths.push_back({projectPartId, SourceType::QmlDir, std::move(watchedQmldirSourceIds)}); {projectPartId, SourceType::Directory, std::move(sourceIdsData.watchedDirectorySourceIds)});
idPaths.push_back({projectPartId, SourceType::Qml, std::move(watchedQmlSourceIds)}); idPaths.push_back(
idPaths.push_back({projectPartId, SourceType::QmlTypes, std::move(watchedQmltypesSourceIds)}); {projectPartId, SourceType::QmlDir, std::move(sourceIdsData.watchedQmldirSourceIds)});
idPaths.push_back({projectPartId, SourceType::Qml, std::move(sourceIdsData.watchedQmlSourceIds)});
idPaths.push_back(
{projectPartId, SourceType::QmlTypes, std::move(sourceIdsData.watchedQmltypesSourceIds)});
m_pathWatcher.updateIdPaths(idPaths); m_pathWatcher.updateIdPaths(idPaths);
} }
void ProjectStorageUpdater::updateQmlTypes(const QStringList &qmlTypesPaths, void ProjectStorageUpdater::updateQmlTypes(const QStringList &qmlTypesPaths,
Storage::Synchronization::SynchronizationPackage &package, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &notUpdatedFileStatusSourceIds, SourceIdsData &sourceIdsData)
SourceIds &notUpdatedSourceIds,
SourceIds &watchedQmltypesSourceIds)
{ {
if (qmlTypesPaths.empty()) if (qmlTypesPaths.empty())
return; return;
@@ -221,7 +202,7 @@ void ProjectStorageUpdater::updateQmlTypes(const QStringList &qmlTypesPaths,
for (const QString &qmlTypesPath : qmlTypesPaths) { for (const QString &qmlTypesPath : qmlTypesPaths) {
SourceId sourceId = m_pathCache.sourceId(SourcePath{qmlTypesPath}); SourceId sourceId = m_pathCache.sourceId(SourcePath{qmlTypesPath});
watchedQmltypesSourceIds.push_back(sourceId); sourceIdsData.watchedQmltypesSourceIds.push_back(sourceId);
Storage::Synchronization::ProjectData projectData{sourceId, Storage::Synchronization::ProjectData projectData{sourceId,
sourceId, sourceId,
@@ -231,8 +212,7 @@ void ProjectStorageUpdater::updateQmlTypes(const QStringList &qmlTypesPaths,
FileState state = parseTypeInfo(projectData, FileState state = parseTypeInfo(projectData,
Utils::PathString{qmlTypesPath}, Utils::PathString{qmlTypesPath},
package, package,
notUpdatedFileStatusSourceIds, sourceIdsData);
notUpdatedSourceIds);
if (state == FileState::Changed) if (state == FileState::Changed)
package.projectDatas.push_back(std::move(projectData)); package.projectDatas.push_back(std::move(projectData));
@@ -255,34 +235,28 @@ ProjectStorageUpdater::FileState combineState(FileStates... fileStates)
void ProjectStorageUpdater::updateDirectories(const QStringList &directories, void ProjectStorageUpdater::updateDirectories(const QStringList &directories,
Storage::Synchronization::SynchronizationPackage &package, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &notUpdatedFileStatusSourceIds, SourceIdsData &sourceIdsData)
SourceIds &notUpdatedSourceIds,
SourceIds &watchedDirectorySourceIds,
SourceIds &watchedQmldirSourceIds,
SourceIds &watchedQmlSourceIds,
SourceIds &watchedQmltypesSourceIds)
{ {
for (const QString &directory : directories)
updateDirectory({directory}, package, sourceIdsData);
}
for (const QString &directory : directories) { void ProjectStorageUpdater::updateDirectory(const Utils::PathString &directoryPath,
Utils::PathString directoryPath = directory; Storage::Synchronization::SynchronizationPackage &package,
SourcePath qmldirSourcePath{directory + "/qmldir"}; SourceIdsData &sourceIdsData)
{
SourcePath qmldirSourcePath{directoryPath + "/qmldir"};
auto [directoryId, qmlDirSourceId] = m_pathCache.sourceContextAndSourceId(qmldirSourcePath); auto [directoryId, qmlDirSourceId] = m_pathCache.sourceContextAndSourceId(qmldirSourcePath);
SourcePath directorySourcePath{directory + "/."}; SourcePath directorySourcePath{directoryPath + "/."};
auto directorySourceId = m_pathCache.sourceId(directorySourcePath); auto directorySourceId = m_pathCache.sourceId(directorySourcePath);
auto directoryState = fileState(directorySourceId, auto directoryState = fileState(directorySourceId, package, sourceIdsData);
package.fileStatuses,
package.updatedFileStatusSourceIds,
notUpdatedFileStatusSourceIds);
if (directoryState != FileState::NotExists) if (directoryState != FileState::NotExists)
watchedDirectorySourceIds.push_back(directorySourceId); sourceIdsData.watchedDirectorySourceIds.push_back(directorySourceId);
auto qmldirState = fileState(qmlDirSourceId, auto qmldirState = fileState(qmlDirSourceId, package, sourceIdsData);
package.fileStatuses,
package.updatedFileStatusSourceIds,
notUpdatedFileStatusSourceIds);
if (qmldirState != FileState::NotExists) if (qmldirState != FileState::NotExists)
watchedQmldirSourceIds.push_back(qmlDirSourceId); sourceIdsData.watchedQmldirSourceIds.push_back(qmlDirSourceId);
switch (combineState(directoryState, qmldirState)) { switch (combineState(directoryState, qmldirState)) {
case FileState::Changed: { case FileState::Changed: {
@@ -321,29 +295,20 @@ void ProjectStorageUpdater::updateDirectories(const QStringList &directories,
directoryPath, directoryPath,
cppModuleId, cppModuleId,
package, package,
notUpdatedFileStatusSourceIds, sourceIdsData);
notUpdatedSourceIds,
watchedQmltypesSourceIds);
} }
parseQmlComponents( parseQmlComponents(
createComponents(parser.components(), moduleId, pathModuleId, m_fileSystem, directory), createComponents(parser.components(), moduleId, pathModuleId, m_fileSystem, directoryPath),
directorySourceId, directorySourceId,
directoryId, directoryId,
package, package,
notUpdatedFileStatusSourceIds, sourceIdsData,
notUpdatedSourceIds,
watchedQmlSourceIds,
qmldirState); qmldirState);
package.updatedProjectSourceIds.push_back(directorySourceId); package.updatedProjectSourceIds.push_back(directorySourceId);
break; break;
} }
case FileState::NotChanged: { case FileState::NotChanged: {
parseProjectDatas(m_projectStorage.fetchProjectDatas(directorySourceId), parseProjectDatas(m_projectStorage.fetchProjectDatas(directorySourceId), package, sourceIdsData);
package,
notUpdatedFileStatusSourceIds,
notUpdatedSourceIds,
watchedQmlSourceIds,
watchedQmltypesSourceIds);
break; break;
} }
case FileState::NotExists: { case FileState::NotExists: {
@@ -361,10 +326,8 @@ void ProjectStorageUpdater::updateDirectories(const QStringList &directories,
} }
} }
} }
}
void ProjectStorageUpdater::pathsWithIdsChanged([[maybe_unused]] const std::vector<IdPaths> &idPaths) void ProjectStorageUpdater::pathsWithIdsChanged([[maybe_unused]] const std::vector<IdPaths> &) {}
{}
void ProjectStorageUpdater::pathsChanged(const SourceIds &) {} void ProjectStorageUpdater::pathsChanged(const SourceIds &) {}
@@ -375,16 +338,14 @@ void ProjectStorageUpdater::parseTypeInfos(const QStringList &typeInfos,
Utils::SmallStringView directoryPath, Utils::SmallStringView directoryPath,
ModuleId moduleId, ModuleId moduleId,
Storage::Synchronization::SynchronizationPackage &package, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &notUpdatedFileStatusSourceIds, SourceIdsData &sourceIdData)
SourceIds &notUpdatedSourceIds,
SourceIds &watchedQmlSourceIds)
{ {
for (const QString &typeInfo : typeInfos) { for (const QString &typeInfo : typeInfos) {
Utils::PathString qmltypesPath = Utils::PathString::join( Utils::PathString qmltypesPath = Utils::PathString::join(
{directoryPath, "/", Utils::SmallString{typeInfo}}); {directoryPath, "/", Utils::SmallString{typeInfo}});
SourceId sourceId = m_pathCache.sourceId(SourcePathView{qmltypesPath}); SourceId sourceId = m_pathCache.sourceId(SourcePathView{qmltypesPath});
watchedQmlSourceIds.push_back(sourceId); sourceIdData.watchedQmltypesSourceIds.push_back(sourceId);
addDependencies(package.moduleDependencies, addDependencies(package.moduleDependencies,
sourceId, sourceId,
@@ -395,38 +356,27 @@ void ProjectStorageUpdater::parseTypeInfos(const QStringList &typeInfos,
auto projectData = package.projectDatas.emplace_back( auto projectData = package.projectDatas.emplace_back(
directorySourceId, sourceId, moduleId, Storage::Synchronization::FileType::QmlTypes); directorySourceId, sourceId, moduleId, Storage::Synchronization::FileType::QmlTypes);
parseTypeInfo(projectData, parseTypeInfo(projectData, qmltypesPath, package, sourceIdData);
qmltypesPath,
package,
notUpdatedFileStatusSourceIds,
notUpdatedSourceIds);
} }
} }
void ProjectStorageUpdater::parseProjectDatas(const Storage::Synchronization::ProjectDatas &projectDatas, void ProjectStorageUpdater::parseProjectDatas(const Storage::Synchronization::ProjectDatas &projectDatas,
Storage::Synchronization::SynchronizationPackage &package, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &notUpdatedFileStatusSourceIds, SourceIdsData &sourceIdData)
SourceIds &notUpdatedSourceIds,
SourceIds &watchedQmlSourceIds,
SourceIds &watchedQmltypesSourceIds)
{ {
for (const Storage::Synchronization::ProjectData &projectData : projectDatas) { for (const Storage::Synchronization::ProjectData &projectData : projectDatas) {
switch (projectData.fileType) { switch (projectData.fileType) {
case Storage::Synchronization::FileType::QmlTypes: { case Storage::Synchronization::FileType::QmlTypes: {
watchedQmltypesSourceIds.push_back(projectData.sourceId); sourceIdData.watchedQmltypesSourceIds.push_back(projectData.sourceId);
auto qmltypesPath = m_pathCache.sourcePath(projectData.sourceId); auto qmltypesPath = m_pathCache.sourcePath(projectData.sourceId);
parseTypeInfo(projectData, parseTypeInfo(projectData, qmltypesPath, package, sourceIdData);
qmltypesPath,
package,
notUpdatedFileStatusSourceIds,
notUpdatedSourceIds);
break; break;
} }
case Storage::Synchronization::FileType::QmlDocument: { case Storage::Synchronization::FileType::QmlDocument: {
watchedQmlSourceIds.push_back(projectData.sourceId); sourceIdData.watchedQmlSourceIds.push_back(projectData.sourceId);
parseQmlComponent(projectData.sourceId, package, notUpdatedFileStatusSourceIds); parseQmlComponent(projectData.sourceId, package, sourceIdData);
} }
}; };
} }
@@ -435,13 +385,9 @@ void ProjectStorageUpdater::parseProjectDatas(const Storage::Synchronization::Pr
auto ProjectStorageUpdater::parseTypeInfo(const Storage::Synchronization::ProjectData &projectData, auto ProjectStorageUpdater::parseTypeInfo(const Storage::Synchronization::ProjectData &projectData,
Utils::SmallStringView qmltypesPath, Utils::SmallStringView qmltypesPath,
Storage::Synchronization::SynchronizationPackage &package, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &notUpdatedFileStatusSourceIds, SourceIdsData &sourceIdData) -> FileState
SourceIds &notUpdatedSourceIds) -> FileState
{ {
auto state = fileState(projectData.sourceId, auto state = fileState(projectData.sourceId, package, sourceIdData);
package.fileStatuses,
package.updatedFileStatusSourceIds,
notUpdatedFileStatusSourceIds);
switch (state) { switch (state) {
case FileState::Changed: { case FileState::Changed: {
package.updatedSourceIds.push_back(projectData.sourceId); package.updatedSourceIds.push_back(projectData.sourceId);
@@ -451,7 +397,7 @@ auto ProjectStorageUpdater::parseTypeInfo(const Storage::Synchronization::Projec
break; break;
} }
case FileState::NotChanged: { case FileState::NotChanged: {
notUpdatedSourceIds.push_back(projectData.sourceId); sourceIdData.notUpdatedSourceIds.push_back(projectData.sourceId);
break; break;
} }
case FileState::NotExists: case FileState::NotExists:
@@ -467,9 +413,7 @@ void ProjectStorageUpdater::parseQmlComponent(Utils::SmallStringView relativeFil
Storage::Synchronization::ExportedTypes exportedTypes, Storage::Synchronization::ExportedTypes exportedTypes,
SourceId directorySourceId, SourceId directorySourceId,
Storage::Synchronization::SynchronizationPackage &package, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &notUpdatedFileStatusSourceIds, SourceIdsData &sourceIdData,
SourceIds &notUpdatedSourceIds,
SourceIds &watchedQmlSourceIds,
FileState qmldirState) FileState qmldirState)
{ {
if (std::find(relativeFilePath.begin(), relativeFilePath.end(), '+') != relativeFilePath.end()) if (std::find(relativeFilePath.begin(), relativeFilePath.end(), '+') != relativeFilePath.end())
@@ -479,17 +423,14 @@ void ProjectStorageUpdater::parseQmlComponent(Utils::SmallStringView relativeFil
SourceId sourceId = m_pathCache.sourceId(SourcePathView{qmlFilePath}); SourceId sourceId = m_pathCache.sourceId(SourcePathView{qmlFilePath});
Storage::Synchronization::Type type; Storage::Synchronization::Type type;
auto state = fileState(sourceId, auto state = fileState(sourceId, package, sourceIdData);
package.fileStatuses,
package.updatedFileStatusSourceIds,
notUpdatedFileStatusSourceIds);
watchedQmlSourceIds.push_back(sourceId); sourceIdData.watchedQmlSourceIds.push_back(sourceId);
switch (state) { switch (state) {
case FileState::NotChanged: case FileState::NotChanged:
if (qmldirState == FileState::NotExists) { if (qmldirState == FileState::NotExists) {
notUpdatedSourceIds.emplace_back(sourceId); sourceIdData.notUpdatedSourceIds.emplace_back(sourceId);
package.projectDatas.emplace_back(directorySourceId, package.projectDatas.emplace_back(directorySourceId,
sourceId, sourceId,
ModuleId{}, ModuleId{},
@@ -524,12 +465,9 @@ void ProjectStorageUpdater::parseQmlComponent(Utils::SmallStringView relativeFil
void ProjectStorageUpdater::parseQmlComponent(SourceId sourceId, void ProjectStorageUpdater::parseQmlComponent(SourceId sourceId,
Storage::Synchronization::SynchronizationPackage &package, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &notUpdatedFileStatusSourceIds) SourceIdsData &sourceIdData)
{ {
auto state = fileState(sourceId, auto state = fileState(sourceId, package, sourceIdData);
package.fileStatuses,
package.updatedFileStatusSourceIds,
notUpdatedFileStatusSourceIds);
if (state != FileState::Changed) if (state != FileState::Changed)
return; return;
@@ -588,9 +526,7 @@ void ProjectStorageUpdater::parseQmlComponents(Components components,
SourceId directorySourceId, SourceId directorySourceId,
SourceContextId directoryId, SourceContextId directoryId,
Storage::Synchronization::SynchronizationPackage &package, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &notUpdatedFileStatusSourceIds, SourceIdsData &sourceIdsData,
SourceIds &notUpdatedSourceIds,
SourceIds &watchedQmlSourceIds,
FileState qmldirState) FileState qmldirState)
{ {
std::sort(components.begin(), components.end(), [](auto &&first, auto &&second) { std::sort(components.begin(), components.end(), [](auto &&first, auto &&second) {
@@ -607,36 +543,34 @@ void ProjectStorageUpdater::parseQmlComponents(Components components,
createExportedTypes(componentsWithSameFileName), createExportedTypes(componentsWithSameFileName),
directorySourceId, directorySourceId,
package, package,
notUpdatedFileStatusSourceIds, sourceIdsData,
notUpdatedSourceIds,
watchedQmlSourceIds,
qmldirState); qmldirState);
}; };
rangeForTheSameFileName(components, callback); rangeForTheSameFileName(components, callback);
} }
ProjectStorageUpdater::FileState ProjectStorageUpdater::fileState(SourceId sourceId, ProjectStorageUpdater::FileState ProjectStorageUpdater::fileState(
FileStatuses &fileStatuses, SourceId sourceId,
SourceIds &updatedSourceIds, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &notUpdatedSourceIds) const SourceIdsData &sourceIdData) const
{ {
auto currentFileStatus = m_fileStatusCache.find(sourceId); auto currentFileStatus = m_fileStatusCache.find(sourceId);
if (!currentFileStatus.isValid()) { if (!currentFileStatus.isValid()) {
updatedSourceIds.push_back(sourceId); package.updatedFileStatusSourceIds.push_back(sourceId);
return FileState::NotExists; return FileState::NotExists;
} }
auto projectStorageFileStatus = m_projectStorage.fetchFileStatus(sourceId); auto projectStorageFileStatus = m_projectStorage.fetchFileStatus(sourceId);
if (!projectStorageFileStatus.isValid() || projectStorageFileStatus != currentFileStatus) { if (!projectStorageFileStatus.isValid() || projectStorageFileStatus != currentFileStatus) {
fileStatuses.push_back(currentFileStatus); package.fileStatuses.push_back(currentFileStatus);
updatedSourceIds.push_back(sourceId); package.updatedFileStatusSourceIds.push_back(sourceId);
return FileState::Changed; return FileState::Changed;
} }
notUpdatedSourceIds.push_back(sourceId); sourceIdData.notUpdatedFileStatusSourceIds.push_back(sourceId);
return FileState::NotChanged; return FileState::NotChanged;
} }

View File

@@ -97,19 +97,37 @@ public:
}; };
private: private:
struct SourceIdsData
{
SourceIdsData(std::size_t reserve)
{
notUpdatedFileStatusSourceIds.reserve(reserve * 30);
notUpdatedSourceIds.reserve(reserve * 30);
watchedDirectorySourceIds.reserve(reserve);
watchedQmldirSourceIds.reserve(reserve);
watchedQmlSourceIds.reserve(reserve * 30);
watchedQmltypesSourceIds.reserve(reserve * 30);
}
SourceIds notUpdatedFileStatusSourceIds;
SourceIds notUpdatedSourceIds;
SourceIds watchedDirectorySourceIds;
SourceIds watchedQmldirSourceIds;
SourceIds watchedQmlSourceIds;
SourceIds watchedQmltypesSourceIds;
};
void updateQmlTypes(const QStringList &qmlTypesPaths, void updateQmlTypes(const QStringList &qmlTypesPaths,
Storage::Synchronization::SynchronizationPackage &package, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &notUpdatedFileStatusSourceIds, SourceIdsData &sourceIdData);
SourceIds &notUpdatedSourceIds,
SourceIds &watchedQmltypesSourceIds);
void updateDirectories(const QStringList &directories, void updateDirectories(const QStringList &directories,
Storage::Synchronization::SynchronizationPackage &package, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &notUpdatedFileStatusSourceIds, SourceIdsData &sourceIdData);
SourceIds &notUpdatedSourceIds,
SourceIds &watchedDirectorySourceIds, void updateDirectory(const Utils::PathString &directory,
SourceIds &watchedQmldirSourceIds, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &watchedQmlSourceIds, SourceIdsData &sourceIdData);
SourceIds &watchedQmltypesSourceIds);
void parseTypeInfos(const QStringList &typeInfos, void parseTypeInfos(const QStringList &typeInfos,
const QList<QmlDirParser::Import> &qmldirDependencies, const QList<QmlDirParser::Import> &qmldirDependencies,
@@ -118,45 +136,34 @@ private:
Utils::SmallStringView directoryPath, Utils::SmallStringView directoryPath,
ModuleId moduleId, ModuleId moduleId,
Storage::Synchronization::SynchronizationPackage &package, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &notUpdatedFileStatusSourceIds, SourceIdsData &sourceIdData);
SourceIds &notUpdatedSourceIds,
SourceIds &watchedQmlSourceIds);
void parseProjectDatas(const Storage::Synchronization::ProjectDatas &projectDatas, void parseProjectDatas(const Storage::Synchronization::ProjectDatas &projectDatas,
Storage::Synchronization::SynchronizationPackage &package, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &notUpdatedFileStatusSourceIds, SourceIdsData &sourceIdData);
SourceIds &notUpdatedSourceIds,
SourceIds &watchedQmlSourceIds,
SourceIds &watchedQmltypesSourceIds);
FileState parseTypeInfo(const Storage::Synchronization::ProjectData &projectData, FileState parseTypeInfo(const Storage::Synchronization::ProjectData &projectData,
Utils::SmallStringView qmltypesPath, Utils::SmallStringView qmltypesPath,
Storage::Synchronization::SynchronizationPackage &package, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &notUpdatedFileStatusSourceIds, SourceIdsData &sourceIdData);
SourceIds &notUpdatedSourceIds);
void parseQmlComponents(Components components, void parseQmlComponents(Components components,
SourceId directorySourceId, SourceId directorySourceId,
SourceContextId directoryId, SourceContextId directoryId,
Storage::Synchronization::SynchronizationPackage &package, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &notUpdatedFileStatusSourceIds, SourceIdsData &sourceIdData,
SourceIds &notUpdatedSourceIds,
SourceIds &watchedQmlSourceIds,
FileState qmldirState); FileState qmldirState);
void parseQmlComponent(Utils::SmallStringView fileName, void parseQmlComponent(Utils::SmallStringView fileName,
Utils::SmallStringView directory, Utils::SmallStringView directory,
Storage::Synchronization::ExportedTypes exportedTypes, Storage::Synchronization::ExportedTypes exportedTypes,
SourceId directorySourceId, SourceId directorySourceId,
Storage::Synchronization::SynchronizationPackage &package, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &notUpdatedFileStatusSourceIds, SourceIdsData &sourceIdData,
SourceIds &notUpdatedSourceIds,
SourceIds &watchedQmlSourceIds,
FileState qmldirState); FileState qmldirState);
void parseQmlComponent(SourceId sourceId, void parseQmlComponent(SourceId sourceId,
Storage::Synchronization::SynchronizationPackage &package, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &notUpdatedFileStatusSourceIds); SourceIdsData &sourceIdData);
FileState fileState(SourceId sourceId, FileState fileState(SourceId sourceId,
FileStatuses &fileStatuses, Storage::Synchronization::SynchronizationPackage &package,
SourceIds &updatedSourceIds, SourceIdsData &sourceIdData) const;
SourceIds &notUpdatedSourceIds) const;
private: private:
FileSystemInterface &m_fileSystem; FileSystemInterface &m_fileSystem;