diff options
Diffstat (limited to 'src/qmlcompiler/qqmljsimportvisitor.cpp')
-rw-r--r-- | src/qmlcompiler/qqmljsimportvisitor.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/qmlcompiler/qqmljsimportvisitor.cpp b/src/qmlcompiler/qqmljsimportvisitor.cpp index 6ac9a73a61..7af1cff209 100644 --- a/src/qmlcompiler/qqmljsimportvisitor.cpp +++ b/src/qmlcompiler/qqmljsimportvisitor.cpp @@ -603,7 +603,7 @@ void QQmlJSImportVisitor::processDefaultProperties() QQmlJSScope::ConstPtr parentScope = it.key(); // We can't expect custom parser default properties to be sensible, discard them for now. - if (parentScope->isInCustomParserParent()) + if (checkCustomParser(parentScope)) continue; /* consider: @@ -1071,7 +1071,7 @@ void QQmlJSImportVisitor::processPropertyBindings() // These warnings do not apply for custom parsers and their children and need to be // handled on a case by case basis - if (scope->isInCustomParserParent()) + if (checkCustomParser(scope)) continue; // TODO: Can this be in a better suited category? @@ -1273,7 +1273,7 @@ void QQmlJSImportVisitor::addDefaultProperties() m_pendingDefaultProperties[m_currentScope->parentScope()] << m_currentScope; - if (parentScope->isInCustomParserParent()) + if (checkCustomParser(parentScope)) return; /* consider: @@ -1370,7 +1370,7 @@ void QQmlJSImportVisitor::checkGroupedAndAttachedScopes(QQmlJSScope::ConstPtr sc { // These warnings do not apply for custom parsers and their children and need to be handled on a // case by case basis - if (scope->isInCustomParserParent()) + if (checkCustomParser(scope)) return; auto children = scope->childScopes(); @@ -1396,6 +1396,11 @@ void QQmlJSImportVisitor::checkGroupedAndAttachedScopes(QQmlJSScope::ConstPtr sc } } +bool QQmlJSImportVisitor::checkCustomParser(const QQmlJSScope::ConstPtr &scope) +{ + return scope->isInCustomParserParent(); +} + void QQmlJSImportVisitor::flushPendingSignalParameters() { const QQmlJSMetaSignalHandler handler = m_signalHandlers[m_pendingSignalHandler]; @@ -2390,7 +2395,7 @@ void QQmlJSImportVisitor::endVisit(UiArrayBinding *arrayBinding) const auto propertyName = getScopeName(m_currentScope, QQmlSA::ScopeType::QMLScope); leaveEnvironment(); - if (m_currentScope->isInCustomParserParent()) { + if (checkCustomParser(m_currentScope)) { // These warnings do not apply for custom parsers and their children and need to be handled // on a case by case basis return; @@ -2951,7 +2956,7 @@ void QQmlJSImportVisitor::endVisit(QQmlJS::AST::UiObjectBinding *uiob) } } - if (m_currentScope->isInCustomParserParent()) { + if (checkCustomParser(m_currentScope)) { // These warnings do not apply for custom parsers and their children and need to be handled // on a case by case basis } else { |