make resource file handling able to deal with QMakeProject's VFS

resources.prf may create virtual qrc files when RESOURCES contains
non-qrc files.

Change-Id: If591de9b32b775059d67e94bc3cb06d23ee44b08
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Oswald Buddenhagen
2016-10-24 19:30:24 +02:00
parent 1589ce3ce8
commit 424639ecac
16 changed files with 150 additions and 77 deletions

View File

@@ -566,8 +566,9 @@ void ModelManagerInterface::updateProjectInfo(const ProjectInfo &pinfo, ProjectE
updateSourceFiles(newFiles, false);
// update qrc cache
m_qrcContents = pinfo.resourceFileContents;
foreach (const QString &newQrc, pinfo.allResourceFiles)
m_qrcCache.addPath(newQrc);
m_qrcCache.addPath(newQrc, m_qrcContents.value(newQrc));
foreach (const QString &oldQrc, oldInfo.allResourceFiles)
m_qrcCache.removePath(oldQrc);
@@ -656,7 +657,7 @@ void ModelManagerInterface::emitDocumentChangedOnDisk(Document::Ptr doc)
void ModelManagerInterface::updateQrcFile(const QString &path)
{
m_qrcCache.updatePath(path);
m_qrcCache.updatePath(path, m_qrcContents.value(path));
}
void ModelManagerInterface::updateDocument(Document::Ptr doc)