forked from qt-creator/qt-creator
qqmljs: adapt paths to .qrc files
The .qrc files have changed their locations in the build folder and introduced a regression in the embedded code model. Make the algorithm searching for .qrc files more relaxed such that it can find them again. This fixes the embedded code model going to the build folder file instead of the source folder file. Fixes: QTCREATORBUG-32652 Change-Id: I42f86ecd7416c615629d45b3bf7bd2c89b1247dd Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -85,18 +85,16 @@ static void findAllQrcFiles(const FilePath &filePath, FilePaths &out)
|
||||
out.append(path.canonicalPath());
|
||||
return IterationPolicy::Continue;
|
||||
},
|
||||
{{"*.qrc"}, QDir::Files});
|
||||
{{"*.qrc"}, QDir::Files | QDir::Hidden, QDirIterator::Subdirectories});
|
||||
}
|
||||
|
||||
static FilePaths findGeneratedQrcFiles(const ModelManagerInterface::ProjectInfo &pInfo,
|
||||
const FilePaths &hiddenRccFolders)
|
||||
{
|
||||
FilePaths result;
|
||||
// Search in Application Directories for directories named ".rcc"
|
||||
// and add all .qrc files in there to the resource file list.
|
||||
// Search recursively in Application Directories for .qrc files.
|
||||
for (const Utils::FilePath &path : pInfo.applicationDirectories) {
|
||||
Utils::FilePath generatedQrcDir = path.pathAppended(".rcc");
|
||||
findAllQrcFiles(generatedQrcDir, result);
|
||||
findAllQrcFiles(path, result);
|
||||
}
|
||||
|
||||
for (const Utils::FilePath &hiddenRccFolder : hiddenRccFolders) {
|
||||
|
Reference in New Issue
Block a user