Commit Graph

7 Commits

Author SHA1 Message Date
Sona Kurazyan 2c9c1590e6 Replace uses of deprecated _qs with _s/QStringLiteral
Task-number: QTBUG-101408
Change-Id: Ic925751b73f52d8fa5add5cacc52d6dd6ea2dc27
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-04-29 09:47:43 +02:00
Maximilian Goldstein 7dd6fbb51a QmlLintQuickPlugin: Remove redundant anchors null warning
Previously we warned when an anchor was null again after already
displaying a generic warning about a type mismatch. This is redundant,
so let's stick with the generic one.

Change-Id: I8f43d279b712d728dc154f48286b8d5c0dac9976
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-04-28 15:55:03 +02:00
Maximilian Goldstein 3265013769 QmlLintQuickPlugin: Warn about attached types used in wrong elements
The engine will warn when various attached types are used in elements
where they are not supported.

This patch replicates this behavior in qmllint with the exception that
we cannot handle them being used in bindings right now.

Task-number: QTBUG-102277
Task-number: QTBUG-102859
Change-Id: Ic41c9338d8625c5185dbd658cc8987f3c00f18c3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2022-04-27 15:29:24 +02:00
Maximilian Goldstein 4b3e99b9a2 QmlLintQuickPlugin: Warn about disallowed positioning properties
When using Grid and Flow, children are not supposed to use anchors or
the x and y property. The same applies to the children of Layouts which
in addition should not set width or height.

This change adds the warnings when these properties are set improperly.

It also adds tests for the existing warning about the children
of Layout not being allowed to use anchors.

Task-number: QTBUG-102277
Task-number: QTBUG-102859
Change-Id: I83c553569cdba90c8841802090d4ef534583ecb8
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2022-04-27 15:29:24 +02:00
Maximilian Goldstein 6186dab608 QmlLintQuickPlugin: Warn about invalid anchors combinations
Includes more anchors related warnings that get usually get
shown at runtime.

Task-number: QTBUG-96737
Change-Id: I2a72d7fc9b23072f85d20fff558e39311e749e4c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-26 12:36:58 +02:00
Maximilian Goldstein 894b8a605e qmllint/Quick: Warn about customizing native QtQuick.Controls styles
Certain properties in native QtQuick.Controls styles may not be
overridden. This patch adds a pass to the Quick qmllint plugin to warn
when a user modifies them.

The pass also uses the fact that these types (except Control) don't
inherit from each other to skip over checking for additional types
once a matching type is found.

Fixes: QTBUG-96737
Task-number: QTBUG-102277
Change-Id: I02f696aae716de45014736651385b6607eed6d15
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-21 21:04:01 +02:00
Maximilian Goldstein 324b625f9f Turn the QtQuick qmllint plugin into a proper shared library
Previously it was just a static library that we linked qmllint against
now it's properly installed in the qmllint plugins folder and can be
utilized in the language server as well.

Fixes: QTBUG-102278
Change-Id: I4aec42d1e2ba113237ee5ba148085e69b7251506
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-04-11 14:12:09 +02:00