From 99cda9784407b371a03f41a1a0dbb34d8f69ca60 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Fri, 10 Nov 2023 12:56:49 +0100 Subject: [PATCH] xcb: fix deprecated QBitmap::operator=(const QPixmap&) warnings Pick-to: 6.5 6.2 Change-Id: I2caa64d92ece20d5c8d650a3898926e8f0fa7b24 Reviewed-by: Axel Spoerl (cherry picked from commit f84e654a620a4f04817b70bd1e7eab8a09a25526) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp | 2 +- src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp index f630f538aa7..743ff92654e 100644 --- a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp +++ b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp @@ -2134,7 +2134,7 @@ void QX11PaintEngine::drawPixmap(const QRectF &r, const QPixmap &px, const QRect XFillRectangle(d->dpy, d->hd, d->gc, x, y, sw, sh); restore_clip = true; } else if (mono_dst && !mono_src) { - QBitmap bitmap(pixmap); + QBitmap bitmap = QBitmap::fromPixmap(pixmap); XCopyArea(d->dpy, qt_x11PixmapHandle(bitmap), d->hd, d->gc, sx, sy, sw, sh, x, y); } else { XCopyArea(d->dpy, qt_x11PixmapHandle(pixmap), d->hd, d->gc, sx, sy, sw, sh, x, y); diff --git a/src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp b/src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp index 186a3cf9d74..a4e820ea921 100644 --- a/src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp +++ b/src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp @@ -1314,7 +1314,7 @@ QBitmap QX11PlatformPixmap::mask() const #endif if (d == 1) { QX11PlatformPixmap *that = const_cast(this); - mask = QPixmap(that); + mask = QBitmap::fromPixmap(QPixmap(that)); } else { mask = mask_to_bitmap(xinfo.screen()); }