diff options
author | Topi Reinio <topi.reinio@qt.io> | 2019-07-18 15:18:31 +0200 |
---|---|---|
committer | Topi Reinio <topi.reinio@qt.io> | 2019-08-29 13:04:58 +0200 |
commit | 1dc3f4c24583e14dee3c5fa650a8ac239b953458 (patch) | |
tree | bae8b90629c3215ec254221388aad85813237b32 /src/quick/items/context2d/qquickcanvasitem.cpp | |
parent | da04b1d716617fbe4a2d93dc5a51f38dbd03a5b8 (diff) |
Doc: Fix documentation warnings for qtdeclarative
After recent changes to QDoc, it now correctly warns about missing
documentation for QML method parameters - fix all of these and also
do some minor language editing.
Remove duplicated entries for
- \qmlmodule Qt.labs.qmlmodels
- \group qtjavascript
as they were causing issues.
Change-Id: I55cd670cc8a0cc6427cdb7945dbd7c28ea94f796
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quick/items/context2d/qquickcanvasitem.cpp')
-rw-r--r-- | src/quick/items/context2d/qquickcanvasitem.cpp | 58 |
1 files changed, 32 insertions, 26 deletions
diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 14443a2f2f..3462b0dbac 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -850,13 +850,15 @@ QSGTextureProvider *QQuickCanvasItem::textureProvider() const The \a contextId parameter names the required context. The Canvas item will return a context that implements the required drawing mode. After the first call to getContext, any subsequent call to getContext with the same - contextId will return the same context object. + contextId will return the same context object. Any additional arguments + (\a args) are currently ignored. If the context type is not supported or the canvas has previously been requested to provide a different and incompatible context type, \c null will be returned. Canvas only supports a 2d context. + */ void QQuickCanvasItem::getContext(QQmlV4Function *args) @@ -899,7 +901,7 @@ void QQuickCanvasItem::getContext(QQmlV4Function *args) /*! \qmlmethod int QtQuick::Canvas::requestAnimationFrame(callback) - This function schedules callback to be invoked before composing the Qt Quick + This function schedules \a callback to be invoked before composing the Qt Quick scene. */ @@ -962,7 +964,7 @@ void QQuickCanvasItem::requestPaint() /*! \qmlmethod QtQuick::Canvas::markDirty(rect area) - Mark the given \a area as dirty, so that when this area is visible the + Marks the given \a area as dirty, so that when this area is visible the canvas renderer will redraw it. This will trigger the \c paint signal. \sa paint, requestPaint() @@ -986,16 +988,16 @@ void QQuickCanvasItem::checkAnimationCallbacks() } /*! - \qmlmethod bool QtQuick::Canvas::save(string filename) + \qmlmethod bool QtQuick::Canvas::save(string filename) - Save the current canvas content into an image file \a filename. - The saved image format is automatically decided by the \a filename's - suffix. + Saves the current canvas content into an image file \a filename. + The saved image format is automatically decided by the \a filename's + suffix. Returns \c true on success. - Note: calling this method will force painting the whole canvas, not just the - current canvas visible window. + \note Calling this method will force painting the whole canvas, not just the + current canvas visible window. - \sa canvasWindow, canvasSize, toDataURL() + \sa canvasWindow, canvasSize, toDataURL() */ bool QQuickCanvasItem::save(const QString &filename) const { @@ -1025,15 +1027,17 @@ QQmlRefPointer<QQuickCanvasPixmap> QQuickCanvasItem::loadedPixmap(const QUrl& ur */ /*! - \qmlmethod QtQuick::Canvas::loadImage(url image) - Loads the given \c image asynchronously. + \qmlmethod QtQuick::Canvas::loadImage(url image) + + Loads the given \a image asynchronously. - When the image is ready, \l imageLoaded will be emitted. - The loaded image can be unloaded by the unloadImage() method. + Once the image is ready, imageLoaded() signal will be emitted. + The loaded image can be unloaded with the unloadImage() method. - Note: Only loaded images can be painted on the Canvas item. - \sa unloadImage, imageLoaded, isImageLoaded(), - Context2D::createImageData(), Context2D::drawImage() + \note Only loaded images can be painted on the Canvas item. + + \sa unloadImage(), imageLoaded(), isImageLoaded(), + Context2D::createImageData(), Context2D::drawImage() */ void QQuickCanvasItem::loadImage(const QUrl& url) { @@ -1053,14 +1057,15 @@ void QQuickCanvasItem::loadImage(const QUrl& url) } } /*! - \qmlmethod QtQuick::Canvas::unloadImage(url image) - Unloads the \c image. + \qmlmethod QtQuick::Canvas::unloadImage(url image) + + Unloads the \a image. - Once an image is unloaded it cannot be painted by the canvas context - unless it is loaded again. + Once an image is unloaded, it cannot be painted by the canvas context + unless it is loaded again. - \sa loadImage(), imageLoaded, isImageLoaded(), - Context2D::createImageData(), Context2D::drawImage + \sa loadImage(), imageLoaded(), isImageLoaded(), + Context2D::createImageData(), Context2D::drawImage */ void QQuickCanvasItem::unloadImage(const QUrl& url) { @@ -1069,10 +1074,11 @@ void QQuickCanvasItem::unloadImage(const QUrl& url) } /*! - \qmlmethod QtQuick::Canvas::isImageError(url image) - Returns true if the \a image failed to load. + \qmlmethod QtQuick::Canvas::isImageError(url image) - \sa loadImage() + Returns \c true if the \a image failed to load, \c false otherwise. + + \sa loadImage() */ bool QQuickCanvasItem::isImageError(const QUrl& url) const { |