From 8592b5cb60f7ec9909e698545959c0e214fc5480 Mon Sep 17 00:00:00 2001 From: Sami Shalayel Date: Thu, 20 Mar 2025 10:11:28 +0100 Subject: [PATCH] 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 Reviewed-by: David Schulz --- src/plugins/qmljstools/qmljsmodelmanager.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp index f10c2b0c671..15d6481c845 100644 --- a/src/plugins/qmljstools/qmljsmodelmanager.cpp +++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp @@ -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) {