summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qbitmap.cpp
diff options
context:
space:
mode:
authorNico Vertriest <nico.vertriest@qt.io>2021-06-01 11:38:06 +0200
committerNico Vertriest <nico.vertriest@qt.io>2021-07-26 12:37:12 +0200
commit111115bf8862b7cd1197c2ef8a4b475c882776d4 (patch)
tree72e585f01df3a93a1e480709db030fd7d47a99ea /src/gui/image/qbitmap.cpp
parentbd0d8a3adb98ff6f659e44e9a46decee32e9d94c (diff)
Doc: Ensure deprecated APIs in Gui are documented as such
Added missing #if-ery and deprecation macros to a QFont constructor that was only documented as deprecated. Fixes: QTBUG-94521 Fixes: QTBUG-95310 Pick-to: 6.2 6.1 Change-Id: I3d0418a3f7dca191a9068cc22627fe4deb7c53c5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/gui/image/qbitmap.cpp')
-rw-r--r--src/gui/image/qbitmap.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/image/qbitmap.cpp b/src/gui/image/qbitmap.cpp
index 45620e7181..95a7b1f7a0 100644
--- a/src/gui/image/qbitmap.cpp
+++ b/src/gui/image/qbitmap.cpp
@@ -114,19 +114,19 @@ QBitmap::QBitmap()
\sa clear()
*/
-
QBitmap::QBitmap(int w, int h)
: QPixmap(QSize(w, h), QPlatformPixmap::BitmapType)
{
}
/*!
+ \deprecated [6.0] Use fromPixmap instead.
+
Constructs a bitmap with the given \a size. The pixels in the
bitmap are uninitialized.
\sa clear()
*/
-
QBitmap::QBitmap(const QSize &size)
: QPixmap(size, QPlatformPixmap::BitmapType)
{
@@ -149,7 +149,6 @@ QBitmap::QBitmap(const QSize &size)
\sa QPixmap::isNull(), QImageReader::imageFormat()
*/
-
QBitmap::QBitmap(const QString& fileName, const char *format)
: QPixmap(QSize(0, 0), QPlatformPixmap::BitmapType)
{
@@ -277,7 +276,7 @@ QBitmap QBitmap::fromPixmap(const QPixmap &pixmap)
#if QT_DEPRECATED_SINCE(6, 0)
/*!
- \deprecated Use fromPixmap instead.
+ \deprecated [6.0] Use fromPixmap instead.
Constructs a bitmap that is a copy of the given \a pixmap.
If the pixmap has a depth greater than 1, the resulting bitmap
@@ -285,14 +284,13 @@ QBitmap QBitmap::fromPixmap(const QPixmap &pixmap)
\sa QPixmap::depth(), fromImage(), fromData()
*/
-
QBitmap::QBitmap(const QPixmap &pixmap)
{
*this = QBitmap::fromPixmap(pixmap);
}
/*!
- \deprecated Use fromPixmap instead.
+ \deprecated [6.0] Use fromPixmap instead.
\overload
Assigns the given \a pixmap to this bitmap and returns a reference
@@ -303,7 +301,6 @@ QBitmap::QBitmap(const QPixmap &pixmap)
\sa QPixmap::depth()
*/
-
QBitmap &QBitmap::operator=(const QPixmap &pixmap)
{
*this = QBitmap::fromPixmap(pixmap);