diff options
-rw-r--r-- | tests/auto/qml/qmllint/data/groupedScope.qml | 7 | ||||
-rw-r--r-- | tests/auto/qml/qmllint/tst_qmllint.cpp | 1 | ||||
-rw-r--r-- | tools/qmllint/findwarnings.cpp | 8 | ||||
-rw-r--r-- | tools/qmllint/findwarnings.h | 1 |
4 files changed, 8 insertions, 9 deletions
diff --git a/tests/auto/qml/qmllint/data/groupedScope.qml b/tests/auto/qml/qmllint/data/groupedScope.qml new file mode 100644 index 0000000000..40f9b41be8 --- /dev/null +++ b/tests/auto/qml/qmllint/data/groupedScope.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +Rectangle { + border.width: 1 + + gradient: Gradient {} +} diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp index fe6996d6d9..14d1515722 100644 --- a/tests/auto/qml/qmllint/tst_qmllint.cpp +++ b/tests/auto/qml/qmllint/tst_qmllint.cpp @@ -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() diff --git a/tools/qmllint/findwarnings.cpp b/tools/qmllint/findwarnings.cpp index 17e73c770c..110f6d4627 100644 --- a/tools/qmllint/findwarnings.cpp +++ b/tools/qmllint/findwarnings.cpp @@ -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; diff --git a/tools/qmllint/findwarnings.h b/tools/qmllint/findwarnings.h index 96cd0c3897..138f83098d 100644 --- a/tools/qmllint/findwarnings.h +++ b/tools/qmllint/findwarnings.h @@ -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; |