Merge remote-tracking branch 'origin/9.0' into qds/dev

Change-Id: I02fd6f492c27d85b88af7ec8bc18ff62f2c6ed14
This commit is contained in:
Tim Jenssen
2022-11-09 12:51:00 +01:00
149 changed files with 89684 additions and 74780 deletions

View File

@@ -449,15 +449,13 @@ bool pInfoLessThanImports(const ModelManagerInterface::ProjectInfo &p1,
}
static QList<Utils::FilePath> generatedQrc(QList<Utils::FilePath> applicationDirectories)
static QSet<Utils::FilePath> generatedQrc(
const QList<ModelManagerInterface::ProjectInfo> &projectInfos)
{
QList<Utils::FilePath> res;
for (const Utils::FilePath &path : applicationDirectories) {
Utils::FilePath generatedQrcDir = path.pathAppended(".rcc");
if (generatedQrcDir.isReadableDir()) {
for (const Utils::FilePath & qrcPath: generatedQrcDir.dirEntries(FileFilter(QStringList({QStringLiteral(u"*.qrc")}), QDir::Files)))
res.append(qrcPath.canonicalPath());
}
QSet<Utils::FilePath> res;
for (const auto &pInfo : projectInfos) {
for (const auto &generatedQrcFile: pInfo.generatedQrcFiles)
res.insert(generatedQrcFile);
}
return res;
}
@@ -484,7 +482,7 @@ void ModelManagerInterface::iterateQrcFiles(
qrcFilePaths = pInfo.activeResourceFiles;
else
qrcFilePaths = pInfo.allResourceFiles;
for (const Utils::FilePath &p : generatedQrc(pInfo.applicationDirectories))
for (const Utils::FilePath &p : generatedQrc({pInfo}))
qrcFilePaths.append(p);
for (const Utils::FilePath &qrcFilePath : std::as_const(qrcFilePaths)) {
if (pathsChecked.contains(qrcFilePath))
@@ -607,7 +605,7 @@ void ModelManagerInterface::updateProjectInfo(const ProjectInfo &pinfo, ProjectE
m_qrcContents = pinfo.resourceFileContents;
for (const Utils::FilePath &newQrc : std::as_const(pinfo.allResourceFiles))
m_qrcCache.addPath(newQrc.toString(), m_qrcContents.value(newQrc));
for (const Utils::FilePath &newQrc : generatedQrc(pinfo.applicationDirectories))
for (const Utils::FilePath &newQrc : pinfo.generatedQrcFiles)
m_qrcCache.addPath(newQrc.toString(), m_qrcContents.value(newQrc));
for (const Utils::FilePath &oldQrc : std::as_const(oldInfo.allResourceFiles))
m_qrcCache.removePath(oldQrc.toString());
@@ -1312,7 +1310,7 @@ void ModelManagerInterface::updateImportPaths()
allImportPaths.maybeInsert(path, Dialect::Qml);
findNewQmlApplicationInPath(path, snapshot, this, &newLibraries);
}
for (const Utils::FilePath &qrcPath : generatedQrc(allApplicationDirectories))
for (const Utils::FilePath &qrcPath : generatedQrc(m_projects.values()))
updateQrcFile(qrcPath);
updateSourceFiles(importedFiles, true);
@@ -1644,8 +1642,10 @@ ModelManagerInterface::ProjectInfo ModelManagerInterface::defaultProjectInfo() c
}
ModelManagerInterface::ProjectInfo ModelManagerInterface::defaultProjectInfoForProject(
ProjectExplorer::Project *) const
ProjectExplorer::Project *project, const FilePaths &hiddenRccFolders) const
{
Q_UNUSED(project);
Q_UNUSED(hiddenRccFolders);
return ModelManagerInterface::ProjectInfo();
}