diff --git a/src/qml/doc/qtqml.qdocconf b/src/qml/doc/qtqml.qdocconf index 65d9eab076..e5d661b410 100644 --- a/src/qml/doc/qtqml.qdocconf +++ b/src/qml/doc/qtqml.qdocconf @@ -80,3 +80,5 @@ spurious += "C\\+\\+ class .*\\\\instantiates .*" # Enforce zero documentation warnings warninglimit = 0 + +macro.qmllintwarningcategory = "This warning category is spelled \c{[\1]} by qmllint." diff --git a/src/qml/doc/src/qmllint/alias-cycle.qdoc b/src/qml/doc/src/qmllint/alias-cycle.qdoc index 561cedf416..5dee379e76 100644 --- a/src/qml/doc/src/qmllint/alias-cycle.qdoc +++ b/src/qml/doc/src/qmllint/alias-cycle.qdoc @@ -5,10 +5,12 @@ \page qmllint-warnings-and-errors-alias-cycle.html \ingroup qmllint-warnings-and-errors -\title Alias Cycle +\title Alias cycle \brief Alias property is part of an alias cycle. -\section1 Alias Property Is Part Of An Alias Cycle +\qmllintwarningcategory alias-cycle + +\section1 Alias property is part of an alias cycle \section2 What happened? A \l{QML Object Attributes#property-aliases}{property alias} resolves to itself or to another @@ -38,7 +40,7 @@ Item { property alias indirect: someId.cycle // not ok: referring to alias indirectly referring to itself } \endqml -You can fix this warning by breaking up the alias cycles: +To fix this warning, break up the alias cycles: \qml import QtQuick diff --git a/src/qml/doc/src/qmllint/attached-property-reuse.qdoc b/src/qml/doc/src/qmllint/attached-property-reuse.qdoc index 8e73a5c2f7..f3c2f64bce 100644 --- a/src/qml/doc/src/qmllint/attached-property-reuse.qdoc +++ b/src/qml/doc/src/qmllint/attached-property-reuse.qdoc @@ -8,6 +8,8 @@ \title Attached property reuse \brief Attached type was initialized multiple times. +\qmllintwarningcategory attached-property-reuse + \section1 Using attached type already initialized in a parent scope \section2 What happened? diff --git a/src/qml/doc/src/qmllint/deprecated.qdoc b/src/qml/doc/src/qmllint/deprecated.qdoc index 311796871a..0568e8bcd4 100644 --- a/src/qml/doc/src/qmllint/deprecated.qdoc +++ b/src/qml/doc/src/qmllint/deprecated.qdoc @@ -8,7 +8,9 @@ \title Deprecated \brief A deprecated property or type was used. -\section1 Deprecated Binding or Type +\qmllintwarningcategory deprecated + +\section1 Deprecated binding or type \section2 What happened? A deprecated type was instantiated, a deprecated property was used or a deprecated method was diff --git a/src/qml/doc/src/qmllint/duplicate-property-binding.qdoc b/src/qml/doc/src/qmllint/duplicate-property-binding.qdoc index 4826a552ea..9a5ba801ad 100644 --- a/src/qml/doc/src/qmllint/duplicate-property-binding.qdoc +++ b/src/qml/doc/src/qmllint/duplicate-property-binding.qdoc @@ -5,17 +5,12 @@ \page qmllint-warnings-and-errors-duplicate-property-binding.html \ingroup qmllint-warnings-and-errors -\title Duplicate Bindings +\title Duplicate bindings \brief A property was bound multiple times. -This warning category has multiple warnings: -\list - \li \l{Duplicate Interceptor On Property} - \li \l{Cannot Combine Value Source And Binding} - \li \l{Duplicate Value Source On Property} -\endlist +\qmllintwarningcategory duplicate-property-binding -\section1 Duplicate Interceptor On Property +\section1 Duplicate interceptor on property \section2 What happened? One property has multiple \l{Property Modifier Types}{interceptors}. @@ -38,7 +33,7 @@ Rectangle { } } \endqml -You can fix this warning by removing all but one \l{Behavior}: +To fix this warning, remove all but one \l{Behavior}: \qml import QtQuick @@ -51,7 +46,7 @@ Rectangle { \b {See also} \l {Property Modifier Types}. -\section1 Duplicate Value Source On Property +\section1 Duplicate value source on property \section2 What happened? One property has multiple \l{Property Value Sources}{value sources}. @@ -75,7 +70,7 @@ Rectangle { If you check the output of that program, you will see that the two NumberAnimation will interleave each other, which is probably not the effect that was intended. -You can fix this warning by removing all but one \l{NumberAnimation}: +To fix this warning, remove all but one \l{NumberAnimation}: \qml import QtQuick @@ -85,7 +80,7 @@ Rectangle { \endqml -\section1 Cannot Combine Value Source And Binding +\section1 Cannot combine value source and binding \section2 What happened? One property has a \l{Property Value Sources}{value source} and a binding on the same property. diff --git a/src/qml/doc/src/qmllint/duplicated-name.qdoc b/src/qml/doc/src/qmllint/duplicated-name.qdoc index 0cc4583cb4..0f3f1a6826 100644 --- a/src/qml/doc/src/qmllint/duplicated-name.qdoc +++ b/src/qml/doc/src/qmllint/duplicated-name.qdoc @@ -5,14 +5,10 @@ \page qmllint-warnings-and-errors-duplicated-name.html \ingroup qmllint-warnings-and-errors -\title Duplicated Name +\title Duplicated name \brief Multiple signals or properties share the same name in the same Component. -This warning category has multiple warnings: -\list - \li \l{Duplicated Property Name} - \li \l{Duplicated Signal Name} -\endlist +\qmllintwarningcategory duplicated-name \section1 Duplicated Property Name @@ -31,7 +27,7 @@ Item { property int helloWorld } \endqml -You can fix this warning by removing the duplicate property or renaming it: +To fix this warning, remove the duplicate property or rename it: \qml import QtQuick @@ -40,7 +36,7 @@ Item { } \endqml -\section1 Duplicated Signal Name +\section1 Duplicated signal mame \section2 What happened? Multiple signals in the same QML component scope have the same name. @@ -57,7 +53,7 @@ Rectangle { signal helloWorld } \endqml -You can fix this warning by removing the duplicate signal or renaming it: +To fix this warning, remove the duplicate signal or rename it: \qml import QtQuick diff --git a/src/qml/doc/src/qmllint/import.qdoc b/src/qml/doc/src/qmllint/import.qdoc index c5adababc4..850bceeb63 100644 --- a/src/qml/doc/src/qmllint/import.qdoc +++ b/src/qml/doc/src/qmllint/import.qdoc @@ -5,18 +5,12 @@ \page qmllint-warnings-and-errors-import.html \ingroup qmllint-warnings-and-errors -\title Warnings Occurred While Importing +\title Warnings occurred while importing \brief The imported module was not found. -This warning category contains multiple warnings: -\list -\li \l{Failed To Import Module} -\li \l{Component Was Not Found} -\li \l{Import Qualifier Must Start With A Capital Letter} -\li \l{Unknown Import Syntax} -\endlist +\qmllintwarningcategory import -\section1 Failed To Import Module +\section1 Failed to import module \section2 What happened? The module imported via \l{Import Statements}{import statement} was not found. @@ -41,7 +35,7 @@ import QtQuicky // not ok: typo in module name Item { } \endqml -You can fix this warning by correcting the typo: +To fix this warning, correct the typo: \qml import QtQuick // ok: no typo in module name @@ -49,7 +43,7 @@ Item { } \endqml -\section3 User-Defined Module That Was Not Built +\section3 User-defined module that was not built Some tooling like \l{\QMLLS Reference}{\QMLLS} or \l{qmllint Reference}{qmllint} can't find user-defined modules when they @@ -61,20 +55,20 @@ instructions in \l{Setting up the \QMLLS in Your Editor}{\QMLLS setup instructions} and make sure that you communicate the correct build folder to \QMLLS. -\section3 Wrong Import Path +\section3 Wrong import path Please refer to \l{Import Statements#qml-import-path}{the QML import path documentation} and to \l{Debugging QML Applications#debugging-module-imports}{the debugging module import documentation} for more information about import paths. -\section3 Missing Module +\section3 Missing module If the previous sections did not help to find the imported module, it might be missing. This might be caused by a missing dependency. When using external libraries, verify that they are actually installed, and that their modules end up in an \l{Import Statements#qml-import-path}{import path}. -\section1 Component Was Not Found +\section1 Component was not found \section2 What happened? Some component was not found. @@ -84,7 +78,7 @@ The application can't run because it can't instantiate the non-found component. \section2 Examples -\section3 Typo In The Component Name +\section3 Typo in the component name \qml import QtQuick @@ -92,7 +86,7 @@ Item { Itemy {} // not ok: typo in name } \endqml -You can fix this warning by correcting the typo: +To fix this warning, correct the typo: \qml import QtQuick @@ -101,14 +95,14 @@ Item { } \endqml -\section3 Missing Import Statement +\section3 Missing import statement \qml Item { // not ok: must be imported from QtQuick first } \endqml -You can fix this warning by adding the missing module import: +To fix this warning, add the missing module import: \qml import QtQuick @@ -116,7 +110,7 @@ Item { // ok: was imported from QtQuick } \endqml -\section1 Import Qualifier must start with a capital letter +\section1 Import qualifier must start with a capital letter \section2 What happened? Some imported module has an invalid qualifier. @@ -132,7 +126,7 @@ import QtQuick as qq qq.Item { } \endqml -You can fix this warning by making the import qualifier start with an upper case letter: +To fix this warning, make the import qualifier start with an upper case letter: \qml import QtQuick as Qq @@ -140,7 +134,7 @@ Qq.Item { } \endqml -\section1 Unknown Import Syntax +\section1 Unknown import syntax \section2 What happened? An import statement is using an invalid \l{Import Statements}{import syntax}. @@ -157,7 +151,7 @@ import QtQuick Item { } \endqml -You can fix this warning by using URLs that have an allowed scheme: +To fix this warning, use URLs that have an allowed scheme: \qml import "qrc:/path/to/Module" import QtQuick diff --git a/src/qml/doc/src/qmllint/inheritance-cycle.qdoc b/src/qml/doc/src/qmllint/inheritance-cycle.qdoc index c1be63ae78..a615a4c4c9 100644 --- a/src/qml/doc/src/qmllint/inheritance-cycle.qdoc +++ b/src/qml/doc/src/qmllint/inheritance-cycle.qdoc @@ -5,10 +5,12 @@ \page qmllint-warnings-and-errors-inheritance-cycle.html \ingroup qmllint-warnings-and-errors -\title Inheritance Cycle +\title Inheritance cycle \brief A component inherits from itself. -\section1 Component Is Part Of An Inheritance Cycle +\qmllintwarningcategory inheritance-cycle + +\section1 Component is part of an inheritance cycle \section2 What happened? A component inherited directly or indirectly from itself. @@ -32,7 +34,7 @@ Item { component C2: C{} } \endqml -You can fix this warning by breaking up the inheritance cycle +To fix this warning, break up the inheritance cycle: \qml import QtQuick diff --git a/src/qml/doc/src/qmllint/invalid-lint-directive.qdoc b/src/qml/doc/src/qmllint/invalid-lint-directive.qdoc index fdfb1e80a6..582c24ac00 100644 --- a/src/qml/doc/src/qmllint/invalid-lint-directive.qdoc +++ b/src/qml/doc/src/qmllint/invalid-lint-directive.qdoc @@ -8,6 +8,8 @@ \title Invalid qmllint directives \brief Invalid qmllint comments. +\qmllintwarningcategory invalid-lint-directive + \section1 Invalid qmllint directive provided \section2 What happened? diff --git a/src/qml/doc/src/qmllint/missing-enum-entry.qdoc b/src/qml/doc/src/qmllint/missing-enum-entry.qdoc index b537ae94d7..ccaaeafcf6 100644 --- a/src/qml/doc/src/qmllint/missing-enum-entry.qdoc +++ b/src/qml/doc/src/qmllint/missing-enum-entry.qdoc @@ -8,6 +8,8 @@ \title Missing enum entry \brief Enum value is missing from its declaration. +\qmllintwarningcategory missing-enum-entry + \section1 Is not an entry of enum \section2 What happened? diff --git a/src/qml/doc/src/qmllint/missing-property.qdoc b/src/qml/doc/src/qmllint/missing-property.qdoc index eed4676fb2..e31450e61e 100644 --- a/src/qml/doc/src/qmllint/missing-property.qdoc +++ b/src/qml/doc/src/qmllint/missing-property.qdoc @@ -8,12 +8,7 @@ \title Missing property \brief Binding a value to a non-existing property. -This category has multiple warnings: -\list -\li \l{Can't assign to non-existent default property} -\li \l{Property does not exist} -\li \l{Member not found on type} -\endlist +\qmllintwarningcategory missing-property \section1 Can't assign to non-existent default property diff --git a/src/qml/doc/src/qmllint/missing-type.qdoc b/src/qml/doc/src/qmllint/missing-type.qdoc index 466370ef39..edee109a92 100644 --- a/src/qml/doc/src/qmllint/missing-type.qdoc +++ b/src/qml/doc/src/qmllint/missing-type.qdoc @@ -5,16 +5,12 @@ \page qmllint-warnings-and-errors-missing-type.html \ingroup qmllint-warnings-and-errors -\title Missing Type +\title Missing type \brief A type used in a binding or alias was not found. -This warning category has multiple warnings: -\list - \li \l{Cannot Deduce Type of Alias} - \li \l{No Type Found For Property} -\endlist +\qmllintwarningcategory missing-type -\section1 Cannot Deduce Type of Alias +\section1 Cannot deduce type of alias \section2 What happened? An alias property points to a property with a C++ type whose QML counterpart was not found. This can @@ -108,7 +104,7 @@ in your QML file. This is because the same type can be exposed multiple times wi attributes in different modules: \c{mymodule} actually has to be precise about the QML type of \c{myProperty}. -You can fix this warning by adding the dependency in the \c{CMakeLists.txt}: +To fix this warning, add the dependency in the \c{CMakeLists.txt}: \badcode qt_add_qml_module(mymodule URI mymodule @@ -123,7 +119,7 @@ Now, the warning should be gone! \b {See also} \l {Declaring module dependencies}. -\section1 No Type Found For Property +\section1 No type found for property \section2 What happened? A binding was set on a property whose QML type was not found. This can be caused by a QML module @@ -222,7 +218,7 @@ The reason for the warning message is that in the QML code, the type \c{QQuickIt and its QML counterpart \c{Item} are not known: the dependency 'QtQuick' of mymodule was not declared in the \c{CMakeLists.txt}. -You can fix this warning by adding the dependency in the \c{CMakeLists.txt}: +To fix this warning, add the dependency in the \c{CMakeLists.txt}: \badcode qt_add_qml_module(mymodule URI mymodule diff --git a/src/qml/doc/src/qmllint/multiline-strings.qdoc b/src/qml/doc/src/qmllint/multiline-strings.qdoc index 073653df4d..37db09e919 100644 --- a/src/qml/doc/src/qmllint/multiline-strings.qdoc +++ b/src/qml/doc/src/qmllint/multiline-strings.qdoc @@ -8,6 +8,8 @@ \title Multiline strings \brief A string is spanning over multiple lines. +\qmllintwarningcategory multiline-strings + \section1 String contains unescaped line terminator, which is deprecated \section2 What happened? diff --git a/src/qml/doc/src/qmllint/non-list-property.qdoc b/src/qml/doc/src/qmllint/non-list-property.qdoc index 2d778d87bc..84942830f5 100644 --- a/src/qml/doc/src/qmllint/non-list-property.qdoc +++ b/src/qml/doc/src/qmllint/non-list-property.qdoc @@ -5,10 +5,12 @@ \page qmllint-warnings-and-errors-non-list-property.html \ingroup qmllint-warnings-and-errors -\title Non-List Property +\title Non-list property \brief Multiple values were assigned to a non-list property. -\section1 Cannot Assign Multiple Objects To A Default Non-List Property +\qmllintwarningcategory non-list-property + +\section1 Cannot assign multiple objects to a default non-list property \section2 What happened? A \l{Default Properties}{default property} has multiple bindings but the default @@ -43,7 +45,7 @@ Item { } \endqml -You can fix this warning by replacing the default property by a list: +To fix this warning, replace the default property by a list: \qml import QtQuick @@ -61,7 +63,7 @@ Item { } } \endqml -You can also fix this warning by removing all the unwanted bindings, in case the default property +To fix this warning, remove all the unwanted bindings in case the default property is not supposed to be a list: \qml import QtQuick diff --git a/src/qml/doc/src/qmllint/read-only-property.qdoc b/src/qml/doc/src/qmllint/read-only-property.qdoc index 7bc6b5fcc2..c90f7d1fc3 100644 --- a/src/qml/doc/src/qmllint/read-only-property.qdoc +++ b/src/qml/doc/src/qmllint/read-only-property.qdoc @@ -5,10 +5,12 @@ \page qmllint-warnings-and-errors-read-only-property.html \ingroup qmllint-warnings-and-errors -\title Readonly Property +\title Readonly property \brief A readonly property was written. -\section1 Cannot Assign To Read-Only Property +\qmllintwarningcategory read-only-property + +\section1 Cannot assign to read-only property \section2 What happened? A \l{Read-Only Properties}{read-only property} was written. @@ -29,10 +31,9 @@ Item { } } \endqml -You can fix this warning by removing the write to the read-only property, by writing to another -non-read-only property, or by removing the readonly modifier if the property should no longer be -considered constant. - +To fix this warning, remove the write to the read-only property, write to another +non-read-only property, or remove the readonly modifier if you are the author of +the property definition. \sa{Read-Only Properties} */ diff --git a/src/qml/doc/src/qmllint/recursion-depth-errors.qdoc b/src/qml/doc/src/qmllint/recursion-depth-errors.qdoc index ed0d2c09b2..65cf1b1fd0 100644 --- a/src/qml/doc/src/qmllint/recursion-depth-errors.qdoc +++ b/src/qml/doc/src/qmllint/recursion-depth-errors.qdoc @@ -5,10 +5,12 @@ \page qmllint-warnings-and-errors-recursion-depth-errors.html \ingroup qmllint-warnings-and-errors -\title Recursion Depths Errors +\title Recursion depths errors \brief Qml statement or expression is too deeply nested. -\section1 Maximum Statement Or Expression Depth Exceeded +\qmllintwarningcategory recursion-depth-errors + +\section1 Maximum statement or expression depth exceeded \section2 What happened? A QML statement or expression was too deeply nested for the compiler. This usually only happens for generated code where statements or expressions can be very long, as the recursion limit is usually @@ -31,9 +33,9 @@ Item { } \endqml -You can fix this warning by auto-generating smaller code pieces. You could split deeply nested -Components in multiple files or inline components, or split deeply nested expressions into multiple -expressions: +To fix this warning, auto-generate smaller code pieces. Split deeply nested +Components in multiple files or inline components, or split deeply nested +expressions into multiple expressions: \qml import QtQuick diff --git a/src/qml/doc/src/qmllint/required.qdoc b/src/qml/doc/src/qmllint/required.qdoc index 6252ddef2d..7b3e066c5f 100644 --- a/src/qml/doc/src/qmllint/required.qdoc +++ b/src/qml/doc/src/qmllint/required.qdoc @@ -5,10 +5,12 @@ \page qmllint-warnings-and-errors-required.html \ingroup qmllint-warnings-and-errors -\title Component is Missing a Required Property +\title Component is missing a required property \brief A component's required property was not bound. -\section1 Component is Missing a Required Property +\qmllintwarningcategory required + +\section1 Component is missing a required property \section2 What happened? The \l{QML Object Attributes#required-properties}{required property} of a component was not set. @@ -37,7 +39,7 @@ Item { } } \endqml -You can fix this warning by setting the required properties +To fix this warning, set the required properties: \qml import QtQuick diff --git a/src/qml/doc/src/qmllint/restricted-type.qdoc b/src/qml/doc/src/qmllint/restricted-type.qdoc index 5445a7302a..7fd6068958 100644 --- a/src/qml/doc/src/qmllint/restricted-type.qdoc +++ b/src/qml/doc/src/qmllint/restricted-type.qdoc @@ -8,6 +8,8 @@ \title Restricted type \brief A restricted type was accessed. +\qmllintwarningcategory restricted-type + \section1 You can't access an unscoped enum from here \section2 What happened? diff --git a/src/qml/doc/src/qmllint/signal-handler-parameters.qdoc b/src/qml/doc/src/qmllint/signal-handler-parameters.qdoc index ff8c836a99..b3f2534aa4 100644 --- a/src/qml/doc/src/qmllint/signal-handler-parameters.qdoc +++ b/src/qml/doc/src/qmllint/signal-handler-parameters.qdoc @@ -5,12 +5,14 @@ \page qmllint-warnings-and-errors-signal-handler-parameters.html \ingroup qmllint-warnings-and-errors -\title Signal Handler Parameters +\title Signal handler parameters \brief The signal handler does not satisfy the signal types. +\qmllintwarningcategory signal-handler-parameters + This warning category has multiple warnings, described in the sections below: -\section1 Type Of Parameter In Signal Was Not Found +\section1 Type of parameter in signal was not found \section2 What happened? A signal handler tried to handle a signal with parameters of unknown QML types. @@ -115,7 +117,7 @@ Now, the QML code should be fine again! \omit TODO: QML Lint cannot detect if you pass signal parameters by value, reference or pointer! Therefore, it will never print that warning. -\section1 Type Of Parameter In Signal Should Be Passed By Pointer +\section1 Type of parameter in signal should be passed by pointer \section2 What happened? TODO @@ -132,7 +134,7 @@ You can fix this warning by TODO TODO: QML Lint cannot detect if you pass signal parameters by value, reference or pointer! Therefore, it will never print that warning. that warning -\section1 Type Of Parameter In Signal Should Be Passed By Value Or Const Reference +\section1 Type of parameter in signal should be passed by value or const reference \section2 What happened? TODO @@ -148,7 +150,7 @@ You can fix this warning by TODO \endomit -\section1 Signal Handler Has More Formal Parameters Than The Signal It Handles +\section1 Signal handler has more formal parameters than the signal it handles \section2 What happened? A signal handler expects more parameters than what the signal will actually provide. @@ -165,7 +167,8 @@ Item { onHelloWorld: function (x,y,z) {} // not ok: signal handler handles three parameters } \endqml -You can fix this warning by removing the extra parameters of the signal handler: +To fix this warning, remove the extra parameters of the signal handler or +add the missing parameters to the signal's declaration: \qml import QtQuick @@ -173,21 +176,14 @@ Item { signal helloWorld(x: QtObject) // signal expects only one parameter onHelloWorld: function (x) {} // ok: signal handler handles one parameter + + signal alternativeHelloWorld(x: QtObject, y: int, y: int) // signal expects three parameters + + onAlternativeHelloWorld: function (x,y,z) {} // ok: signal handler handles three parameters } \endqml -It can also be fixed by adding the missing parameters to the signal's declaration: -\qml -import QtQuick - -Item { - signal helloWorld(x: QtObject, y: int, y: int) // signal expects three parameters - - onHelloWorld: function (x,y,z) {} // ok: signal handler handles three parameters -} -\endqml - -\section1 The Signal Has A Parameter Of The Same Name +\section1 The signal has a parameter of the same name \section2 What happened? The signal or signal handler might have swapped some of its arguments, or some arguments might be missing. @@ -207,7 +203,7 @@ Item { } \endqml -You can fix this warning by adding the missing parameters: +To fix this warning, add the missing parameters or rename the first parameter: \qml import QtQuick @@ -215,20 +211,14 @@ Item { signal helloWorld(x: QtObject, y: int) onHelloWorld: function (x, y) {} // ok: parameters have the same order as in helloWorld -} -\endqml -or by renaming the first parameter: -\qml -import QtQuick -Item { - signal helloWorld(x: QtObject, y: int) + signal alternativeHelloWorld(x: QtObject, y: int) - onHelloWorld: function (x) {} // ok: parameters have the same order as in helloWorld, even if y is missing + onAlternativeHelloWorld: function (x) {} // ok: parameters have the same order as in helloWorld, even if y is missing } \endqml -\section3 Swapped Arguments +\section3 Swapped arguments \qml import QtQuick @@ -239,7 +229,7 @@ Item { } \endqml -You can fix this warning by reordering the parameters in the correct order +To fix this warning, reorder the parameters in the correct order: \qml import QtQuick diff --git a/src/qml/doc/src/qmllint/syntax.duplicate-ids.qdoc b/src/qml/doc/src/qmllint/syntax.duplicate-ids.qdoc index 48194997fc..b08df9742d 100644 --- a/src/qml/doc/src/qmllint/syntax.duplicate-ids.qdoc +++ b/src/qml/doc/src/qmllint/syntax.duplicate-ids.qdoc @@ -8,6 +8,8 @@ \title Duplicate id \brief An id is not unique. +\qmllintwarningcategory syntax.duplicate-ids + \section1 Found a duplicated id \section2 What happened? diff --git a/src/qml/doc/src/qmllint/syntax.id-quotation.qdoc b/src/qml/doc/src/qmllint/syntax.id-quotation.qdoc index ee56a3da63..d3484e0649 100644 --- a/src/qml/doc/src/qmllint/syntax.id-quotation.qdoc +++ b/src/qml/doc/src/qmllint/syntax.id-quotation.qdoc @@ -8,6 +8,8 @@ \title Id quotation \brief Id has quotation marks. +\qmllintwarningcategory syntax.id-quotation + \section1 Ids do not need quotation marks \section2 What happened? diff --git a/src/qml/doc/src/qmllint/syntax.qdoc b/src/qml/doc/src/qmllint/syntax.qdoc index 3fb9f6839a..974f6215cd 100644 --- a/src/qml/doc/src/qmllint/syntax.qdoc +++ b/src/qml/doc/src/qmllint/syntax.qdoc @@ -8,18 +8,7 @@ \title Syntax \brief Various syntactic errors. -This warning category has multiple warnings: -\list - \li \l{Nested inline components are not supported} - \li \l{Inline component declaration must be followed by a typename} - \li \l{Invalid alias expression: an initializer is needed} - \li \l{Invalid alias expression: only ids and field member expressions can be aliased} - \li \l{Id must be followed by an identifier} - \li \l{Failed to parse id} - \li \l{Declaring an object which is not a QML object as a list member} - \li \l{Enums declared inside of inline components are ignored} - \li \l{Unknown argument to pragma} -\endlist +\qmllintwarningcategory syntax \section1 Nested inline components are not supported diff --git a/src/qml/doc/src/qmllint/top-level-component.qdoc b/src/qml/doc/src/qmllint/top-level-component.qdoc index 328d7edf94..52fc3cc1c3 100644 --- a/src/qml/doc/src/qmllint/top-level-component.qdoc +++ b/src/qml/doc/src/qmllint/top-level-component.qdoc @@ -8,6 +8,8 @@ \title Top level component \brief Root QML type is a component +\qmllintwarningcategory top-level-component + \section1 QML top level type can't be \e Component \section2 What happened? diff --git a/src/qml/doc/src/qmllint/uncreatable-type.qdoc b/src/qml/doc/src/qmllint/uncreatable-type.qdoc index b1da2cb9d9..b2ef11b033 100644 --- a/src/qml/doc/src/qmllint/uncreatable-type.qdoc +++ b/src/qml/doc/src/qmllint/uncreatable-type.qdoc @@ -8,13 +8,7 @@ \title Uncreatable type \brief Types that can't be created. -This warning category has multiple warnings: -\list - \li \l{Namespace must start with an upper case letter} - \li \l{Singleton type is not creatable} - \li \l{Type is not creatable} -\endlist - +\qmllintwarningcategory uncreatable-type \section1 Namespace must start with an upper case letter diff --git a/src/qml/doc/src/qmllint/unqualified.qdoc b/src/qml/doc/src/qmllint/unqualified.qdoc index 61a0a7ac81..74728fd34b 100644 --- a/src/qml/doc/src/qmllint/unqualified.qdoc +++ b/src/qml/doc/src/qmllint/unqualified.qdoc @@ -8,6 +8,8 @@ \title Unqualified \brief Accessing an outer scope without its id. +\qmllintwarningcategory unqualified + \section1 Unqualified access \section2 What happened? diff --git a/src/qml/doc/src/qmllint/unresolved-alias.qdoc b/src/qml/doc/src/qmllint/unresolved-alias.qdoc index 63b02613dd..4498e6ad2b 100644 --- a/src/qml/doc/src/qmllint/unresolved-alias.qdoc +++ b/src/qml/doc/src/qmllint/unresolved-alias.qdoc @@ -5,10 +5,12 @@ \page qmllint-warnings-and-errors-unresolved-alias.html \ingroup qmllint-warnings-and-errors -\title Unresolved Alias +\title Unresolved alias \brief Property of property alias was not found. -\section1 Unresolved Alias +\qmllintwarningcategory unresolved-alias + +\section1 Unresolved alias \section2 What happened? A property alias should hold a reference to another property, see also @@ -33,7 +35,7 @@ Item { } \endqml -You can fix this warning by making sure that the id and the properties of the alias property +To fix this warning, make sure that the id and the property of the alias property really do exist: \qml import QtQuick diff --git a/src/qml/doc/src/qmllint/unresolved-type.qdoc b/src/qml/doc/src/qmllint/unresolved-type.qdoc index b5c55e3a0f..2da0441d0f 100644 --- a/src/qml/doc/src/qmllint/unresolved-type.qdoc +++ b/src/qml/doc/src/qmllint/unresolved-type.qdoc @@ -22,11 +22,7 @@ This category contains following warnings: These warnings usually indicate missing imports or faulty QML modules, depending on whether you are using or writing a QML module. -This page is split in two parts: -\list - \li \l{For QML module users} - \li \l{For QML module authors} -\endlist +\qmllintwarningcategory unresolved-type \section1 For QML module users diff --git a/src/qml/doc/src/qmllint/unused-imports.qdoc b/src/qml/doc/src/qmllint/unused-imports.qdoc index 18ffc894d6..ee01318819 100644 --- a/src/qml/doc/src/qmllint/unused-imports.qdoc +++ b/src/qml/doc/src/qmllint/unused-imports.qdoc @@ -8,6 +8,8 @@ \title Unused imports \brief Types of the imported module were not used. +\qmllintwarningcategory unused-imports + \section1 Unused import \section2 What happened? diff --git a/src/qml/doc/src/qmllint/use-proper-function.qdoc b/src/qml/doc/src/qmllint/use-proper-function.qdoc index f1bc644b61..5028612afc 100644 --- a/src/qml/doc/src/qmllint/use-proper-function.qdoc +++ b/src/qml/doc/src/qmllint/use-proper-function.qdoc @@ -8,15 +8,7 @@ \title Use proper function \brief Calling something that might not be a function. -This warning category has multiple warnings: -\list - \li \l{Property is a variant property: It may or may not be a method} - \li \l{Property is a QJSValue property: It may or may not be a method} - \li \l{Signal is shadowed by a property} - \li \l{Method is shadowed by a property} - \li \l{Slot is shadowed by a property} - \li \l{Property is not a method} -\endlist +\qmllintwarningcategory use-proper-function \section1 Property is a variant property: It may or may not be a method diff --git a/src/qml/doc/src/qmllint/var-used-before-declaration.qdoc b/src/qml/doc/src/qmllint/var-used-before-declaration.qdoc index de506fd007..9bb76e8771 100644 --- a/src/qml/doc/src/qmllint/var-used-before-declaration.qdoc +++ b/src/qml/doc/src/qmllint/var-used-before-declaration.qdoc @@ -8,6 +8,8 @@ \title Var used before declaration \brief A JavaScript variable was used before its declaration. +\qmllintwarningcategory var-used-before-declaration + \section1 Variable is used here before its declaration \section2 What happened? diff --git a/src/qml/doc/src/qmllint/with.qdoc b/src/qml/doc/src/qmllint/with.qdoc index bfdde2e86b..8e3fb5089b 100644 --- a/src/qml/doc/src/qmllint/with.qdoc +++ b/src/qml/doc/src/qmllint/with.qdoc @@ -5,10 +5,12 @@ \page qmllint-warnings-and-errors-with.html \ingroup qmllint-warnings-and-errors -\title With Statements +\title With \brief With statements are strongly discouraged in QML. -\section1 With Statements +\qmllintwarningcategory with + +\section1 With statements \section2 What happened? The JavaScript \c{with} statement was used. @@ -30,8 +32,7 @@ Item { } } \endqml -You can fix this warning by replacing the \c{with} statement with a destructuring property, -for example: +To fix this warning, replace the \c{with} statement with a destructuring property: \qml import QtQuick