summaryrefslogtreecommitdiff
path: root/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@qt.io>2022-11-09 12:51:00 +0100
committerTim Jenssen <tim.jenssen@qt.io>2022-11-09 16:41:12 +0100
commitf8c99ebd9afc59cef8b4606b9c1c6e2ceca99d32 (patch)
treeac9298fe25fce620007d34d45bc63c8da49f8ebd /src/libs/qmljs/qmljsmodelmanagerinterface.cpp
parentac526d326cab6f19955cec4e19c73bc309bd96c8 (diff)
parentb038ea3a40845443e570ca26ac8e0a6449e1f0bd (diff)
downloadqt-creator-f8c99ebd9afc59cef8b4606b9c1c6e2ceca99d32.tar.gz
Merge remote-tracking branch 'origin/9.0' into qds/dev
Change-Id: I02fd6f492c27d85b88af7ec8bc18ff62f2c6ed14
Diffstat (limited to 'src/libs/qmljs/qmljsmodelmanagerinterface.cpp')
-rw-r--r--src/libs/qmljs/qmljsmodelmanagerinterface.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
index 8826da30c7..70eebf6faf 100644
--- a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
+++ b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
@@ -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();
}