dev-qt/qtdeclarative: backport fix for qmlcachegen crashes

Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
Ionen Wolkens 2025-06-13 09:20:39 -04:00
parent 925a05683d
commit 91ab37ab13
No known key found for this signature in database
GPG Key ID: B24406B0B0AC4334
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,32 @@
https://bugreports.qt.io/browse/QTBUG-136998
https://bugreports.qt.io/browse/QTBUG-137196
https://bugreports.qt.io/browse/QTBUG-137411
https://github.com/qt/qtdeclarative/commit/672e6777e8e6a8fd86c7877075e7a8aa0ea0a31a
--- a/src/qmlcompiler/qqmljsimportvisitor.cpp
+++ b/src/qmlcompiler/qqmljsimportvisitor.cpp
@@ -1042,14 +1042,15 @@
if (!prevRequiredScope.isNull()) {
- auto sourceScope = prevRequiredScope->baseType();
- suggestion = QQmlJSFixSuggestion{
- "%1:%2:%3: Property marked as required in %4."_L1
- .arg(sourceScope->filePath())
- .arg(sourceScope->sourceLocation().startLine)
- .arg(sourceScope->sourceLocation().startColumn)
- .arg(requiredScopeName),
- sourceScope->sourceLocation()
- };
- suggestion->setFilename(sourceScope->filePath());
+ if (auto sourceScope = prevRequiredScope->baseType()) {
+ suggestion = QQmlJSFixSuggestion{
+ "%1:%2:%3: Property marked as required in %4."_L1
+ .arg(sourceScope->filePath())
+ .arg(sourceScope->sourceLocation().startLine)
+ .arg(sourceScope->sourceLocation().startColumn)
+ .arg(requiredScopeName),
+ sourceScope->sourceLocation()
+ };
+ suggestion->setFilename(sourceScope->filePath());
+ }
} else {
message += " (marked as required by %1)"_L1.arg(requiredScopeName);

View File

@ -34,6 +34,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-6.9.1-QTBUG-135158.patch
"${FILESDIR}"/${PN}-6.9.1-qmlcachegen-crash.patch
)
src_configure() {