Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qdoc-warnings.qdoc
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5 \page qdoc-warnings.html
6 \previouspage Categories of Documentation
7
8 \title Troubleshooting QDoc Warnings
9
10 QDoc may issue warnings when generating your documentation set.
11 This section describes what these warnings mean and how to resolve
12 them. This document does not describe warnings generated by Clang.
13
14 \section1 All properties in a group must belong to the same type: <name>
15
16 When documenting QML property groups, all properties listed in
17 the comment block must belong to the same QML type.
18
19 \section1 Already generated <file> for this project
20
21 While generating the documentation for a project, QDoc keeps track of the
22 file names of the files it has generated. QDoc will issue a warning when it
23 opens a file for writing if that file is known to have been generated
24 previously, in the current execution. This can happen if a \qdoccmd page
25 command uses the same name as \qdoccmd group, for example.
26
27 You can set the environment variable \c QDOC_ALL_OVERWRITES_ARE_WARNINGS to
28 unconditionally warn about all such events. This may be useful when tracking
29 down the offending definitions.
30
31 \section1 \\brief statement does not end with a full stop
32
33 The argument to the \\brief command is a sentence, summarizing
34 the topic documented, so should end in a full stop. It should
35 also be brief.
36
37 \section1 Can't link to <target>
38
39 QDoc issues this warning when one part of the documentation
40 (identified in the warning message) tries to refer to another,
41 but doesn't correctly specify that other, the target of the link.
42 This may arise because the reference to it is mistyped or because
43 the target has changed name (for a function or type) or title
44 (for another section).
45
46 This can have a variety of causes:
47
48 \list
49 \li The link target has not been defined with a QDoc topic command,
50 e.g. {title-command}{\\title} <target>.
51 \li The <target> contains a typo.
52 \li The document that contains that link target did not get compiled.
53 \li The document that contains that link target is in a module that is
54 not in the compilation path.
55 \li The link target is in another module, and a dependency to that
56 module was not set in the configuration or QDoc failed to locate
57 the index file for the dependency.
58 \endlist
59
60 Search the source code for that particular link target. If you get no
61 results, gradually make the search less specific until you find a match.
62
63 If the link target looks like the name of a type or function,
64 this could also be due to:
65
66 \list
67 \li The name (or, for functions, where specified, signature) used
68 where it is documented not matching the name used in its
69 declaration.
70 \li The link target being marked as \l {internal-command}{\\internal} when the linking
71 text was not.
72 \endlist
73
74 \section1 Cannot find base function for <method> in <class>
75
76 QDoc produces this warning if \\reimp is used to document a method,
77 as an override of a virtual method, when no base class has a virtual
78 method with the given name and signature. This may happen because
79 the method it was written to override has changed its signature, or is
80 no longer virtual.
81
82 \section1 Cannot find <name> specified with \<command> in any header file
83
84 This means that QDoc cannot find a declaration of <name> in any
85 header file, but has found a comment that claims to document it.
86
87 An example:
88 \badcode
89 Cannot find 'Color::Red' specified with '\enum' in any header file.
90 \endcode
91
92 A documentation comment claims to describe an enum, but QDoc didn't
93 find a definition of that enum in a header file.
94
95 This may also be due to:
96
97 \list
98 \li a typo in <name> or <command>
99 \li a missing namespace-or-class prefix
100 \li <name> having moved to another namespace or class
101 \endlist
102
103 \section1 Cannot find project file for example <name>
104
105 In the example's source directory, QDoc expects to find a project
106 file named \c{CMakeLists.txt}, or a file with a \c{.pro}, \c{.qmlproject}, or
107 \c{.pyproject} extension where the base name matches that of the example
108 directory. For example, \c {examples/mymodule/helloworld/helloworld.pro}.
109
110 \section1 Cannot find snippets file to quote from
111
112 QDoc issues this warning if it is unable to find the file named
113 after a \l {snippet-command}{\\snippet} or \l {quotefromfile-command}{\\quotefromfile} command.
114
115 Some useful steps for correcting this:
116
117 \list
118 \li Check if the snippet file name is correct. QDoc appends the
119 snippet file name to each of the directories given in the
120 search path, to get a path-name for a candidate file to look
121 for. It produces this error when none of these candidates exist.
122 \li Check the search path for snippets, given by the \c exampledirs
123 configuration variable in the \c{*.qdocconf} file. You may need
124 to add an entry to this path, or correct an existing entry.
125 \li Check if the snippet file exists, or if it has been moved, renamed
126 or removed, which may happen when there are changes to the source
127 code that QDoc tries to quote from.
128 \endlist
129
130 \section1 Cannot find qdoc include file <filename>
131
132 QDoc failed to find an include file named in a command.
133 QDoc searches each directory named in the search path.
134 If there is no file with this name in any of those directories,
135 or the file found in that search is not readable, QDoc issues
136 this warning. Check that the combination of search path and
137 <filename> is correctly spelled, and that you have read permissions
138 for the file.
139
140 \note <filename> may include a directory name prefix; the whole
141 <filename> is appended to each directory in the search path.
142
143 \sa {Cannot open file to quote from: <filename>}
144
145 \section1 Cannot find <tag> in <file>
146
147 This means QDoc cannot find the identifier <id> in the
148 \l{include-command}{\\include} <file> or {snippet-command}{\\snippet} <file>.
149
150 \section1 Cannot locate index file for dependency <depend>
151
152 Example:
153
154 \badcode
155 "QMake" Cannot locate index file for dependency "activeqt"
156 \endcode
157
158 The documentation project QMake could not locate activeqt.index
159 in any of the specified index directories. In this case, the
160 specified index directories are specified in qmake.qdocconf.
161
162 \section1 Cannot nest <command> commands
163
164 This warning concerns formatting commands: bold, italic,
165 index, link, span, subscript, superscript, teletype, uicontrol,
166 underline. A formatting command cannot be used within the text
167 it applies to. An example of this:
168
169 \badcode
170 There is \b{no \b{super-}bold}.
171 \encode
172
173 \section1 Can't use <inner> in <outer>
174
175 This warning is issued for commands that cannot be nested.
176
177 Example:
178 \badcode
179 \list
180 \li \table
181 \row \li Hello \li Hi
182 \endtable
183 \endlist
184 \endcode
185
186 Results in the QDoc warning "Can't use '\\table' in '\\list'".
187
188 \section1 Cannot open file to quote from: <filename>
189
190 The search path for <filename> is defined by the following
191 variables in the \c{.qdocconf} file: \c{sources}, \c{sourcedirs},
192 and \c{exampledirs}.
193
194 QDoc failed to find a file named in a command (such as
195 \l {quotefromfile-command}{\\quotefromfile},
196 \l {snippet-command}{\\snippet}, \l {include-command}{\\include})
197 that tells it to retrieve content from the named file. It searches
198 each directory named in the search path. If there is no file with
199 this name in any of those directories, or the file is found but not
200 readable, QDoc issues this warning. Check that the combination of
201 search path and <filename> is correctly spelled, and that you have
202 read permissions for the file.
203
204 \note <filename> may include a directory name prefix; the whole
205 <filename> is appended to each directory in the search path.
206
207 \sa {Cannot find qdoc include file <filename>}
208
209 \section1 Cannot tie this documentation to anything
210
211 QDoc found a \beginqdoc ... \endqdoc comment, with no \l{Topic Commands}{topic command}, and
212 could not associate the declaration or definition immediately following the
213 comment with a documented entity. This can happen if there's no declaration
214 or definition following the comment, or if the entity isn't visible to QDoc,
215 such as when the declaration is behind a preprocessor conditional that QDoc
216 doesn't evaluate.
217
218 \section1 <class> tries to inherit itself
219
220 The \l {inherits-command}{\\inherits} command is used to document that a QMl type
221 inherits some other QML type. This warning is issued if that other
222 QML type is the same as the QML type documented.
223
224 Example:
225
226 \badcode
227 \qmltype Foo
228 \inherits Foo
229 \endcode
230
231 \section1 Command <command> failed at end of file <filename>
232
233 Example:
234
235 \badcode
236 Command "\snippet (//! [2]) failed at end of file qmlbars/qml/qmlbars/main.qml".
237 \endcode
238
239 In this case the warning means that the \l {snippet-command}{\\snippet} command did not find a second
240 label "\/\/! [2]" to mark the end of the snippet. It could also mean that it didn't
241 find any occurrence of that snippet tag in this snippet file.
242
243 Another example:
244
245 \badcode
246 Command '\skipto' failed at end of file 'styling/CMakeLists.txt".
247 \endcode
248
249 The \l {skipto-command}{\\skipto} + <pattern> moves the cursor to the next line containing
250 that pattern. If \\skipto doesn't find it, QDoc issues this warning.
251
252 \section1 Command <command> not allowed with QML property commands
253
254 Example:
255
256 \badcode
257 \qmlproperty real QtQuick.Controls::RangeSlider::first.value
258 \qmlproperty real QtQuick.Controls::RangeSlider::first.position
259 \qmlproperty real QtQuick.Controls::RangeSlider::first.visualPosition
260 \qmlsignal void QtQuick.Controls::RangeSlider::first.moved()
261 \qmlsignal void QtQuick.Controls::RangeSlider::second.moved()
262 \endcode
263
264 Error message:
265
266 \badcode
267 Command '\\qmlsignal' not allowed with QML property commands
268 \endcode
269
270 This warning is specific to property group documentation. QDoc
271 allows multiple qmlproperty or qmlattachedproperty topic commands
272 in a single documentation comment to document a property group
273 where the last element in the path is <group>.<property>. Any other topic
274 commands triggers this warning.
275
276 \section1 Could not resolve QML import statement for type <name>
277
278 QDoc issues this warning if you document a QML type, but omit
279 the \l{inqmlmodule-command}{\\inqmlmodule} command.
280 Example:
281
282 \badcode
283 Could not resolve QML import statement for type 'ItemSelectionModel'
284 \encode
285
286 Incorrect:
287 \badcode
288 \qmltype ItemSelectionModel
289 \nativetype QItemSelectionModel
290 \since 5.5
291 \ingroup qtquick-models
292 \endcode
293 Correct:
294 \badcode
295 \qmltype ItemSelectionModel
296 \nativetype QItemSelectionModel
297 \inqmlmodule QtQml.Models
298 \since 5.5
299 \ingroup qtquick-models
300 \endcode
301
302 \section1 Cyclic type inheritance: <type>
303
304 Cyclic or circular inheritance occurs when a QML type inherits from a base
305 type that itself inherits from the original type. This can occur between
306 two mutually inheriting types, or there may be intermediate types between
307 them.
308
309 This warning indicates where a cycle in the inheritance hierarchy has been
310 detected. You should examine the \l {inherits-command}{\\inherits} command
311 for the type and follow the trail of base types until one is found that
312 inherits from a type that you have previously encountered. You should then
313 break the cycle by fixing the incorrect \l {inherits-command}{\\inherits}
314 command for one of the identified types.
315
316 \section1 Dependent modules specified, but no index directories were set.
317
318 QDoc expected to see one or more --indexdir arguments on the command line.
319 Without them, QDoc cannot locate the index files of any dependencies
320 defined with the 'depends' configuration variable.
321
322 \section1 Documentation configuration for <project> doesn't define a help project (qhp)
323
324 A valid Qt help configuration was expected but not provided in the project's
325 .qdocconf file.
326
327 See also \l{Creating Help Project Files} and \l {qhp-variable}{qhp}.
328
329 \section1 Duplicate target name <target>
330
331 This warning is issued if you define two targets with the same parameter,
332 using either the \l {target-command}{\\target} or the \l {keyword-command}
333 {\\keyword} command. The target name given as parameter to these commands
334 must be unique. The warning is followed by "The previous occurrence is
335 here: [location]", where location contains a file name and line number.
336
337 \section1 Empty qdoc snippet <tag> in <file>
338
339 The snippet <tag> was found in the \l {snippet-command}{\\snippet} <file>, but it is empty.
340
341 \section1 Failed to find function when parsing \\fn <signature>
342
343 When Clang parses a function signature following an \qdoccmd fn command,
344 it checks this against the declaration in the header file. If Clang
345 discovers discrepancies, it issues this warning message.
346
347 The signature must be fully qualified. Typical issues include missing or
348 incorrect template arguments, return type, or qualifiers such as
349 \e const.
350
351 \note A \e {hidden friend} can be documented using either the
352 class-qualified syntax or the unqualified free function
353 syntax with its return type.
354
355 \section1 Failed to find qhp.<project>.subprojects.<subproject>.indexTitle
356
357 QDoc failed to find a title for a page designated as the index page
358 for <subproject> in the Qt help project configuration.
359
360 Subproject index titles must be local to the current documentation project.
361 Using a page title from another project, loaded as a dependency, also
362 results in this warning.
363
364 For more information, see \l {Creating Help Project Files}.
365
366 \section1 Failed to open <file> for writing
367
368 This warning clearly means it cannot open a file for writing, probably because
369 of a wrong path, or permission to write in a certain directory.
370
371 \section1 Found a \\target command outside table item in a table
372
373 If QDoc encounters a \l {target-command}{\\target command} that is not
374 preceded by an \\li command within a \l {table-command}
375 {\\table ... \\endtable block}, it issues this warning. The warning is
376 followed by the text
377 \e {Move the \\target inside the \\li to resolve this warning}.
378
379 \section1 \\generatelist <group> is empty
380
381 Below a short overview of all possible arguments for \l {generatelist-command}{\\generatelist}:
382 \list
383 \li \\generatelist annotatedexamples
384 \li \\generatelist annotatedattributions
385 \li \\generatelist classes <prefix>
386 \li \\generatelist classesbymodule <module name>
387 \li \\generatelist qmltypesbymodule <module name>
388 \li \\generatelist functionindex
389 \li \\generatelist legalese
390 \li \\generatelist overviews
391 \li \\generatelist attributions
392 \li \\generatelist related
393 \endlist
394
395 QDoc issues this warning if you specify \c{\generatelist <group>}
396 and the group does not contain any items, or if you specify
397 \c{\generatelist <group> <pattern>} and no item in the group
398 matches the pattern.
399
400 \section1 \\generatelist <group> no such group
401
402 This warning issues if the argument to \l {generatelist-command}{\\generatelist}
403 is a non-existing group.
404
405 Example:
406
407 \code
408 \generatelist draganddrop
409 \endcode
410
411 This statement generates a list of classes or QML types in the
412 draganddrop group. Classes or QML types are added to the
413 draganddrop group by the \c{\l {ingroup-command}{\ingroup} draganddrop} command in their
414 \l {class-command}{\\class} or \l {qmltype-command}{\\qmltype} comment.
415
416 QDoc issues this warning message if no entity has
417 this \c{\ingroup draganddrop} statement.
418
419 \section1 Has no \\inmodule command
420
421 QDoc issues this warning if the QDoc comments do not relate
422 a class, namespace, or headerfile to a module with the
423 \l{inmodule-command}{\\inmodule} command.
424
425 If the QDoc comment describes an entity that's not a member of
426 some other entity (typically a namespace or class), it should use
427 either \l {relates-command}{\\relates} or \l {inmodule-command}{\\inmodule}
428 to associate it with its broader context. This warning is raised
429 if it does not.
430
431 \section1 Illegal \\reimp; no documented virtual function for <command>
432
433 Qdoc tries to create a link to the function that this one reimplements,
434 but it could not find the link target, likely because that
435 function is not documented. This can also arise if no base class
436 has a virtual method with this name and signature; which might
437 arise due to a renaming, a change in signature or the base no
438 longer declaring it virtual.
439
440 \section1 Invalid QML property type
441
442 The type used to declare a QML property was not a valid
443 \l{QML Value Types}{QML value type} or \l{QML Object Types}{QML object type},
444 or it was a C++ or Qt type.
445
446 This warning typically occurs when developers refer to the underlying Qt
447 type used to implement a QML type, such as QStringList instead of
448 \c{list<string>}.
449
450 \section1 Invalid regular expression <regex>
451
452 Some QDoc commands take regular expressions as parameters. QDoc
453 gives this warning when the text given as such a parameter is not
454 a valid regular expression, usually due to it containing characters
455 with special meanings in regular expressions, that should have been
456 escaped.
457
458 Example:
459
460 \badcode
461 notifications.qdoc:56: (qdoc) warning: Invalid regular expression '^})$'
462 \endcode
463
464 \badcode
465 \quotefromfile webenginewidgets/notifications/data/index.html
466 \skipuntil resetPermission
467 \endcode
468
469 Invalid regular expression:
470 \badcode
471 \printuntil /^})$/
472 \endcode
473
474 Valid regular expression:
475 \badcode
476 \printuntil /^\}\‍)$/
477 \endcode
478
479 The \l {printuntil-command}{\\printuntil} command prints until it
480 meets a line consisting of only a right curly brace followed by a
481 right parenthesis. In this case, the curly brace and the parenthesis
482 need to be escaped because they have special meanings in regular
483 expressions.
484
485 \section1 Macro cannot have both format-specific and qdoc-syntax definitions
486
487 A \l {macro-variable}{\\macro} that specifies an output format cannot also
488 have a generic definition.
489
490 An example of a configuration that triggers this warning:
491
492 \badcode
493 macro.gui = \b
494 macro.gui.HTML = "<b>\1</b>"
495 \endcode
496
497 \section1 Macro <command> does not have a default definition
498
499 QDoc is attempting to expand a macro, and expects that macro to
500 have a default definition. Some macros may only have format-specific
501 definitions.
502
503 Example:
504 \badcode
505 macro.pi.HTML = "&pi;" # encodes the pi symbol for HTML output format
506 \endcode
507
508 There are however instances where macro expansion requires a
509 format-independent macro. For example, you can have macros in
510 section titles, but they must have default definitions.
511
512 \section1 Macro <macro> invoked with too few arguments (expected <many>, got <few>)
513
514 The given macro needs more parameters than it was given. See
515 the definition of the macro in the configuration for further
516 details.
517
518 \section1 Missing comma in \\sa
519
520 The titles listed for a \l {sa-command}{\\sa} command should be separated
521 from one another with commas.
522
523 \section1 Missing format name after \\raw
524
525 The \l {raw-command}{\\raw} command and the corresponding \l {raw-command}{\\endraw}
526 command delimit a block of raw mark-up language code. The \\raw
527 command must be followed by the format name.
528
529 \section1 Missing image: <imagefile>
530
531 The search path to the image is wrong, or the image file does not exist.
532
533 \section1 Missing <outer> before <inner>
534
535 Some examples:
536
537 \list
538 \li The \l {li-command}{\\li} command can only be used inside a \l {list-command}{\\list}
539 or a \l {row-command}{\\row} of a \l {table-command}{\\table}.
540 \li The \l {row-command}{\\row} and \l {header-command}{\\header} commands can only be
541 used within a \l {table-command}{\\table}.
542 \endlist
543
544 \section1 Missing property type for <name>
545
546 A declaration of a \l {qmlproperty-command}{\\qmlproperty} is missing its property type.
547
548 The \\qmlproperty command expects to be followed by the property type, then the
549 fully-qualified name of the property (i.e. the name ::-joined after the name of the
550 class it belongs to).
551
552 Incorrect:
553 \badcode
554 \qmlproperty MyWidget::count
555 \endcode
556
557 Correct:
558 \badcode
559 \qmlproperty int MyWidget::count
560 \endcode
561
562 \section1 Multiple index files found for dependency <indexfile>:<depend>
563 Using <indexfile> as index file for dependency <depend>
564
565 Multiple \c{-indexdir} paths were passed to QDoc as command line options,
566 and more than one contained an \c{.index} file that matches a dependency.
567 QDoc picks the one with the latest timestamp automatically.
568
569 Typically, this warning indicates that there are build artifacts left
570 from a previous documentation build.
571
572 \section1 Multiple primary overload definitions for <function>
573
574 QDoc issues this warning when multiple functions with the same name are
575 marked with \c{\overload primary}. Only one function in an overload
576 group should be designated as the primary overload.
577
578 The warning includes the function signatures and their source locations
579 to help identify all competing primary overloads. QDoc will determine
580 the actual primary overload using lexicographic comparison (alphabetical
581 ordering of function signatures) among the functions marked as primary.
582
583 To resolve this warning, remove the \c{primary} argument from all but
584 one of the \c{\overload primary} commands in the overload group.
585
586 Example that triggers this warning:
587
588 \badcode *
589 /\1!
590 \overload primary
591 Does something with no parameters.
592 \1/
593 void doSomething();
594
595 /\1!
596 \overload primary
597 Does something with a parameter.
598 \1/
599 void doSomething(int value);
600 \endcode
601
602 Correct approach - only one primary:
603
604 \badcode *
605 /\1!
606 \overload primary
607 Does something with no parameters.
608 \1/
609 void doSomething();
610
611 /\1!
612 \overload doSomething()
613 Does something with a parameter.
614 \1/
615 void doSomething(int value);
616 \endcode
617
618 \section1 <name> documented more than once
619
620 QDoc issues this warning when it finds two comments that
621 document the same item. The location of the previously seen
622 comment is provided in warning details.
623
624 For example, you see this warning when a function has a documentation
625 comment preceding its definition, and a separate \\fn comment
626 elsewhere.
627
628 \section1 <name> is documented, but namespace <namespace> is not documented in any module
629
630 The documentation for \e {<name>} was found, but \e{<name>} is declared
631 under a namespace that is either undocumented or QDoc was unable to
632 locate the documentation for it.
633
634 This can be resolved by either documenting \e{<namespace>}, or if it is
635 already documented in another module, ensure that this module has
636 a dependency to it.
637
638 See also \l {depends-variable}{depends} and \l {indexes-variable}{indexes}.
639
640 \section1 Namespace <name> documented more than once
641
642 This warning means that a documentation set contains two comments
643 containing \l {namespace-command}{\\namespace} commands with the same
644 argument, <name>.
645
646 \section1 \\nativetype is only allowed in \\qmltype
647
648 The \l{nativetype-command}{\\nativetype} command can only be used in a QDoc
649 comment that documents a QML type.
650
651 \section1 No documentation for <name>
652
653 Example:
654
655 \badcode
656 Warning "No documentation for QNativeInterface."
657 \endcode
658
659 QDoc detects the declaration of namespace QNativeInterface in
660 a header file, but does not find a QDoc comment where that
661 namespace has been documented.
662
663 \section1 No documentation generated for function <name> in global scope
664
665 QDoc was able to match the documentation for a function \e {<name>} to its
666 declaration, but no output was generated because the function is declared
667 in the global namespace.
668
669 Use the \l {relates-command}{\\relates} command to associate the function
670 with a documented type, namespace, or a header file. The function is then
671 listed as a \e {related non-member} on the associated reference page.
672
673 \section1 No output generated for <entity> because <parent> is undocumented
674
675 QDoc issues this warning when parsing a documentation comment for an
676 API entity such as a class member, but cannot produce any output because
677 the associated parent (class) is not documented. Ensure that the parent is
678 documented and that QDoc is configured to parse the source file containing
679 the documentation comment.
680
681 If the documented member belongs to a class that is not meant to be
682 documented, mark the class as \qdoccmd {internal} or use the
683 \qdoccmd {dontdocument} command.
684
685 \section1 No such enum item <name> in <class>
686
687 Example:
688
689 \badcode
690 Cannot find 'QSGMaterialRhiShader::RenderState::DirtyState' specified
691 with \enum in any header file.
692 \endcode
693
694 QDoc issues this warning when it finds a \l{value-command}{\\value} directive in an
695 \l{enum-command}{\\enum} comment that names a value not found in the header file that declared
696 the enumerated type documented.
697
698 \section1 No such parameter
699
700 QDoc issues this warning when the parameter name given after an
701 \l{a-command}{\\a} command does not match any of the parameters named
702 in the header-file's declaration of the function or method being
703 documented.
704
705 \section1 No such <type> in QML <module>
706
707 QDoc issues this warning if a \l {qmlproperty-command} {\\qmlproperty},
708 \l {qmlmethod-command} {\\qmlmethod}, or \l {qmlsignal-command}
709 {\\qmlsignal} command argument uses a QML module identifier, but
710 the associated \l {qmltype-command}{\\qmltype} does not belong to
711 that module.
712
713 The QML module identifier, if defined, \b must match with the
714 \l {inqmlmodule-command} {\\inqmlmodule} argument in the QML type
715 documentation. In most cases, QDoc is able to locate the QML type
716 without a module identifier.
717
718 \section1 Overrides a previous doc
719
720 QDoc issues this warning when it finds two comments that appear to
721 describe the same entity. The location of the previously seen
722 comment is provided in warning details.
723
724 \section1 QML property documented multiple times: <identifier>
725
726 QDoc uses this warning when it finds two QDoc comments that document
727 the same QML property, either by appearing just before its definition,
728 or using the \l {qmlproperty-command}{\\qmlproperty} command.
729
730 \section1 QML type <TypeName> documented with <ClassName> as its native type. Replacing <ClassName> with <OtherClass>
731
732 If the \qdoccmd nativetype command is used with the same argument in
733 multiple QML type documentation comments that belong to the same
734 documentation project, QDoc issues this warning. To resolve this, ensure
735 that you use the \c {\nativetype} command only once for each C++ class.
736
737 \section1 QtDeclarative not installed; cannot parse QML
738
739 QDoc issues this warning if it has been compiled without support
740 for QML parsing. This should not happen unless you have a
741 custom build of QDoc.
742
743 \section1 Redundant link to self in \\sa command for <name>
744
745 A piece of documentation contains a link to itself in the references defined
746 in its \l {sa-command}{\\sa} command.
747
748 This problem tends to occur when there is a collection of related properties
749 or methods that refer to each other, and where the \\sa commands have been
750 copied between them, as in this example:
751
752 \badcode
753 \fn void Items::append(const Item &)
754 ...
755 \sa append(), count(), insert(), remove()
756 \endcode
757
758 It is useful to replace the self-referencing link with one to another
759 related property or method.
760
761 Alternatively, the link may not be specific enough for QDoc to resolve, as
762 in this example:
763
764 \badcode
765 \fn void MyPicture::setSize(int)
766 ...
767 \sa setSize()
768 \endcode
769
770 In this case, the intention may have been to refer to an overload that
771 accepts a \c double argument:
772
773 \badcode
774 \fn void MyPicture::setSize(int)
775 ...
776 \sa setSize(double)
777 \endcode
778
779 \section1 The content is too long
780
781 QDoc uses a fixed-size buffer when tokenizing source files. If any single
782 token in the file has more characters than the maximum limit, QDoc issues
783 this warning.
784
785 While QDoc continues parsing the file, only the part of the token that
786 fits into the buffer is considered, meaning that the output might be
787 mangled.
788
789 To resolve this warning, the relevant content must be reduced in size,
790 either by splitting it, if possible, or by removing some of its parts.
791
792 The maximum amount of characters for a single token is shown alongside
793 the warning, for example:
794
795 \badcode
796 file.qdoc:71154: (qdoc) warning: The content is too long.
797
798 [The maximum amount of characters for this content is 524288.
799 Consider splitting it or reducing its size.]
800 \endcode
801
802 \note Since content that is too long is not parsed in full, QDoc may
803 issue warnings that are false positives. Resolve all warnings of this type
804 before fixing other warnings.
805
806 \section1 This page title exists in more than one file
807
808 The \l {title-command}{\\title} command sets the title for a page.
809
810 \code
811 \page activeqt-server.html
812 \title Building ActiveX servers in Qt
813 \endcode
814
815 QDoc issues this warning if a certain title is used in more than one page.
816
817 \section1 This qdoc comment contains no topic command (e.g., \\module, \\page)
818
819 If a QDoc comment doesn't contain a \l {Topic Commands}{topic command}, QDoc does
820 not know what the comment documents, and issues this warning.
821 Very similar to \l {Cannot tie this documentation to anything}, but
822 specific to comments that are not in C++ or QML files.
823
824 \section1 <topic> cannot be mixed with other topic commands
825
826 QDoc allows multiple topic commands in a single documentation
827 comment for certain \l{Writing Documentation#Multiple topics}{use cases}.
828 Using multiple topic commands from different categories prints
829 out this warning, and the topic generates no output.
830
831 \section1 Type is its own base type: <type>
832
833 The QML type has been incorrectly defined as its own base type, possibly
834 using the \l {inherits-command}{\\inherits} command.
835
836 \section1 Unable to parse QML snippet: <code> at line <y>, column <x>
837
838 QDoc comments can contain QML code. This code can be found in a snippet,
839 or in the QDoc comments delimited by \l {qml-command}{\\qml} and {endqml-command}{\\endqml}.
840
841 Example:
842
843 If there is a syntax error in the QML code, QDoc issues the warning
844 \badcode
845 Unable to parse QML snippet: Syntax error at line 97, column 42
846 \endcode
847
848 Snippets can also contain QML and also there the code is checked. If there is
849 for example a missing curly brace in the code, QDoc issues the warning
850 \badcode
851 Unable to parse QML snippet: Expected token '{' at line 63, column 52
852 \endcode
853
854 QDoc often fails to parse incomplete QML snippets; in these cases,
855 it's often OK to replace the \\qml ... \\endqml commands with
856 \\code ... \\endcode to suppress this warning.
857
858 \section1 Unbalanced parentheses in <text>
859
860 Points to a '(' without a corresponding ')', or vice versa.
861
862 \section1 Undocumented enum item <enum> in <enum list>
863
864 <enum list>'s \l {value-command}{\\value} or \l {omitvalue-command}{\\omitvalue} entries
865 did not include one for \l {enum-command}{<enum>}, which is named in the
866 declaration of <enum list> in the header file.
867
868 \section1 Undocumented parameter
869
870 QDoc requires the documentation of a function or method to describe
871 every parameter. It recognizes this by each parameter name (as
872 specified where the function or method is declared in a header file)
873 appearing after a \l {a-command}{\\a} command.
874
875 This requirement is not imposed for function overload documentation,
876 provided that the overload is marked with the \qdoccmd overload command
877 and a fully-documented function with the same name exists.
878
879 \section1 Undocumented property '<name>'
880
881 This warning indicates that a C++ class has a Q_PROPERTY declaration that lacks
882 documentation. Properties are part of a class's public API and require
883 documentation using the \c \property command to describe their purpose,
884 valid values, and behavior.
885
886 \note If you see both "Cannot find '<ClassName::propertyName>' specified with
887 '\\property'" and "Undocumented property '<ClassName::propertyName>'" warnings
888 together, the \c \property command exists but cannot match the property in code.
889 Dual warnings indicate mismatched property documentation: the \c \property command
890 can't find its target, and the PropertyNode has no attached documentation. Check
891 that the fully qualified name matches exactly, including namespace and class scope.
892
893 \section1 Undocumented QML <module> referred by <type> or its members
894
895 QDoc issues this warning if it is unable to locate a QML module
896 based on the identifier passed to the
897 \l {inqmlmodule-command}{\\inqmlmodule} or \l {qmlproperty-command}
898 {\\qmlproperty} commands associated with a QML \e type.
899
900 This means that either documentation for the \l {qmlmodule-command}
901 {\\qmlmodule} is missing, or an incorrect module identifier was
902 used in \\qmlproperty, \\qmlmethod, or \\qmlsignal command(s).
903
904 \section1 Undocumented return value
905
906 For functions whose return-type is not void, QDoc checks if the return
907 value is documented. This warning is issued if the documentation for a
908 function or method doesn't contain a word starting with "return".
909
910 \section1 Unexpected <end_command>
911
912 This warning is issued if, for example, you have an \l {list-command}{\\endlist} without
913 a preceding \l {list-command}{\\list}. It applies to all commands that come in pairs (e.g.
914 startFoo/endFoo).
915
916 \section1 Unexpected \\snippet
917
918 QDoc issues this warning if it is unable to locate the snippet file
919 quoted in a \l {snippet-command}{\\snippet} command.
920
921 \section1 Unknown base <name> for QML type <type>
922
923 The type name declared as the base type for a QML type was not found, or
924 it was not declared with the \qdoccmd{inherits} command.
925
926 \section1 Unknown command <name>
927
928 When a QDoc comment uses a backslash followed by a token that is not a QDoc
929 built-in command and has not been defined as a custom command
930 \l {macro-variable}{macro}, QDoc produces this warning. Check the spelling
931 of the command name, and check whether your QDoc configuration doesn't
932 include whatever would have defined it, if it's a custom command.
933
934 This may also be produced due to code being quoted in the QDoc comment,
935 for example the author may have referred to the C string termination
936 character \c{'\0'} or one of the other C string escape sequences such
937 as \c{'\n'} without escaping the backslash. Escape the backslash
938 as \c{\} to include a literal backslash in the documentation, or
939 enclose the code fragment in \c{\c{...}}, which suppresses
940 interpretation of backslashes as introducing QDoc commands.
941
942 \section1 Unknown macro
943
944 QDoc issues this warning when it sees a backslash, \c{\}, followed
945 by a token it doesn't recognize as the name of either a built-in command
946 or a \l {macro-variable}{user-defined macro}. When quoting code
947 that contains character escape sequences, you should enclose the
948 code in \\c{...} to prevent this warning against the escape sequences.
949
950 \section1 Unrecognizable QML module/type qualifier for <identifier>
951
952 A parameter passed to \l {qmlproperty-command}{\\qmlproperty} or
953 \l {qmlmethod-command}{\\qmlmethod} contains a combination of
954 qmlModule::qmlType::identifier that is not defined anywhere.
955
956 Example:
957 \badcode
958 Unrecognizable QML module/type qualifier for real QtQuick::DragHandler::DragAxis::minimum
959 \endcode
960
961 DragHandler doesn't have a property called DragAxis.
962
963 \section1 Unrecognized list style <name>
964
965 \\list can take an optional argument: a single number or character
966 that modifies the list style. Refer to the {list-command}{\\list}
967 documentation for more details. If you use an argument that is
968 not recognized, QDoc issues this warning.
969
970 \section1 Unrecognized markup language
971
972 This warning occurs when a programming language is specified for a \\code
973 command that QDoc does not recognize. For example, this QML code block has
974 been given the invalid "QL" language:
975
976 \code [text] \\endcode
977 \code [QL]
978 Item {
979 id: my_item
980 }
981 \1
982 \endcode
983*/