* Fix references to Wait Conditions Example, Semaphores Example, and
MIME Type Browser Example as they were renamed.
* Rename 'Shared Memory' example as its title clashes with
the title of another page (sharedmemory.html).
src/corelib/global/qfloat16.cpp:
* warning: Invalid '\relates' (already a member of 'qfloat16')
Pick-to: 6.5 6.6
Change-Id: Ia28be8e3882a7ad1fadcdbd50a657705d58526bd
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
The latest XDG spec (0.8) defines XDG_STATE_HOME that does not exist
in QStandardPaths::StandardLocation.
Some Linux distributions clean XDG_CACHE_HOME on restart which makes
XDG_STATE_HOME useful as a path for saving application state.
This commit adds StateLocation and GenericStateLocation to serve as a
StandardLocation for XDG_STATE_HOME for all platforms.
This commit also updates docs and tests to fit the new changes.
[ChangeLog][QStandardPaths] Added StateLocation &
GenericStateLocation to StandardLocation
Change-Id: I470602466c37f085062cc64d15ea243711728fa5
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
The /coin directory is not installed, so trying to include a .qdocconf file using a relative path from an (installed) global configuration will fail.
Task-number: QTBUG-113326
Change-Id: I761b1a7eb19ca9d6a768f1367e30d5eaf80cb816
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
The most common limit for the maximum number of allowed documentation
warnings is zero. Use a global value for 'warninglimit', adopted by
all Qt module documentation projects that include the configuration
from qtbase/doc/global.
This allows for a temporary increase of the limit across all modules as
needed - for example, when updating the QDoc binary that the CI
provisions to a version that introduces new types of documentation
warnings.
Increase this base limit temporarily to 10 to help re-enable
documentation testing in CI as it's currently disabled.
Task-number: QTBUG-113326
Change-Id: I8b66951ca9324bcfaec3b5a7ec2cff544c62feb0
Reviewed-by: Paul Wicking <paul.wicking@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>
By default QDoc writes filePath attributes for each entry in the
.index file it generates. The attribute value is an absolute path
that's only relevant or useful for debugging purposes.
Pick-to: 6.6 6.5
Change-Id: I3bc646104af74b67c74350912359cf65ac252992
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 "\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>
By setting 'qhp' to true, QDoc will warn if qhp configuration is not
provided.
Pick-to: 6.6 6.5
Task-number: QTBUG-114181
Change-Id: I26bce80e888d0b0bd270ecdcc6c0774298076a4b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
With 6e77da640aa84c1efe330d4a5224c9c7425ece57, the documentviewer
demo's TxtViewer plugin has been fully documented in order to replace
the Application example.
This patch moves the application example to manual tests.
Pick-to: 6.5
Change-Id: I67d975e478c7bc840613c8af1301a4eafe8f1a42
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
It adds nothing new to what the trivial and license wizard examples
show, other than a bunch of somewhat messy and outdated code to generate
C++ code files based on the input.
The example is referenced in a few parts of the documentation, but there
are equivalent snippets in the trivial and license wizard examples, so
point at those instead, and add some relevant API usage where needed.
Pick-to: 6.5
Change-Id: If1ff57e775bad28920d9e019aeccae69d1f4d127
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Refresh screenshot of the example, and remove "Example" word from title.
Pick-to: 6.5
Change-Id: I88c00db5b25536c45622bc580a9da5aaf01610bc
Reviewed-by: Liang Qi <liang.qi@qt.io>
QDoc adds a 'Status' field to the table on top of type reference pages.
One common status for Qt modules/types is 'Technical preview'. Add
an icon that is displayed next to the status description, highlighting
the fact that the type is in tech. preview and therefore subject to
change.
Pick-to: 6.5
Task-number: QTBUG-113026
Change-Id: Ibe6ca2a562cc7810fe27e7dcf514c711cd022894
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
There are two examples for Camera in Multimedia module. One of them is
using widgets, while the second one is QML based.
In such case the QML example is preferred for Android platform. That is
why only QML example should have android tag.
This commit remove android tag from qtMultimedia Widget Camera example.
Fixes: QTBUG-113238
Change-Id: I9d2c072fcc18e8e5a5a44a9a2da887a7b6660b46
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
It's unlikely we will ever use pro2cmake at this project stage,
so it doesn't make any sense to keep the 'special case' markers
in the CMake scripts. Remove them and replace with TODO where
needed.
Change-Id: I84290c20679dabbfdec3c5937ce0428fecb3e5a7
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@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>
It doesn't showcase anything interesting that other examples
don't already show off.
Pick-to: 6.5
Change-Id: Ie95c3ddb3ff52b3beab54bd6fa75fb75ae5c7ba5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
The previous example finished way too quickly and provided no real
value in regards to API understanding. Previously, QtConcurrent::map
was used, which was also used in other examples. We are now using
QtConcurrent::filterReduce to demonstrate other functionality.
Task-number: QTBUG-111165
Pick-to: 6.5 6.5.0
Change-Id: Ibd6eb119d0711cddfe8b211d460e9d67d6ce95c3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Added a QFileDialog to let the user select a path. Before, the path
was statically assigned with "../../" , which is not optimal.
I also modified the findFiles function to check for text files in
general and not only *.cpp and *.h files. Lastly the result of the
word counting is now displayed on the console, as I think this is an
informative output from this example.
Task-number: QTBUG-111165
Pick-to: 6.5 6.5.0
Change-Id: Ie27c6acb4f79a78e3bef141edb92de08901fde71
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Removed side panel and swipe to remove examples as part of patchset
3bc6f344a8f10699313c3e0c9236dd6945edd895 and updated docs to reflect
that change.
Fixes: QTBUG-110989
Pick-to: 6.5.0
Change-Id: I6241dd9842b1584e3dd25057591fe29eaa34d579
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
It is essentially the same as the other mainwindow examples, showing
how to create a text editor. The only special code here is the tiling of
the different main windows, which - without any documentation or
explanation - is neither very helpful, nor relevant in 2023.
Pick-to: 6.5
Change-Id: I48b92b1cf057f586e0d2842d1c0a3312154e9a13
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
All QtQuickControls examples are marked for android by default.
However, the To Do List example is iOS specific so don't include it.
Add it to the list of iOS tags instead.
Fixes: QTBUG-111426
Pick-to: 6.5 6.4
Change-Id: Ic89d6b40d263f81ed402a2064f2e44b2fa826940
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
qdoc does ignore image directories if no file with 'known' suffix
is found.
[ChangeLog][qdoc] *.webp has been added to the list of default image
suffixes.
Pick-to: 6.5
Change-Id: I49524ea13d14dd7e246401dec7deb2ba4e66cb07
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
The bearer code hasn't been in Qt for some years.
Pick-to: 6.5 6.4 6.2
Change-Id: Id69ad1ce5035a0970f3507d4b6ba4a5549bf1d6c
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
It's not a very well written example, using (largely unneed) hacks to
implement what it does. It's also misleading - the syntaxhighlighter
example is a better showcase for building a useful code editor.
Move it to manual tests.
Fixes: QTBUG-111025
Pick-to: 6.5
Change-Id: I405d41688235bf3e9a08373e716769f26d02fec6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The example follows bad and outdated practices:
- running time consuming and I/O heavy workload in the GUI thread
- calling processEvents to keep the UI responsive
- showing results only at the end of a search rather than continuously
Perhaps this example can be rewritten at some point to apply modern
practices (at least use a thread and emit signals), but it seems
to have low overall educational value.
Moving it to be a manual test for now.
Fixes: QTBUG-111002
Pick-to: 6.5
Change-Id: Id630fd4599096448ea4f96bcbf977b11a039796f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The example is 90% boiler plate for subclassing QFrame and providing
a bit of GUI to change the size of the label using sliders. The
interesting bit is a block of 25 lines of code, so turn those into a
snippet and add that to the QTextLayout overview documentation.
Fixes: QTBUG-111011
Pick-to: 6.5
Change-Id: I6e97b2ea47b553c8d998ad185cfac006721ef7ee
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This is almost exactly the same as the "Analog Clock" (widget) example.
"Analog Clock Window Example" demonstrates:
* How to render to a QWindow (covered by RasterWindow example)
* QPainter and transformations (covered by Analog Clock example)
* How to use QTimer (covered by Analog Clock example)
Pick-to: 6.5
Change-Id: I7f20a29798830ed6345eca250e4139cb314cab84
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
It demonstrates timerEvent() and some QFontMetrics
There are other examples that demonstrates this
Pick-to: 6.5
Change-Id: I4ad6f30c8ef93c995f980545ed88ab13b9aa9c7d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
We only support Qt 5.15 since a while, so the detailed information in
which Qt 5 version a particular class, function, or enum was introduced
is becoming less and less relevant.
Pick-to: 6.5
Change-Id: I39bd579f23abc0ac84879e9bd22e6a97651ef7c3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>