Doc: Fix documentation warnings

There were a lot of documentation warnings introduced by the
separation of QtQml.Models and QtQml.WorkerScript modules
from the QtQml documentation project into their own
sub-projects.

Fix the above, and also ensure that the experimental
Qt.labs.qmlmodels QML types are listed in the documentation,
and add them also on the QML module page for QtQml.Models.

A few warnings remain, they may be indicative of issues
not in the scope of this commit.

Fixes: QTBUG-79812
Change-Id: Idc25c976e4c96feab4aae893519d6c9245f57a64
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This commit is contained in:
Topi Reinio 2019-11-08 00:48:05 +01:00 committed by Topi Reiniö
parent 06fa6ef1b9
commit 13d7517c0e
27 changed files with 65 additions and 56 deletions

View File

@ -29,7 +29,7 @@
\example scenegraph/metaltextureimport
\title Scene Graph - Metal Texture Import
\ingroup qtquickexamples
\brief Shows how to use a texture created directly with Metal
\brief Shows how to use a texture created directly with Metal.
\image metaltextureimport-example.jpg

View File

@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
\qmlmodule Qt.labs.qmlmodels 1.0
\title Qt QML Models experimental QML Types
\ingroup qmlmodules
\brief Provides QML experimental types for data models
\brief Provides QML experimental types for data models.
\since 5.12
This QML module contains experimental QML types related to data models.

View File

@ -59,8 +59,23 @@ QT_BEGIN_NAMESPACE
import QtQml.Models 2.\1
\endqml
Note that QtQml.Models module started at version 2.1 to match the version
\note QtQml.Models module started at version 2.1 to match the version
of the parent module, \l{Qt QML}.
In addition, Qt.labs.qmlmodels provides experimental QML types for models.
To use these experimental types, import the module with the following line:
\qml
import Qt.labs.qmlmodels 1.0
\endqml
\section1 QML Types
\generatelist qmltypesbymodule QtQml.Models
\section1 Experimental QML Types
\generatelist qmltypesbymodule Qt.labs.qmlmodels
\noautolist
*/

View File

