Doc: Fix warnings and linking issues

Remove or replace links to examples that were removed or moved under
manual tests.

Replace code snippets that were quoting the now-missing examples.

Fix documentation of QSet::removeIf().

Fix typo in documentation macro: Unknown command '\examplecateogry'.

Add qtopengl, qtshadertools dependencies to Qt Widgets documentation
project to enable correct linking to those topics.

Mark all documentation sets in qtbase as free of warnings.

Pick-to: 6.6 6.5
Change-Id: I058cd5f2063aa933ea310bceff906f05422a7cb2
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
bb10
Topi Reinio 2023-09-06 13:05:41 +00:00
parent 64e1744a57
commit dc33b0ca7a
21 changed files with 65 additions and 26 deletions

View File

@ -42,3 +42,6 @@ imagedirs += images
navigation.landingpage = "Qt Concurrent"
navigation.cppclassespage = "Qt Concurrent C++ Classes"
# Enforce zero documentation warnings
warninglimit = 0

View File

@ -59,3 +59,6 @@ excludefiles += ../kernel/qtestsupport_core.cpp
navigation.landingpage = "Qt Core"
navigation.cppclassespage = "Qt Core C++ Classes"
# Enforce zero documentation warnings
warninglimit = 0

View File

@ -130,9 +130,6 @@
\snippet resource-system/main.cpp url
See the \l{mainwindows/mainwindow}{Mainwindow} example for an actual
application that uses Qt's resource system to store its icons.
\section1 Advanced Topics
\section2 Prefixes

View File

@ -94,6 +94,5 @@
optimization, you can use QBasicTimer instead of QTimer. With
QBasicTimer, you must reimplement
\l{QObject::timerEvent()}{timerEvent()} in your QObject subclass
and handle the timeout there. The \l{widgets/tetrix}{Tetrix}
example shows how to use QBasicTimer.
and handle the timeout there.
*/

View File

@ -980,8 +980,7 @@
\value WA_Hover Forces Qt to generate paint events when the mouse
enters or leaves the widget. This feature is typically used when
implementing custom styles; see the \l{widgets/styles}{Styles}
example for details.
implementing custom styles.
\value WA_InputMethodEnabled Enables input methods for Asian languages.
Must be set when creating custom text editing widgets.

View File

@ -2150,9 +2150,6 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
\codeline
\snippet settings/settings.cpp 21
See the \l{mainwindows/application}{Application} example for a
self-contained example that uses QSettings.
\section1 Accessing Settings from Multiple Threads or Processes Simultaneously
QSettings is \l{reentrant}. This means that you can use

View File

@ -1743,7 +1743,13 @@ QAbstractItemModel::~QAbstractItemModel()
For example:
\snippet ../widgets/itemviews/simpledommodel/dommodel.cpp 2
\code
int MyModel::columnCount(const QModelIndex &parent) const
{
Q_UNUSED(parent);
return 3;
}
\endcode
\note When implementing a table based model, columnCount() should return 0
when the parent is valid.

View File

@ -33,9 +33,6 @@ QT_BEGIN_NAMESPACE
can maintain a list of basic timers by holding them in container
that supports move-only types, e.g. std::vector.
The \l{widgets/tetrix}{Tetrix} example uses QBasicTimer to control
the rate at which pieces fall.
\sa QTimer, QTimerEvent, QObject::timerEvent(), Timers, {Affine Transformations}
*/

View File

@ -71,7 +71,7 @@ using namespace Qt::StringLiterals;
link to plugins statically. You can use QLibrary if you need to
load dynamic libraries in a statically linked application.
\sa QLibrary, {Plug & Paint Example}
\sa QLibrary, {Echo Plugin Example}
*/
static constexpr QLibrary::LoadHints defaultLoadHints = QLibrary::PreventUnloadHint;

View File

@ -887,11 +887,9 @@
any.
*/
/*! \fn template <class T> template <class Predicate> qsizetype QSet<T>::removeIf(Predicate pred)
\relates QSet
/*! \fn template <class T> template <class Pred> qsizetype QSet<T>::removeIf(Pred pred)
\since 6.1
Removes all elements for which the predicate \a pred returns true
from the set \a set. Returns the number of elements removed, if
any.
Removes, from this set, all elements for which the predicate \a pred
returns \c true. Returns the number of elements removed, if any.
*/

View File

@ -65,3 +65,6 @@ navigation.cppclassespage = "Qt D-Bus C++ Classes"
manifestmeta.thumbnail.names = "QtDBus/D-Bus Ping Pong" \
"QtDBus/D-Bus Complex Ping Pong"
# Enforce zero documentation warnings
warninglimit = 0

