forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user