qmllint: Fix false unknown grouped property warning
We seem to be checking grouped properties twice by endVisit(UiObjectBinding*) and endVisit(UiObjectDefinition*). So the UiObjectBinding variant is removed here as this gets run before all type information is available. Change-Id: Idfe23869792f787df6109cde3b6bc1d96cce3dc3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
parent
25f765cbd9
commit
4660f51f25
|
@ -0,0 +1,7 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Rectangle {
|
||||
border.width: 1
|
||||
|
||||
gradient: Gradient {}
|
||||
}
|
|
@ -360,6 +360,7 @@ void TestQmllint::cleanQmlCode_data()
|
|||
QTest::newRow("overridescript") << QStringLiteral("overridescript.qml");
|
||||
QTest::newRow("multiExtension") << QStringLiteral("multiExtension.qml");
|
||||
QTest::newRow("segFault") << QStringLiteral("SegFault.qml");
|
||||
QTest::newRow("grouped scope failure") << QStringLiteral("groupedScope.qml");
|
||||
}
|
||||
|
||||
void TestQmllint::cleanQmlCode()
|
||||
|
|
|
@ -404,14 +404,6 @@ bool FindWarningVisitor::visit(QQmlJS::AST::UiObjectBinding *uiob)
|
|||
return true;
|
||||
}
|
||||
|
||||
void FindWarningVisitor::endVisit(QQmlJS::AST::UiObjectBinding *uiob)
|
||||
{
|
||||
QQmlJSImportVisitor::endVisit(uiob);
|
||||
|
||||
if (m_warnUnqualified)
|
||||
checkGroupedScopes(m_currentScope);
|
||||
}
|
||||
|
||||
bool FindWarningVisitor::visit(QQmlJS::AST::UiObjectDefinition *uiod)
|
||||
{
|
||||
using namespace QQmlJS::AST;
|
||||
|
|
|
@ -109,7 +109,6 @@ private:
|
|||
/* --- end block handling --- */
|
||||
|
||||
bool visit(QQmlJS::AST::UiObjectBinding *uiob) override;
|
||||
void endVisit(QQmlJS::AST::UiObjectBinding *uiob) override;
|
||||
bool visit(QQmlJS::AST::UiObjectDefinition *uiod) override;
|
||||
void endVisit(QQmlJS::AST::UiObjectDefinition *) override;
|
||||
bool visit(QQmlJS::AST::UiScriptBinding *uisb) override;
|
||||
|
|
Loading…
Reference in New Issue