Doc: Add missing since 6.2 to QImage and QPixmap

The deviceIndependentSize() function of QImage and QPixmap was added
in Qt 6.2 but their docs are missing this information, so add them.

And it seems the QImage docs were copied from QPixmap, so it still
reference to pixmap, not image, fix it as a drive-by.

Pick-to: 6.4 6.3 6.2
Change-Id: Ic3d0a2019b5e9b89bd8723d994d7ae54f2cb5257
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Yuhang Zhao 2022-09-05 10:03:03 +08:00
parent c76f7cbbcb
commit 0d20e6e495
2 changed files with 8 additions and 4 deletions

View File

@ -1487,12 +1487,14 @@ void QImage::setDevicePixelRatio(qreal scaleFactor)
}
/*!
Returns the size of the pixmap in device independent pixels.
Returns the size of the image in device independent pixels.
This value should be used when using the pixmap size in user interface
This value should be used when using the image size in user interface
size calculations.
The return value is equivalent to pixmap.size() / pixmap.devicePixelRatio(),
The return value is equivalent to image.size() / image.devicePixelRatio().
\since 6.2
*/
QSizeF QImage::deviceIndependentSize() const
{

View File

@ -620,7 +620,9 @@ void QPixmap::setDevicePixelRatio(qreal scaleFactor)
This value should be used when using the pixmap size in user interface
size calculations.
The return value is equivalent to pixmap.size() / pixmap.devicePixelRatio(),
The return value is equivalent to pixmap.size() / pixmap.devicePixelRatio().
\since 6.2
*/
QSizeF QPixmap::deviceIndependentSize() const
{