| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QDoc truncates link text at the first parenthesis due to incorrectly
advancing the main parser position instead of the local counter when
processing parentheses pairs. This causes links like "Q(Gui)Application"
to render only "Q" as clickable text.
This change ensures that the local parsing position advances properly
while preserving the main parser state. This in turn allows QDoc to
generate the complete link text correctly, including parentheses.
Fixes: QTBUG-69756
Pick-to: 6.10 6.9 6.8
Change-Id: Ib4dcba3ef3a357c96180f44794068bfca0bae310
Reviewed-by: Topi Reiniö <[email protected]>
Reviewed-by: David Boddie <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QDoc does not currently recognize when a QML type is a singleton if it
is declared in C++ using the `QML_SINGLETON` macro. This forces users to
document the type with `\qmlsingletontype` even though the singleton
nature is already defined in code.
This change makes QDoc detect the QML_SINGLETON macro by looking for its
expansion artifacts in the C++ AST. When such a class is linked to a QML
type, the type is marked as a singleton automatically. As a result,
documenting the type with `\qmltype` is sufficient, and the generated
output now shows the singleton status without extra markup.
[ChangeLog][QDoc] QDoc now detects QML_SINGLETON macros and marks the
corresponding QML type accordingly.
Fixes: QTBUG-51584
Fixes: QTBUG-95328
Fixes: QTBUG-131663
Change-Id: I3c01b70dbd806176bdab0f70e1b9513758187877
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QDoc only recognizes pragmas when written with the older ".pragma"
syntax, and then only `.pragma library`. Modern QML files use "pragma
singleton", which QDoc does not detect, leaving these types undocumented
as singletons, unless manually documented as so with the
`\qmlsingletontype` command.
This change extends QmlCodeParser to handle both ".pragma" and "pragma"
forms. It extracts pragma declarations passes the result to the visitor,
which now marks types as singletons when "pragma singleton" is
found. This makes QDoc correctly recognize singleton types declared with
"pragma singleton".
[ChangeLog][QDoc] QDoc now recognizes 'pragma singleton' in QML files
and automatically marks the type as a QML singleton.
Task-number: QTBUG-51584
Task-number: QTBUG-95328
Change-Id: I2cf3f154a521134149c63d68a834c325aee5c27f
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor QmlCodeParser::extractPragmas() to delegate .pragma syntax
processing to a dedicated static helper function processDotPragma().
This improves code organization and prepares for adding support for
additional pragma syntaxes.
QDoc's behavior remains unchanged, as this is a pure refactoring change.
Task-number: QTBUG-51584
Change-Id: I55461ff028400921e48ca18ac4989adf17392a3d
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QDoc supports `\qmltype` for documenting QML types. However, it does not
let authors explicitly mark a type as a singleton in documentation.
This change adds a new `\qmlsingletontype` command. It works the same as
`\qmltype`, but always marks the type as a singleton. The HTML and
DocBook generators now display "(Singleton)" in the title and include a
note explaining the singleton behavior. The index files also preserve a
singleton attribute. Tests and documentation are updated to cover the
new command.
[ChangeLog][QDoc] QDoc now has the \qmlsingletontype command, which you
can use to document a QML type as a QML singleton. Refer to the QDoc
manual for further details.
Task-number: QTBUG-51584
Change-Id: I4effda22f031cbcff7a871fbe8f460b0a3f78f3f
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
separate the build process of Qt Linguist from Qt to make it
wasm buildable. To see the result:
+ Build/install qt for wasm
+ use qt-cmake-standalone-test of wasm Qt to configure linguist (stand alone build)
+ cmake --build <builddir>
+ emrun --browser=<your browser> <builddir>/linguist.html
Fixes: QTBUG-137208
Change-Id: Ibb6016d329e6b29e471ba891b3fd950aa267f9da
Reviewed-by: Joerg Bornemann <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Labels are added to the Qt i18n Linguist and tools. This patch adds
the documentation for labels.
Fixes: QTBUG-138632
Pick-to: 6.10
Change-Id: I470b24aaf21beb63c5e223bfc45acbb2fe95cf6f
Reviewed-by: Joerg Bornemann <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If llvm is built from sources or installed via llvm-provided packages
then it comes with a Findzstd.cmake which is most likely inconsistent
with your system-provided zstdConfig.cmake. Linux distro packagers tend
to remove that file for that reason.
When configuring qttools, the following happened:
- find_package(llvm) calls find_package(zstd)
- llvm has modified CMAKE_MODULE_PATH to load its own find modules
- llvm's Findzstd.cmake creates the targets zstd::libzstd_shared and
zstd::libzstd_static
- later, in the designer subdir, find_package(WrapZSTD) is called
- that calls find_package(zstd)
- CMAKE_MODULE_PATH has been reset in the meantime, and we don't load
llvm's Findzstd.cmake but the system's zstdConfig.cmake
- that package expects three targets:
- zstd::libzstd_shared
- zstd::libzstd_static
- zstd::libzstd (an alias for one of the two others)
- configuration error, because zstd::libzstd is missing
We now work around this issue by calling find_package(WrapZSTD) before
find_package(llvm) and disabling the finding of zstd within llvm.
Fixes: QTBUG-139199
Pick-to: 6.10
Change-Id: I4e31eb0a3bef196a235becd2fd9d9d80e6bf548c
Reviewed-by: Alexey Edelev <[email protected]>
Reviewed-by: Paul Wicking <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Add some more details about installing Clang for QDoc, to help users get
it right.
Pick-to: 6.10 6.9 6.8
Change-Id: Ifdb24d3c43fde9711e07b02dd860ff4b5d5a3dc1
Reviewed-by: David Boddie <[email protected]>
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QDoc currently uses flawed logic to detect duplicate type names in
compact lists. The existing implementation only checks if the next
item in the same alphabetical paragraph has the same name, missing
many cases where duplicates appear elsewhere in the list. When
duplicates are detected, the disambiguation uses the project name
rather than the actual QML module name, making it unhelpful.
This creates confusion in multi-module documentation builds where
different QML modules contain types with the same name. Users cannot
distinguish between "Item" from QtQuick versus "Item" from a custom
module, as both appear identically in type listings.
This change implements comprehensive duplicate detection across the
entire list and uses the correct QML module name for disambiguation.
QML types with conflicting names now display as "TypeName: ModuleName"
only when actual conflicts exist, providing clear identification while
avoiding unnecessary clutter for unique names.
Fixes: QTBUG-138547
Pick-to: 6.10
Change-Id: I1974b15dc10d6ff60477abc1beff1eaa552e5371
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change introduces a mechanism to generate test coverage reports
for QDoc using gcov/lcov. This will aid QDoc's developers track test
quality and identify untested areas of the codebase.
The feature requires the 'lcov' and 'genhtml' tools to be installed.
The feature is enabled for developer builds where QtBase is configured
with the 'coverage_gcov' feature and when QtTools is configured to build
tests. It's developed for internal use and on Linux only; MSVC doesn't
work. On macOS, there be dragons -- you have been warned.
Three new build targets are added:
- qdoc_test_with_coverage: A convenience target that builds, runs
tests, collects data, and generates the final HTML report. This is
the primary target for developers.
- qdoc_coverage_collect: Collects coverage data from the current test
run.
- qdoc_coverage_report: Generates the HTML report from collected data.
Usage:
1. Configure the QtBase build with tests and coverage enabled:
configure -developer-build -coverage gcov -make tests
2. Configure QtTools.
3. Build the new target:
cmake --build . --target qdoc_test_with_coverage
4. Open the report:
<build-dir>/coverage_report/index.html
Fixes: QTBUG-124895
Change-Id: I59957fb69a7ae6db2a57345d41eb30de7cb115c9
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch amends to 3a9bc99b1087c224ff25b105f498bec1de209af5
which introduced a bug where in the case of ostream operator
after an identifier and before a namespaced tr command, the
namespace goes missing. This patch brings the detection of
ostream (left shift) token to lupdate to avoid such mistakes.
Fixes: QTBUG-132832
Change-Id: I7ded96f40091e83a1912302bf40595a3bd9308c9
Reviewed-by: Joerg Bornemann <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Variable type information was not exported in index files, leading to
the use of incomplete information in generated documentation. This is
most noticeable in QObject subclasses where the staticMetaObject member
variable would lack a basic type in member documentation.
It also fixes some What's New documentation for versions of Qt that
introduced new member variables.
Pick-to: 6.10
Change-Id: I0931fd7815477c0d04bce28b152faab8fd8f92d5
Task-number: QTBUG-139193
Reviewed-by: Topi Reiniö <[email protected]>
Reviewed-by: Paul Wicking <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
When in dark mode, the highlight color of non-editable text fields
is not enough visible. This patch sets the highlight color of
non-editable text field in dark mode to have more contrast to the
dark background.
Fixes: QTBUG-138573
Change-Id: If47e4d2427ca3176c6ed1b73305c1a80d8748dce
Reviewed-by: Joerg Bornemann <[email protected]>
|
|
|
|
|
|
|
|
|
| |
This patch changes the tone of the tooltips of menu items. Also
changes whatsThis of menu items to toolTips
Pick-to: 6.10
Change-Id: I0942281e2ad607e09c2f21b3b53816d8148039a1
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QML member documentation is generated using a <table>-based layout,
which is inconsistent with the semantic <h3> structure used for C++
members. This discrepancy complicates CSS styling and maintenance.
This change replaces the legacy table layout for all QML members
(properties, methods, signals) with the same `<h3 class="fn">`
structure used for C++ members. This simplifies the generated HTML
and allows for more consistent styling across the documentation.
To preserve styling differentiation, the following CSS classes are
employed:
- qml-member (for all QML members)
- qml-property
- qml-method
- qml-property-group
The HTML generator logic in `generateDetailedQmlMember` has been
refactored to correctly handle all member types, including single
members, named property groups, and members that share a documentation
comment, through a unified code path. Where applicable, string literals
now employ the modern '_L1' suffix as a cheap optimization.
[ChangeLog][QDoc] QDoc no longer generates a table-based member layout
for QML types, and uses the same structure as for C++ types
instead. New CSS classes (`qml-member`, `qml-property`, `qml-method`,
`qml-property-group`) allow for specific styling of QML members.
Fixes: QTBUG-92109
Change-Id: I61e9fe388b630d8e820e32656d2dd01923c2e27d
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QML member documentation is generated using a <table>-based layout,
which is inconsistent with the semantic <h3> structure used for C++
members. This discrepancy complicates CSS styling and maintenance.
This change replaces the legacy table layout for all QML members
(properties, methods, signals) with the same `<h3 class="fn">`
structure used for C++ members. This simplifies the generated HTML
and allows for more consistent styling across the documentation.
To preserve styling differentiation, the following CSS classes are
employed:
- qml-member (for all QML members)
- qml-property
- qml-method
- qml-property-group
The HTML generator logic in `generateDetailedQmlMember` has been
refactored to correctly handle all member types, including single
members, named property groups, and members that share a documentation
comment, through a unified code path. Where applicable, string literals
now employ the modern '_L1' suffix as a cheap optimization.
[ChangeLog][QDoc] QDoc no longer generates a table-based member layout
for QML types, and uses the same structure as for C++ types
instead. New CSS classes (`qml-member`, `qml-property`, `qml-method`,
`qml-property-group`) allow for specific styling of QML members.
Fixes: QTBUG-92109
Change-Id: I61e9fe388b630d8e820e32656d2dd01923c2e27d
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far
\macro QDebug qDebug()
would result in "QDebug qDebug" in the documentation. But
the parenthesis are not optional in this case.
Pick-to: 6.9 6.10
Fixes: QTBUG-139057
Change-Id: Iec378440bbd32e08d8da0d8de8a97f02e1599d92
Reviewed-by: Paul Wicking <[email protected]>
|
|
|
|
|
| |
Change-Id: I2be7fb2ede5d3ad7d39735f77672cd30a1c0129e
Reviewed-by: Qt Submodule Update Bot <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds an example to demonstrate switching languages in
applications at runtime.
The example is a simple clock in Qt Quick that counts the
seconds (plural forms) and presents the time and date.
The application allows the user to switch the language
of the UI at runtime by clicking on a button and choosing
a new language from the menu.
It also show cases the best practices in integrating Qt
i18n in CMake.
Fixes: QTBUG-71856
Pick-to: 6.10
Change-Id: I8ba866902e690b52a41cafbbe5e1ce88b3d63ebd
Reviewed-by: Kai Köhne <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix manual link commands to support QML qualified names with import
aliases.
Previously, QML qualified names worked in code blocks but not in link
commands. In QML blocks (working):
\qml
import TestModule as TM
TM.BaseType { title: "Example" } // Generates proper link
\endqml
In link commands (broken):
\l [QML] TM.BaseType // No link generated
\l [QML] {TM.BaseType} // No link generated
\l BaseType // Works
The root cause is that QDoc has two separate linking systems. QML markup
uses import-aware `findTypeNode()` that resolves aliases, while link
commands use `findNodeForAtom()` with C++-only "::" splitting.
Solution:
- Enhance `findNodeForAtom()` to detect QML context
(`genus == Genus::QML`).
- Delegate to existing `findTypeNode()` for QML-aware resolution.
- Add fallback strategy: try full path, then try last segment only
(handles "TM.BaseType" to "BaseType" when alias can't be resolved).
This ensures `\l [QML] TM.BaseType` works regardless of import context
availability while maintaining C++ compatibility.
The `qml_import_as` test case is modified slightly to expose this
behavior.
[ChangeLog][QDoc] Documentation authors can now use QML import aliases
in their examples and link commands. Types referenced through
aliases (like TM.BaseType after "import TestModule as TM") will be
properly linked and highlighted in the generated documentation.
Task-number: QTBUG-48487
Change-Id: Ia59767c03ac9a028db343fa3b8da9c6e2c4c9a15
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add import-aware type resolution to properly link QML types that are
referenced through module aliases (e.g., `TM.BaseType` where `TM` is
an alias created by `import TestModule as TM`).
`QDocDatabase::findTypeNode()` now detects QML contexts with
dot-qualified names and attempts to resolve them through the import
list of the current QML type. For each import alias, it tries to find
the qualified type using findQmlType(). The existing path-based lookup
remains as a fallback for non-aliased qualified names.
This completes the fix for proper handling of QML module aliases,
enabling both correct syntax highlighting (from previous commits) and
functional hyperlinks.
Fixes: QTBUG-48487
Change-Id: I90690143e258e53d15e1bbd962e17e7bf08a0476
Reviewed-by: David Boddie <[email protected]>
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expose read-only access to the import list to enable import-aware
type resolution in QDocDatabase.
This getter is required for the subsequent fix that resolves QML types
referenced through module aliases (e.g., `TM.BaseType` where `TM` is
an alias for `TestModule`).
Task-number: QTBUG-48487
Change-Id: Id8780e6d79d0d6518a1009572fd9c328ffc56331
Reviewed-by: Topi Reiniö <[email protected]>
Reviewed-by: David Boddie <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds a comprehensive set of output tests to validate QDoc’s
handling of QML module aliases using the `import ... as ...` syntax. It
introduces a new test case for `tst_validateqdocoutputfiles`.
The test adds expected out for DocBook, HTML and WebXML outputs. The
test data covers the following:
- Alias resolution (e.g. `import TestModule as TM; TM.BaseType`).
- Mixed import patterns (direct and aliased imports in the same file).
- Multi-segment qualified names (e.g. `X.Level1.Level2.Leaf`).
- Proper linking of inheritance, properties, and methods via aliases.
These additions ensure QDoc correctly spans and links aliased QML types
across all supported output formats.
Task-number: QTBUG-48487
Change-Id: I2ab974817ed7e3138cf7c095d9920babcfb2458b
Reviewed-by: Topi Reiniö <[email protected]>
Reviewed-by: David Boddie <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update QmlMarkupVisitor to properly span entire qualified QML
identifiers instead of just their first segment.
This fixes markup for:
- Qualified type names (e.g., `TM.BaseType` with module aliases).
- Multi-segment property names (e.g., `anchors.fill`, `font.bold`).
- Attached properties (e.g., `Component.onCompleted`).
The change intercepts the recursive AST traversal at key points to
mark up the complete qualified name as a single token. When this
isn't possible (e.g., malformed AST), it falls back to the normal
traversal behavior.
This improves syntax highlighting and will enable proper linking
for module-aliased types in subsequent changes.
Task-number: QTBUG-48487
Change-Id: Ic7ee2d6270ccf6d450f73ce6394d39e41c787a1e
Reviewed-by: Topi Reiniö <[email protected]>
Reviewed-by: David Boddie <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce two helper methods for handling qualified QML identifiers:
- getFullyQualifiedLocation(): Determines the complete span of a
qualified identifier (e.g., `TM.BaseType` or `Layout.preferredWidth`)
to enable proper markup of multi-segment names as single units.
- getLocationForMarkup(): Provides a safe way to get a markupable
location for any qualified identifier, ensuring we always have
something valid to mark up even in edge cases.
Both methods handle malformed ASTs gracefully.
This is a preparatory step for fixing QDoc's handling of qualified
QML type names when using module aliases.
Task-number: QTBUG-48487
Change-Id: I39a62049f02658ff53b044c139e6cbaca9e66e03
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Two lines in one of the visit() overloads have been commented out for a
long, long time. Remove them.
Task-number: QTBUG-48487
Change-Id: Ib0dc36d1ea639a69d48004a12b2c24e72648c811
Reviewed-by: David Boddie <[email protected]>
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change `sourceText()` and `addMarkedUpToken()` to take `SourceLocation`
parameters by const reference instead of non-const reference, as these
methods only read the location without modifying it.
This enables better const-correctness and allows these methods to
be called with temporary SourceLocation values.
Task-number: QTBUG-48487
Change-Id: I516c8d9308bd838888972ca95fe82120f809cc63
Reviewed-by: Topi Reiniö <[email protected]>
Reviewed-by: David Boddie <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace QLatin1String with modern Qt string literal syntax (_L1 suffix)
throughout QmlMarkupVisitor for improved performance and readability.
This change updates string comparisons, concatenations, and formatting
operations to use the more efficient compile-time string literals.
Task-number: QTBUG-48487
Change-Id: If3b13cf3b4ba4e7f3790e37eccfbb8f0296c48c9
Reviewed-by: Topi Reiniö <[email protected]>
Reviewed-by: David Boddie <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When navigating on Qt Linguist to a previous message from index 0,
linguist automatically switches to the inactive tab and continues
the navigation from there. If the inactive group tab is empty
(label or context), then a non-valid index is reached.
This patch checks whether the inactive tab is empty before switching
to it.
Fixes: QTBUG-138910
Pick-to: 6.10
Change-Id: Ibffb41e8fe0a756014513a06436d9ffde2c0748c
Reviewed-by: Kai Köhne <[email protected]>
Reviewed-by: Joerg Bornemann <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because the path to the dir might change when using a different cmake
autogen intermediate dir strategy, we should query the value using the
qtbase function, rather than expecting it to be the default binary
dir.
We keep the genex approach for when the target property might be set,
because it might be set after the call to qt6_add_lupdate.
Amends d39e9f21c98eb4788f3434f139b828862b2d8823
Pick-to: 6.8 6.9 6.10
Task-number: QTBUG-110696
Change-Id: Ic2e4a210b95e23fa21563f7995ad9b1dfd3c3e6c
Reviewed-by: Joerg Bornemann <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When resolving a function link for a command like `\overload`,
`findFunctionChild` would only inspect the first function from a set
of overloads. This order-dependent logic was fragile and would fail
if an internal or deprecated function was parsed before a public,
active one, causing QDoc to not generate a link.
This patch replaces the logic with a prioritized, order-independent
search. It now iterates through all overloads, first attempting to find
a non-internal, non-deprecated function. If none is found, it falls
back to finding any non-internal function.
This ensures that overload resolution is robust and predictable,
generating a link to the most appropriate candidate regardless of the
declaration order in the source code.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-138889
Change-Id: Iea802ec60a60c994a132574be1d3468e784a741a
Reviewed-by: Topi Reiniö <[email protected]>
Reviewed-by: Kai Köhne <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When `\overload` is used with an unqualified function name, QDoc uses
an automatic sorting algorithm to determine the primary function to link
to. In cases with multiple similar overloads, this algorithm can fail
to select a single, unambiguous target, resulting in broken links. The
only workaround is to use a verbose, fully qualified function signature.
This change introduces a `primary` argument to the `\overload` command,
allowing authors to explicitly designate a function as the primary one
in an overload set. The sorting logic is updated to prioritize this
designated function, resolving ambiguity and ensuring unqualified
`\overload` commands link correctly.
To prevent incorrect usage, a warning is now emitted if multiple
functions in the same overload set are marked as primary.
[ChangeLog][QDoc] You can now specify what the primary signature is for
a set of overloads with `\overload primary`. Refer to the QDoc manual
for detailed examples and documentation.
Fixes: QTBUG-138586
Fixes: QTBUG-138955
Change-Id: I351b55ac9185d2b74da4da731362757592f244e0
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The \generatelist command takes an optional argument
that affect how the members are listed, for example,
`classesbymodule` which creates an annotated list of
the classes in a named C++ module.
`groupsbymodule` is not recognized or documented. QDoc
falls back to generating a list of all members of a
group in this case. While the end result is correct,
this relies on an undocumented feature that is likely
to change and break.
Replace these instances with an explicit \annotatedlist
command that produces the same output.
Pick-to: 6.10
Task-number: QTBUG-138901
Change-Id: I6bd1a18b05a841bd2e71050ecdc5910fa880e256
Reviewed-by: Paul Wicking <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change fixes a regression in `\overload` command linking that was
introduced between Qt 5.13 and 5.14 by commits d5ba63896 and 6009f0ea2.
The issue occurred because the self-reference prevention logic added in
those commits was too aggressive. When processing `\overload` commands
with unqualified function names (e.g., `\overload lastIndexOf()`), QDoc
would:
1. Generate an AutoLink atom with string `lastIndexOf()`,
2. Strip the `()` to get `lastIndexOf`,
3. Compare it to the current function's name (also `lastIndexOf`),
4. Treat it as a self-reference and output plain text instead of a link.
This broke legitimate overload references that should link to the primary
overload function, not the current function.
The fix implements enhanced context resolution that automatically qualifies
unqualified function names using the parent class or namespace context.
For example, `\overload lastIndexOf()` becomes `\overload
QString::lastIndexOf()` when used within the QString class
documentation. This bypasses the self-reference check while maintaining
the intended functionality.
Fixes: QTBUG-138889
Fixes: QTBUG-138887
Pick-to: 6.10 6.9
Change-Id: I817ec0b1b3549e53b74c23e042774e522b5c4bb9
Reviewed-by: David Boddie <[email protected]>
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds generation of overload notifications in DocBook output,
matching functionality already present in other output formats.
When a function has overloads and contains an overload command,
display appropriate text with links to the base function.
The implementation adds a case to ``generateAddendum()` that generates
either "This is an overloaded function" or "This function overloads
[target]" messages depending on the context. The code includes automatic
link resolution for overload targets and qualifies function names with
parent class context when needed to improve link accuracy.
Fixes: QTBUG-138890
Change-Id: Idef429e707583cce2195f83ad7b3007ad3177a30
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
| |
Change-Id: I940fbd4c053b27cceddda3c4b1a2319a32a80e4a
Reviewed-by: Qt Submodule Update Bot <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Linguist has been updated with new icons and marks for translations.
The new patch reflects the new marks in the documentation as well. Also
the screenshots are updated to reflect the new look.
In addition, the new label feature is included in the screenshots
and is being documented.
Fixes: QTBUG-138631
Pick-to: 6.10
Change-Id: Ibe2ef64d63c531fdfb177a918ed25bb2e4f8326e
Reviewed-by: Kai Köhne <[email protected]>
|
|
|
|
|
|
|
| |
Pick-to: 6.9 6.10
Change-Id: Iddf580ae4f2b5cbbdb4929f4c4ce5ced4ca2946e
Reviewed-by: Masoud Jami <[email protected]>
Reviewed-by: Joerg Bornemann <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QDoc failed to document a templated `using` declaration when a template
parameter had a default value. For code like this:
template <int N = 1> using
Foo = Bar<N>;
`\typealias Foo` did not match. The parser extracted the alias name and
target type by splitting source text on `=`, which breaks when `=`
appears inside template parameter lists.
This change stops string parsing and relies on Clang’s AST instead. It
uses the cursor spelling to get the alias name, and it obtains the
underlying type from TypeAliasDecl via the TemplateDecl for
template aliases. For non-template aliases, it queries the underlying
type through the Clang C API. The result is a correct `TypeAliasNode`
for both cases.
A new test is added to cover aliases with default template parameters
and confirm that simple, non-template aliases still work.
Fixes: QTBUG-138870
Pick-to: 6.10 6.9 6.8
Change-Id: Ifff9bf51fb787778473d2b0bac6603cada2ab443
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The QDoc manual mentions that Clang 17+ is required, but the
installation guidance mixes sources and may leave users unsure which
packages are supported and how to point Qt’s configure script to a
custom LLVM installation. This is especially felt on Windows, where only
Release builds are supported with Qt’s prebuilts. Also, on macOS,
Homebrew’s install location differs between Apple silicon and
Intel. Finally, on Linux, the presence of ClangConfig.cmake varies by
distro package.
This change restructures the section into clear “Installation Options”
and “Configuration” parts:
- Explicitly recommend Qt’s prebuilt LLVM/Clang packages as the
supported path used by Qt’s own builds.
- Add system package managers per platform, including Homebrew with
architecture-specific hints.
- Specify the need for ClangConfig.cmake.
- Reiterate that upstream LLVM prebuilts lack components QDoc needs.
- Add concrete configure examples using LLVM_INSTALL_DIR or
CMAKE_PREFIX_PATH.
- Remind users to reconfigure with FEATURE_clang=ON.
The aim of this change is to improve the documentation such that it
help users reduce guesswork and avoids common misconfigurations.
Task-number: QTBUG-137569
Pick-to: 6.10 6.9 6.8
Change-Id: Ia05e086331498006cd734aa38a6be7e4e1c59603
Reviewed-by: Safiyyah Moosa <[email protected]>
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
| |
As it's name suggests, \printline does _not_ print everything
'until the next non-blank line'. It just uses DocParser::getRestOfLine().
Pick-to: 6.9 6.10
Change-Id: Ie98669fcf494da89d8d159f5e645ced772b05da7
Reviewed-by: Paul Wicking <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, QDoc’s minimum and explicitly supported Clang versions were
defined in `.cmake.conf`, mixing tool-specific policy with repo-global
settings. These values also lived far from the QDoc configure logic and
messages that consume them.
This made updates easy to miss during QDoc changes and forced edits to
the top-level file for QDoc-only adjustments, adding noise to reviews.
This change introduces `src/qdoc/cmake/QDocConfiguration.cmake` and
moves QDOC_MINIMUM_CLANG_VERSION and QDOC_SUPPORTED_CLANG_VERSIONS
there. `configure.cmake` now includes this module alongside
`QDocConfigureMessages.cmake`, and the top-level definitions are
removed.
Behavior is unchanged. The configuration is now localized with the rest
of QDoc’s CMake logic, improving discoverability and making future edits
safer.
Task-number: QTBUG-137569
Pick-to: 6.10 6.9 6.8
Change-Id: I3ff0f8f1a9f19064b039c860adf6cae2e94aed47
Reviewed-by: Joerg Bornemann <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, QDoc configure warnings lived as a single generic string in
configure.cmake. Platform hints were embedded inside the report MESSAGE,
which CMake doesn't evaluate there, and related checks were scattered
across the file.
As a result, missing-dependency guidance was confusing or wrong. Users
saw the same text on all systems, and maintaining the QDoc checks and
messages was fragile.
This change introduces `src/qdoc/cmake/QDocConfigureMessages.cmake` and
moves platform detection out of report calls. The module generates the
complete text for clang, QmlPrivate, missing-feature, and minimum-clang
version warnings, and configure.cmake passes those strings to
qt_configure_add_report_entry. All QDoc-specific logic now lives in one
place, and behavior is preserved while the output becomes
platform-appropriate: Qt’s prebuilt LLVM on Windows, and Qt prebuilt or
Homebrew/distro packages on macOS and Linux.
Users now get clear, actionable instructions when QDoc dependencies are
missing; successful builds are unaffected.
Fixes: QTBUG-137569
Pick-to: 6.10 6.9 6.8
Change-Id: Ibde8410e219605532b2727c6c12f0a1341135079
Reviewed-by: Joerg Bornemann <[email protected]>
|
|
|
|
|
|
| |
Task-number: QTBUG-103757
Change-Id: I3f219574a9b9e5ef6fad35275eb0fbcd44dec20a
Reviewed-by: Ivan Solovev <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When generating documentation from snippets where the snippet markers
are more indented than the code they surround, QDoc strips away that
indentation unconditionally, causing the rendered snippet to lose its
natural formatting.
This change addresses this issue by ensuring that QDoc computes both
the marker's space-based indentation and the snippet's minimum content
indentation, then silently un-indents the snippet body to the smaller
of those two values. Only space characters are considered for
indentation normalization; tabs and other whitespace are ignored.
Markers that are already less indented than the content remain
untouched, such that generated documentation always preserves the
code's original structure regardless of marker placement.
Pick-to: 6.10
Task-number: QTBUG-138492
Fixes: QTBUG-138501
Change-Id: I4e3965a28d4448e1e8939bdc312478db8ff03a28
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add comprehensive documentation for the `Quoter::getLine()` function to
clarify that its behavior goes beyond simply retrieving a line.
The method consumes lines from both plain and marked line collections,
processes indentation removal based on the `unindent` parameter, handles
location tracking updates, and modifies internal state. This patch is an
attempt to help clarify the method's multifaceted role in snippet
processing and its side effects on the Quoter object's internal state.
Pick-to: 6.10
Task-number: QTBUG-138501
Change-Id: If754e924c9484a807a07a5a0dcbc2aecbbd4ecc1
Reviewed-by: David Boddie <[email protected]>
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
|
|
|
| |
There's a space in a C-style comment marker, and it breaks syntax
coloring in the generated output. Remove the space character.
Change-Id: I7f5f39efbbe6b65f78076d29023eb68b79191c42
Reviewed-by: Topi Reiniö <[email protected]>
Reviewed-by: David Boddie <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Turns out Location includes <climits> but I can't find that it's used.
Remove the unused include.
Change-Id: I54fb0aca33965d4ac58dcc6e51e2f7b00123033a
Reviewed-by: Topi Reiniö <[email protected]>
Reviewed-by: David Boddie <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For large documentation sets or in CI environments (e.g. COIN), warnings
can be numerous and scroll by too quickly to be useful. This makes it
cumbersome to systematically track and fix documentation issues.
This commit introduces a new configuration variable, `logwarnings`.
When set to `true` in a .qdocconf file, QDoc will write all warning
messages to a log file named `<project>-qdoc-warnings.log` in the
specified output directory. The warnings are also written to
stderr (existing behavior). As messages to stderr are flushed
immediately, the implementation doesn't continuously flush messages to
the warning log file.
To provide context for reproducibility, the command-line arguments
used to invoke QDoc are logged at the top of the file.
[ChangeLog][QDoc] QDoc can now write warnings to a file. To enable this
feature, set the configuration variable `logwarnings` to `true`.
Fixes: QTBUG-138811
Change-Id: If9d5d3ccd0d75265b317ce17370e99b2d418ed02
Reviewed-by: Topi Reiniö <[email protected]>
Reviewed-by: Kai Köhne <[email protected]>
|