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().

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

Pick-to: 6.5
Change-Id: I058cd5f2063aa933ea310bceff906f05422a7cb2
(cherry picked from commit dc33b0ca7a680713552063d7f74befea53f34814)
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Topi Reinio 2023-09-06 13:05:41 +00:00
parent bee9f8be26
commit 05390e0d23
11 changed files with 32 additions and 26 deletions

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

@ -2122,9 +2122,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

@ -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

@ -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 += ..