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,6 +566,11 @@ void QmakeProject::updateQmlJSCodeModel()
QmlJS::Dialect::Qml);
projectInfo.activeResourceFiles.append(node->variableValue(ExactResourceVar));
projectInfo.allResourceFiles.append(node->variableValue(ResourceVar));
foreach (const QString &rc, projectInfo.allResourceFiles) {
QString contents;
if (m_qmakeVfs->readVirtualFile(rc, &contents))
projectInfo.resourceFileContents[rc] = contents;
}
if (!hasQmlLib) {
QStringList qtLibs = node->variableValue(QtVar);
hasQmlLib = qtLibs.contains(QLatin1String("declarative")) ||