View File

@ -74,3 +74,6 @@ spurious += "Undocumented enum item '.*' in QGradient::Preset"
# \svgcolor {#ffdead}
macro.svgcolor.HTML = "<div style=\"padding:10px;color:#fff;background:\1;\"></div>"
macro.svgcolor.DocBook = "<db:phrase role=\"color:\1\">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</db:phrase>"
# Enforce zero documentation warnings
warninglimit = 0

View File

@ -335,7 +335,9 @@
For example, we can copy the contents of a QLineEdit to the clipboard
with the following code:
\snippet ../widgets/widgets/charactermap/mainwindow.cpp 11
\code
QGuiApplication::clipboard()->setText(lineEdit->text(), QClipboard::Clipboard);
\endcode
Data with different MIME types can also be put on the clipboard.
Construct a QMimeData object and set data with setData() function in
@ -364,8 +366,6 @@
\li \l{draganddrop/draggableicons}{Draggable Icons}
\li \l{draganddrop/draggabletext}{Draggable Text}
\li \l{draganddrop/dropsite}{Drop Site}
\li \l{draganddrop/fridgemagnets}{Fridge Magnets}
\li \l{draganddrop/puzzle}{Drag and Drop Puzzle}
\endlist
\section1 Interoperating with Other Applications

View File

@ -1154,7 +1154,7 @@ QStringList QIcon::themeSearchPaths()
The fallback search paths are consulted for standalone
icon files if the \l{themeName()}{current icon theme}
or \l{fallbackIconTheme()}{fallback icon theme} do
or \l{fallbackThemeName()}{fallback icon theme} do
not provide results for an icon lookup.
If not set, the fallback search paths will be defined
@ -1174,7 +1174,7 @@ QStringList QIcon::fallbackSearchPaths()
The fallback search paths are consulted for standalone
icon files if the \l{themeName()}{current icon theme}
or \l{fallbackIconTheme()}{fallback icon theme} do
or \l{fallbackThemeName()}{fallback icon theme} do
not provide results for an icon lookup.
For example:

View File

@ -39,3 +39,6 @@ imagedirs += images \
navigation.landingpage = "Qt Network"
navigation.cppclassespage = "Qt Network C++ Classes"
# Enforce zero documentation warnings
warninglimit = 0

View File

@ -63,3 +63,6 @@ qhp.QtOpenGL.subprojects.classes.sortPages = true
navigation.landingpage = "Qt OpenGL"
navigation.cppclassespage = "Qt OpenGL C++ Classes"
# Enforce zero documentation warnings
warninglimit = 0

View File

@ -40,3 +40,6 @@ imagedirs += images \
navigation.landingpage = "Qt Print Support"
navigation.cppclassespage = "Qt Print Support C++ Classes"
# Enforce zero documentation warnings
warninglimit = 0

View File

@ -39,3 +39,6 @@ imagedirs += images \
navigation.landingpage = "Qt SQL"
navigation.cppclassespage = "Qt SQL C++ Classes"
# Enforce zero documentation warnings
warninglimit = 0

View File

@ -55,3 +55,6 @@ manifestmeta.thumbnail.names = "QtTestLib/Chapter *"
navigation.landingpage = "Qt Test"
navigation.cppclassespage = "Qt Test C++ Classes"
# Enforce zero documentation warnings
warninglimit = 0

View File

@ -26,7 +26,20 @@ qhp.QtWidgets.subprojects.classes.sortPages = true
tagfile = ../../../doc/qtwidgets/qtwidgets.tags
depends += qtcore qtgui qtdoc qtsql qtdesigner qtquick qmake qtcmake qtsvg qtlinguist qthelp
depends += \
qtcore \
qtgui \
qtdoc \
qtsql \
qtdesigner \
qtquick \
qmake \
qtcmake \
qtsvg \
qtlinguist \
qthelp \
qtopengl \
qtshadertools
headerdirs += ..
@ -64,3 +77,6 @@ navigation.cppclassespage = "Qt Widgets C++ Classes"
manifestmeta.highlighted.names = \
"QtWidgets/Editable Tree Model Example" \
"QtWidgets/Menus Example"
# Enforce zero documentation warnings
warninglimit = 0

View File

@ -38,3 +38,6 @@ navigation.cppclassespage = "Qt XML C++ Classes"
# Add a thumbnail for examples that do not have images
manifestmeta.thumbnail.names = "QtXml/XML Stream Lint Example"
# Enforce zero documentation warnings
warninglimit = 0