@ -43,7 +43,7 @@
QT_BEGIN_NAMESPACE
/*!
\qmltype Shape
\qmltype ParticleExtruder
\instantiates QQuickParticleExtruder
\inqmlmodule QtQuick.Particles
\brief For specifying an area for affectors and emitters.

View File

@ -34,20 +34,14 @@ qhp.QtQml.subprojects.qmltypes.sortPages = true
tagfile = ../../../doc/qtqml/qtqml.tags
depends += qtcore qtgui qtquick qtdoc qtlinguist qmake qtscript qtwidgets qtxmlpatterns qtquickcontrols
depends += qtcore qtqmlmodels qtqmlworkerscript qtgui qtquick qtdoc qtlinguist qmake qtscript qtwidgets qtxmlpatterns qtquickcontrols
headerdirs += .. \
../../imports/models \
../../qmlmodels \
../../qml \
../../qmlworkerscript
../../qml
sourcedirs += .. \
../../imports/models \
../../imports/statemachine \
../../qmlmodels \
../../qml \
../../qmlworkerscript
../../qml
exampledirs += ../../../examples/qml \
../ \

View File

@ -275,6 +275,7 @@
/*!
\fn int qmlRegisterAnonymousType(const char *uri, int versionMajor)
\relates QQmlEngine
This template function registers the C++ type in the QML system as an anonymous type. The
resulting QML type does not have a name. Therefore, instances of this type cannot be created from

View File

@ -102,13 +102,10 @@ QUrl QQmlExtensionPlugin::baseUrl() const
}
/*!
\fn void QQmlExtensionPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
Initializes the extension from the \a uri using the \a engine. Here an application
plugin might, for example, expose some data or objects to QML,
as context properties on the engine's root context.
*/
void QQmlExtensionPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
{
Q_UNUSED(engine);

View File

@ -57,7 +57,6 @@ QT_BEGIN_NAMESPACE
/*!
\fn QQmlInfo QtQml::qmlDebug(const QObject *object)
\relates QtQml
\since 5.9
Prints debug messages that include the file and line number for the
@ -91,7 +90,6 @@ QT_BEGIN_NAMESPACE
/*!
\fn QQmlInfo QtQml::qmlInfo(const QObject *object)
\relates QtQml
Prints informational messages that include the file and line number for the
specified QML \a object.
@ -119,7 +117,6 @@ QT_BEGIN_NAMESPACE
/*!
\fn QQmlInfo QtQml::qmlWarning(const QObject *object)
\relates QtQml
\since 5.9
Prints warning messages that include the file and line number for the

View File

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 347 B

After

Width:  |  Height:  |  Size: 347 B

View File

@ -23,15 +23,18 @@ qhp.QtQmlModels.sortPages = true
tagfile = qtqmlmodels.tags
depends += qtcore qtqml qtdoc
depends += qtcore qtqml qtquick qtdoc qtqmlworkerscript qtquickcontrols qtxmlpatterns
headerdirs += ..
headerdirs += .. \
../../imports/labsmodels
sourcedirs += .. \
../../imports/models
../../imports/models \
../../imports/labsmodels
exampledirs += ../../../examples/qml \
../ \
exampledirs += .. \
snippets
imagedirs += images
navigation.qmltypespage = "Qt Qml Models QML Types"

View File

@ -1905,11 +1905,11 @@ void DynamicRoleModelNodeMetaObject::propertyWritten(int index)
Here is an example that uses WorkerScript to periodically append the
current time to a list model:
\snippet ../quick/threading/threadedlistmodel/timedisplay.qml 0
\snippet ../../examples/quick/threading/threadedlistmodel/timedisplay.qml 0
The included file, \tt dataloader.mjs, looks like this:
\snippet ../quick/threading/threadedlistmodel/dataloader.mjs 0
\snippet ../../examples/quick/threading/threadedlistmodel/dataloader.mjs 0
The timer in the main example sends messages to the worker script by calling
\l WorkerScript::sendMessage(). When this message is received,

View File

@ -23,15 +23,13 @@ qhp.QtQmlWorkerScript.sortPages = true
tagfile = qtqmlworkerscript.tags
depends += qtcore qtqml qtdoc
depends += qtcore qtqml qtquick qtdoc
headerdirs += ..
sourcedirs += .. \
../../imports/workerscript
exampledirs += ../../../examples/qml \
../ \
snippets
exampledirs += snippets
navigation.qmltypespage = "Qt Qml WorkerScript QML Types"

View File

@ -38,7 +38,7 @@ qhp.QtQuick.subprojects.examples.selectors = fake:example
tagfile = ../../../doc/qtquick/qtquick.tags
depends += qtcore qtqml qtqmltest qtgui qtlinguist qtquickcontrols qtquickcontrols1 qtdoc qtquickdialogs qtsensors qtwidgets qmake qtmultimedia qtgraphicaleffects qtsql qtxmlpatterns
depends += qtcore qtqml qtqmlmodels qtqmltest qtgui qtlinguist qtquickcontrols qtquickcontrols1 qtdoc qtquickdialogs qtsensors qtwidgets qmake qtmultimedia qtgraphicaleffects qtsql qtxmlpatterns
headerdirs += ..\
../../quick \
@ -70,6 +70,9 @@ sourcedirs += ../../plugins
#exclude certain directories
excludedirs += ../../imports/models \
../../imports/labsmodels \
../../imports/testlib \
../../imports/workerscript \
../../imports/statemachine
excludefiles += ../util/qquickpropertychanges_p.h

View File

@ -3,4 +3,4 @@ find_package(Qt5 COMPONENTS Quick QmlImportScanner)
add_executable(myapp main.cpp)
target_link_libraries(myapp Qt5::Quick)
qt5_import_qml_plugins(myapp)
#! [qt5_import_plugins]
#! [qt5_import_qml_plugins]

View File

@ -55,7 +55,7 @@ appropriate for the various graphics APIs.
Unlike \c software or \c d3d12, the RHI-based renderer is not an additional
adaptation, and is always built-in. As of Qt 5.14 it can be enabled by setting
the environment variable \c{QSG_RHI} to a non-zero value before starting the
application, or via \l QQuickWindow::setScenegraphBackend() in combination with
application, or via \l QQuickWindow::setSceneGraphBackend() in combination with
\l QSGRendererInterface::GraphicsApi. When none of this is done, OpenGL is used
directly like in previous versions.

View File

@ -49,6 +49,7 @@ Q_LOGGING_CATEGORY(lcWheelHandler, "qt.quick.handler.wheel")
/*!
\qmltype WheelHandler
\instantiates QQuickWheelHandler
\inherits SinglePointHandler
\inqmlmodule QtQuick
\ingroup qtquick-input-handlers
\brief Handler for the mouse wheel.
@ -71,7 +72,7 @@ Q_LOGGING_CATEGORY(lcWheelHandler, "qt.quick.handler.wheel")
\snippet pointerHandlers/handlerFlick.qml 0
Alternatively if \l targetProperty is not set or \l target is null,
Alternatively, if \l property is not set or \l target is null,
WheelHandler will not automatically manipulate anything; but the
\l rotation property can be used in a binding to manipulate another
property, or you can implement \c onWheel and handle the wheel event
@ -79,15 +80,16 @@ Q_LOGGING_CATEGORY(lcWheelHandler, "qt.quick.handler.wheel")
WheelHandler handles only a rotating mouse wheel by default.
Optionally it can handle smooth-scrolling events from touchpad gestures,
by setting \l acceptedDevices to \c{PointerDevice.Mouse | PointerDevice.TouchPad}.
by setting \l {QtQuick::PointerDeviceHandler::}{acceptedDevices} to
\c{PointerDevice.Mouse | PointerDevice.TouchPad}.
\note Some non-mouse hardware (such as a touch-sensitive Wacom tablet, or
a Linux laptop touchpad) generates real wheel events from gestures.
WheelHandler will respond to those events as wheel events regardless of the
setting of the \l acceptedDevices property.
setting of the \l {QtQuick::PointerDeviceHandler::}{acceptedDevices}
property.
\sa MouseArea
\sa Flickable
\sa MouseArea, Flickable
*/
QQuickWheelHandler::QQuickWheelHandler(QQuickItem *parent)
@ -125,13 +127,13 @@ void QQuickWheelHandler::setOrientation(Qt::Orientation orientation)
\qmlproperty bool QtQuick::WheelHandler::invertible
Whether or not to reverse the direction of property change if
\l QQuickPointerScrollEvent::inverted is true. The default is \c true.
QQuickPointerScrollEvent::inverted is true. The default is \c true.
If the operating system has a "natural scrolling" setting that causes
scrolling to be in the same direction as the finger movement, then if this
property is set to \c true, and WheelHandler is directly setting a property
on \l target, the direction of movement will correspond to the system setting.
If this property is set to \l false, it will invert the \l rotation so that
If this property is set to \c false, it will invert the \l rotation so that
the direction of motion is always the same as the direction of finger movement.
*/
bool QQuickWheelHandler::isInvertible() const

View File

@ -2074,10 +2074,10 @@ void QQuickItemPrivate::updateSubFocusItem(QQuickItem *scope, bool focus)
in the GPU equal to \c {width x height x 4}. In memory constrained
configurations, large layers should be used with care.
In the QPainter / QWidget world, it is some times favorable to
In the QPainter / QWidget world, it is sometimes favorable to
cache complex content in a pixmap, image or texture. In Qt Quick,
because of the techniques already applied by the \l {Qt Quick
Scene Graph OpenGL Renderer} {scene graph renderer}, this will in most
Scene Graph Default Renderer} {scene graph renderer}, this will in most
cases not be the case. Excessive draw calls are already reduced
because of batching and a cache will in most cases end up blending
more pixels than the original content. The overhead of rendering

