Updated the macros in qtbase to propagate changes to other doc
projects. A separate change has been raised to handle multiple supported
ndks in prior LTSs
Task-number: QTQAINFRA-6479
Change-Id: Ic052f1b6b80473cc33c7f2be23049969d3cec0ee
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
We have divergence in the way we document function, operator and
constructor constraints. About half use \note, while the other
doesn't. Some say "if and only if" while others say just "participates
only if".
So add a qdoc macro, \constraints, to semantically mark up these
constraints. It expands to a section titled `Constraints`, and
uses a predefined sentence (prefix) for constraints.
Documentation for constraints is moved to the end of the comment
blocks to separate them from the rest of the text.
Apply them to all the standard-ish constraint documentation blocks
(grepped for "participate"). I didn't look for other, one-off, ways
documentation authors may have documented constraints, but I'm also
not aware of any.
Re-wrap lines only if the result fits into a single line.
As a drive-by, drop additional "if"s, as in "only if X and -if- Y" to
make the texts work with the `Constraints` section.
Fixes: QTBUG-106871
Pick-to: 6.9 6.8 6.5
Change-Id: I18c2f9f734474017264e49165389f8c9c7f34030
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
"Android" is trademarked and needs to be referenced in a certain way.
The following steps were taken:
-Created qdoc macro.
-Updated "Qt Android" and "Qt for Android" to use \Q4A in qdoc files.
The macro will need to be adopted in all documentation projects.
Task-number: QAA-2836
Pick-to: 6.9 6.8 6.5
Change-Id: I4b52247a4ed52047242a06404e6d3aa19de9c16c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This patch updates the macro AndroidBuildToolsVer to
version 35.0.1.
The version 35.0.1 is used elsewhere, see
b49421a984ac2b203b7995f3787b67184c990089
Amends: 9b475eadfcf04194a094454f65295c3a456000a4
Task-number: QTBUG-129462
Pick-to: 6.9 6.8 6.5
Change-Id: Ic15e12c563fa3d16315daa13b6f6b6ef19535954
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
The example configuration included a space character that caused a
syntax error parsing the .qdocconf.
Replace the hardcoded qhp `QtDoc` project name with a placeholder.
Pick-to: 6.9 6.8
Change-Id: Iadf3a50e030f02182016ed9832f4f59d29f82c57
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Commit e2ff9e3b9957 was adding Q_OBJECT as a qdoc macro to allow to mask
Q_OBJECT calls that are part of the documentation. Anyhow, while qdoc
does allow the underscore in the _definition_ of macros, it doesn't
allow it for the _invocation_. The questionable places should rather
use snippet files.
Fixes: QTBUG-130799
Pick-to: 6.8
Change-Id: I13bac0334b67ba7072946ab7d3f34c7a304c3f84
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
We have some patterns for how to document certain functions, but we
also vary the sentences a lot, and you have to look up one
documentation piece and copy it, essentially. If we ever want to
change them, we end up with shotgun surgery.
So apply DRY to the documentation and start a collection of macros to
help with repetitive C++ class documentation tasks.
The first macro is for member-swap(), and the first patch is for
documentation that used the traditional phrasing ("Swaps the X \a
other with this X.").
This doesn't change the documentation, except as follows:
* adds the "very fast and never fails" blurb, if it was missing
* changes the function's argument name to `other`, as required by
the macro.
Task-number: QTBUG-129573
Pick-to: 6.8 6.7 6.5 6.2
Change-Id: Ib494bd218334724b3b43796ba6f71fb52b83aa94
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
AGP 8.5.2 still throws a warning about not being tested
with Android 15 builds, now 8.6.0 is released and doesn't
have the warning.
Amends b5d8552f2baab56457d3f39f6b2915c72447b702.
Pick-to: 6.8
Fixes: QTBUG-128648
Task-number: QTBUG-126061
Change-Id: I3d7a4c9c184e1a81f0ebb9431a6e3ca9706d19e9
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
The previous description was too bare bones and did not allow further
processing of the file. The new implementation gives more information
and is consistent with what the standard xslTNG style sheets expect
(https://github.com/docbook/xslTNG/blob/2.2.0/src/test/resources/xml/mo-1/preface.xml). Previous versions of the style sheets do not support video embedding.
Change-Id: I1604858b6ad6254c4006470521a30cc0acd7b136
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
These macros generate a a three-column grid of items in online
documentation.
These make for a clutter-free and more visually pleasing result
in many cases, compared to a standard \table layout.
For compatibility reasons, these macros continue to output a table
structure in offline documentation builds.
Task-number: QTWEBSITE-1144
Change-Id: Iab994b383f488dbd225c6a04d64cf41e2dbb20e9
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Updated Gradle to 8.7
Updated AGP to 8.4.0
Updated same versions in examples and docs macros
Task-number: QTBUG-113383
Change-Id: Ib2e841f2e57e576c5d689a208a275ce5e9e4b80f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Bump the minimum supported Android API from 23 to 28 i.e.
Android Oreo 9. This is done to focus more and more on
recent versions.
Fixes: QTBUG-125023
Task-number: QTBUG-124890
Change-Id: I4d510b771f413e5711dd44de454211e019c63db6
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
This works better with the current Gradle 8.3 and supports
Android api 34 builds.
Task-number: QTBUG-106907
Change-Id: I816a1aa163a9aee0a5859872129cff62f81a2dea
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Added macros in the qtbase and qttools from the wiki page
Fixes: QTBUG-122652
Change-Id: Icb6892741a340ab3cba2ab596e7cbe69a88f22a0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Add the macro and set it to the current support range in 6.7 for
Android Automotive OS which is 10 to 13
Pick-to: 6.7
Change-Id: I4342a42f5f56ab9731c969d9cbe0d4291ec3eaf4
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Make sure this macro can be used in any documentation regarding the
Qt IntelliJ plugin for Android Studio.
Task-number: QTBUG-121447
Pick-to: 6.7
Change-Id: I764cd91ea4c1fc7897a9243729a1c6c553739ada
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
We don't format other product names, either.
Moved all product name macros to a separate section and
sorted them in alphabetic order.
Change-Id: I84cfd5a350b6e523e05371b809a49146b1c50769
Reviewed-by: Inkamari Harjula <inkamari.harjula@qt.io>
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Esa Törmänen <esa.tormanen@qt.io>
Add a macro for QML Language Server product name.
Pick-to: 6.7
Task-number: QTBUG-120980
Change-Id: I8b7196881a1c3777f975079c22ecbeb6f868f5a6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
To make it more maintainable and keep the docs up-to-date,
define most of the version numbers for various tools used
in Qt Android dev environment.
Task-number: QTBUG-115020
Pick-to: 6.7
Change-Id: I92aa52398b7700e90a0ffd39a1c40bb7a17c3658
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Adds a warning symbol.
Adds a note to the brief string.
Pick-to: 6.5 6.6
Change-Id: Ib036295bbcf7ab5eca7fd554fb2da836fedad8a0
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Added a template that we can use instead of rewriting the message for
every policy.
Pick-to: 6.6
Change-Id: I13cc182244d5f092e3d5677664bc149c6b126da5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Adding some Qt Design Studio macros for global
qtdoc use. This would ensure flexibility for
the documentation writing.
Pick-to: 5.15 6.5 6.6
Task-number: QDS-10142
Change-Id: Id61a68d124aad1b8c8f9e17358fb5990efbab5de
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
QDoc allows code-expanding macros to be defined so that the user can
abstract away common code in a simple to use command.
Furthermore, macros allows for a different expansion based on the
currently generated format so that format-specific requirements can be
satisfied when required.
When format specific expansions are provided, QDoc considers the
resulting text as if it should be generated verbatim.
The "\raisedaster" macro is used to generate an superscript asterisk.
The macro is provided for both HTML and DocBook.
As the macro has format-specific expansions, the expanded code will be
read verbatim.
Nonetheless, while the HTML expansion expands to actual HTML, the
DocBook expansion expands to an equivalent QDoc code, which will not be
generated correctly.
To avoid the issue, the DocBook version of "\raisedaster" is modified so
that it produces the correct DocBook code.
Change-Id: I3a37838bda885af42f8d93b86ec08126d7146ff9
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
QDoc allows code-expanding macros to be defined so that the user can
abstract away common code in a simple to use command.
Furthermore, macros allows for a different expansion based on the
currently generated format so that format-specific requirements can be
satisfied when required.
Due to a certain bug in QDoc, when generating the DocBook format, QDoc
would expand an HTML specific macro definition when a DocBook specific
one was not provided.
As this bug is now being fixed, the DocBook format will lose some of the
output that it was previously generating.
For example, the "\beginqdoc" and "\endqdoc" macros are defined, for
HTML, to expand to the beginning of block-comment text, "/*!" and ending
of block-comment text, "*/".
To avoid losing the usage of "\beginqdoc" and "\endqdoc`" when
generating DocBook, an equivalent expansion of the macro is now provided
for the DocBook format.
Change-Id: I45fb54f1f56077771c091323a69fd63e09a910eb
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
QDoc allows code-expanding macros to be defined so that the user can
abstract away common code in a simple to use command.
Furthermore, macros allows for a different expansion based on the
currently generated format so that format-specific requirements can be
satisfied when required.
Due to a certain bug in QDoc, when generating the DocBook format, QDoc
would expand an HTML specific macro definition when a DocBook specific
one was not provided.
As this bug is now being fixed, the DocBook format will lose some of the
output that it was previously generating.
For example, the "\youtube" macro is defined, for HTML, so that a
youtube video can be embedded by reference.
To avoid losing the usage of "\youtube" when generating DocBook, an
equivalent version expansion of the macro is now provided for the
DocBook format.
Change-Id: Id74155f2c30b80b5f4490f8451cd8d00535806d6
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Argument passed to the \ingroup command should not be wrapped in
braces as it's read as-is.
Pick-to: 6.5
Task-number: QTBUG-111891
Change-Id: Ic759af37e8b7e9f60651103b395fdd7e630779c6
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Examples in Qt's codebase must be tagged with specific categories
such that Qt Creator can group them thematically. This can be done
by way of using the `\meta category` construct in QDoc.
At the same time, we want the generated documentation to group the
examples by the same logic as in Qt Creator. Hence, QDoc was modified
to implicitly add a group for each category that is used in a
`meta category` invocation.
By design, QDoc exposes ways to list groups to users, but no way to list
the \meta command invocations. Letting QDoc implicitly add a group for
categories passed to the \meta command as a side-effect, therefore breaks
with the principle of least surprise and the single responsibility
principle.
An alternative solution makes use of QDoc's existing support for code
generation through macros. This patch introduces the macro
`\examplecategory` as a global macro throughout Qt to achieve the same
effect as the aforementioned change to QDoc. The macro takes an argument
enclosed in curly braces. This argument is the example category name. It's
used as meta information in the manifest files consumed by Qt Creator, and
added as the category group name for the QDoc side at the same time.
The introduction of this macro allows reverting the change to QDoc
itself, while maintaining feature parity for both Qt Creator and the
generated content.
Task-number: QTBUG-111891
Pick-to: 6.5
Change-Id: I311b98168253b45ac456ff3c1824db3d835191a9
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
The same kind of line is required for DocBook as HTML or QHP. This
change makes that requirement clear.
It was suggested by Nicholas Bennett in a change in existing
configuration for this exact line.
Change-Id: I664300f229bac9931c6f1ac4a08bd7c8c42bf37c
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Both INITIAL_MEMORY and PTHREAD_POOL_SIZE are settings users can
change, they are not interface settings.
Fixes: QTBUG-100693
Pick-to: 6.3 6.2
Change-Id: Ie1547c7f52c9fe109a313260616705728024b6b8
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
Introduce the qdoc macros \cmakecommandsince, \cmakepropertysince, and
\cmakevariablesince that insert a paragraph akin to the \since context
command.
Example:
\cmakecommandsince 6.3
produces the paragraph
This command was introduced in Qt 6.3
The macro text is wrapped in \n\n to ensure that we always generate a
new paragraph.
Pick-to: 6.2 6.3
Task-number: QTBUG-100212
Change-Id: Id5c8e8812e6b0b915674d108a0e775091e9eacd8
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This macro expands to the major version of Qt, complementing the
already existing \QtMinorVersion macro.
Pick-to: 6.2 5.15
Change-Id: I64861f8cc50d73f34369311a19b5e554645a4127
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
The macro takes only one parameter, sentences must be wrapped in {}.
Pick-to: 6.2
Fixes: QTBUG-97441
Change-Id: I7177548a32a67d720c2b551d16c09d898b0fda51
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
For normal \page elements, \brief is just showing in the
\generatelist or \annotatedlist commands. Make sure the description
is also visible in the actual CMake command/variable/property
page by defining a \summary macro.
Pick-to: 6.2
Change-Id: I12bc854d547059a2f6309a5922bb0b2a36d4e41c
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
When documenting a CMake command, document the unversioned command
'qt_foo' and use '\versionlessCMakeCommandNote qt6_foo' to refer to the
versioned command. This avoids duplicating the command signature.
Use the new macro where applicable.
Pick-to: 6.2
Task-number: QTBUG-95796
Change-Id: I2e4180fbda0b89acf3d8c036459f591eb2f46475
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The vspan was originally added for iframes. They are not needed
(and look weird) for normal images/links.
Pick-to: 6.1
Fixes: QTBUG-92266
Change-Id: I9da2b52234b2e49bc0cdef4bf8f0865fb092bb31
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
There are still other parts of the CMake API that are not yet
documented. This change only addresses qt_add_executable() and the
Android-related commands it uses.
Fixes: QTBUG-88839
Task-number: QTBUG-84482
Pick-to: 6.0
Change-Id: I761b5ce908d1f62284baabe2d414cd37a0efe83d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Unlike the QTextBrowser backend, litehtml does not render elements
inside <iframe> correctly. This prevented external links to
YouTube from working in offline documentation.
Move the <iframe> to a macro override specific to online doc builds.
Pick-to: 6.0 6.0.0
Fixes: QTBUG-88975
Change-Id: Iff7828ddeed353620eaa9ac669a3e0c03749daa2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Drop deprecation warnings for now-dropped items
* Use the 'qt6' define and a new \nothing doc macro to conditionally
document items on Qt 6
* Add a custom module header for docs that pulls in also Vulkan headers
* Add \internal command for internal classes/functions
* Move QtGUI-related code snippets from widgets to gui docs
Change-Id: Ieb386b96631a49568d09059906d307c45c01d93a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>