xcb: fix deprecated QBitmap::operator=(const QPixmap&) warnings

Pick-to: 6.5 6.2
Change-Id: I2caa64d92ece20d5c8d650a3898926e8f0fa7b24
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f84e654a620a4f04817b70bd1e7eab8a09a25526)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Liang Qi 2023-11-10 12:56:49 +01:00 committed by Qt Cherry-pick Bot
parent 9be581537f
commit 99cda97844
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -1314,7 +1314,7 @@ QBitmap QX11PlatformPixmap::mask() const
#endif
if (d == 1) {
QX11PlatformPixmap *that = const_cast<QX11PlatformPixmap*>(this);
mask = QPixmap(that);
mask = QBitmap::fromPixmap(QPixmap(that));
} else {
mask = mask_to_bitmap(xinfo.screen());
}