aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljsutils.cpp
diff options
context:
space:
mode:
authorSami Shalayel <sami.shalayel@qt.io>2025-11-24 16:25:41 +0100
committerSami Shalayel <sami.shalayel@qt.io>2025-12-05 19:36:07 +0100
commitf9fd4939c407ecd640b6c5fa7ae9828ed4311e80 (patch)
treee91e4d182ebf86ebd82aec71e9f83a5397fdd719 /src/qmlcompiler/qqmljsutils.cpp
parent8c93c5ee591a4bdb8edcb9350fe996fa481e112f (diff)
qmlls: read resource files from .qmlls.build.ini files
We can't find resource files by iterating on the build folder without causing QTBUG-141707, therefore implement reading resource files from the .qmlls.build.ini files. A later commit will make CMake add the resource file information in the generated .qmlls.build.ini files. A separate commit will take care of usages of resourceFilesFromBuildFolders() in the dom. Keep a fallback for projects without resource files, for example projects targeting qt < 6.11. Task-number: QTBUG-141707 Change-Id: I279d193aa6a2849526c2f56c6a40e83492050f74 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljsutils.cpp')
-rw-r--r--src/qmlcompiler/qqmljsutils.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qmlcompiler/qqmljsutils.cpp b/src/qmlcompiler/qqmljsutils.cpp
index 09a13d4792..c4d67f91ee 100644
--- a/src/qmlcompiler/qqmljsutils.cpp
+++ b/src/qmlcompiler/qqmljsutils.cpp
@@ -249,6 +249,12 @@ bool canCompareWithQUrl(
return lhsType == typeResolver->urlType() && rhsType == typeResolver->urlType();
}
+/*!
+ \internal
+
+ Utility method that searches qrc files in given folders. Do not use this when the order or
+ selection of the returned qrc files matters.
+*/
QStringList QQmlJSUtils::resourceFilesFromBuildFolders(const QStringList &buildFolders)
{
QStringList result;