View File

@ -2078,7 +2078,7 @@ QQuickListView::~QQuickListView()
highlight item is \c 0.
\sa highlightItem, highlightFollowsCurrentItem,
{Qt Quick Examples - Views#Highlight}{ListView highlight example},
{Qt Quick Examples - Views#Using Highlight}{ListView Highlight Example},
{Stacking Order in ListView}
*/

View File

@ -240,13 +240,12 @@ void QQuickView::setSource(const QUrl& url)
}
/*!
Sets the initial properties with which the QML component gets initialized after
calling \l QQuickView::setSource.
Sets the initial properties \a initialProperties with which the QML
component gets initialized after calling \l QQuickView::setSource().
\note You can only use this function to initialize top-level properties.
Note that you can only use this function to initialize toplevel properties.
\sa QQmlComponent::createWithInitialProperties
\sa QQmlComponent::createWithInitialProperties()
\since 5.14
*/
void QQuickView::setInitialProperties(const QVariantMap &initialProperties)

View File

@ -4592,7 +4592,7 @@ QSGTexture *QQuickWindow::createTextureFromId(uint id, const QSize &size, Create
\a nativeLayout is only used for APIs like Vulkan. When applicable, it must
specify the current image layout, such as, a VkImageLayout value.
\sa sceneGraphInitialized(), QSGTextures
\sa sceneGraphInitialized(), QSGTexture
\since 5.14
*/

View File

@ -319,7 +319,7 @@ bool QSGMaterialRhiShader::updateUniformData(RenderState &state,
each variable in the material's shaders'
\l{QShaderDescription::combinedImageSamplers()}.
When \c{*texture} is null, it must be set to a QSGTexture pointer before
When *\a{texture} is null, it must be set to a QSGTexture pointer before
returning. When non-null, it is up to the material to decide if a new
\c{QSGTexture *} is stored to it, or if it updates some parameters on the
already known QSGTexture. The ownership of the QSGTexture is not

View File

@ -701,8 +701,8 @@ void QSGTexture::updateBindOptions(bool force) // legacy (GL-only)
data (for example, because there was no setImage() since the last call to
this function), the function does nothing.
Materials involving textures are expected to call this function from their
updateSampledImage() implementation, typically without any conditions.
Materials involving \a rhi textures are expected to call this function from
their updateSampledImage() implementation, typically without any conditions.
\note This function is only used when running the graphics API independent
rendering path of the scene graph.

View File

@ -918,7 +918,7 @@ QPointF QQuickPath::backwardsPointAt(const QPainterPath &path, const qreal &path
When curves are present, the percentage argument is mapped to the \c t
parameter of the Bezier equations.
\sa QPainterPath::pointAt
\sa QPainterPath::pointAtPercent()
\since QtQuick 2.14
*/
@ -2370,8 +2370,8 @@ void QQuickPathPercent::setValue(qreal value)
The example below creates a triangular path consisting of four vertices
on the edge of the containing Shape's bounding box.
Through the containing shape's \l scale property, the path will be
rescaled together with its containing shape.
Through the containing shape's \l {QtQuick::Path::}{scale} property,
the path will be rescaled together with its containing shape.
\qml
PathPolyline {
@ -2488,7 +2488,7 @@ void QQuickPathPolyline::addToPath(QPainterPath &path, const QQuickPathData &/*d
The example below creates a high voltage symbol by adding each path
of the symbol to the list of paths.
The coordinates of the vertices are normalized, and through the containing shape's
\l scale property, the path will be rescaled together with its containing shape.
\l {QtQuick::Path::}{scale} property, the path will be rescaled together with its containing shape.
\qml
PathMultiline {