From d89749b46ec6268236bfcba88d5549b60b315d90 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Fri, 29 Mar 2024 04:17:40 +0200 Subject: [PATCH] remove unused QWindowSurface::endPaint() argument less references to QRegion? hell yeah! Signed-off-by: Ivailo Monev --- src/gui/painting/qbackingstore.cpp | 4 ++-- src/gui/painting/qwindowsurface.cpp | 13 ++++++------- src/gui/painting/qwindowsurface_p.h | 4 ++-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index e7158bf67..7f603831e 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -154,12 +154,12 @@ void QWidgetBackingStore::endPaint(const QRegion &cleaned, QWindowSurface *windo { #ifndef QT_NO_DEBUG if (!beginPaintInfo->wasFlushed) - windowSurface->endPaint(cleaned); + windowSurface->endPaint(); else QWidgetBackingStore::unflushPaint(tlw, cleaned); #else Q_UNUSED(beginPaintInfo); - windowSurface->endPaint(cleaned); + windowSurface->endPaint(); #endif flush(); diff --git a/src/gui/painting/qwindowsurface.cpp b/src/gui/painting/qwindowsurface.cpp index 6048d5f86..9d9d66783 100644 --- a/src/gui/painting/qwindowsurface.cpp +++ b/src/gui/painting/qwindowsurface.cpp @@ -160,7 +160,7 @@ QPaintDevice *QWindowSurface::paintDevice() \sa endPaint(), paintDevice() */ -void QWindowSurface::beginPaint(const QRegion &rgn) +void QWindowSurface::beginPaint(const QRegion ®ion) { #if defined(Q_WS_X11) && !defined(QT_NO_XRENDER) if (!qt_widget_private(window())->isOpaque && window()->testAttribute(Qt::WA_TranslucentBackground)) { @@ -168,22 +168,21 @@ void QWindowSurface::beginPaint(const QRegion &rgn) p.setCompositionMode(QPainter::CompositionMode_Source); p.setPen(Qt::NoPen); p.setBrush(QBrush(Qt::transparent)); - p.drawRects(rgn.rects()); + p.drawRects(region.rects()); } #else - Q_UNUSED(rgn); + Q_UNUSED(region); #endif } /*! - This function is called after painting onto the surface has ended, - with the \a region in which the painting was performed. + This function is called after painting onto the surface has ended. \sa beginPaint(), paintDevice() */ -void QWindowSurface::endPaint(const QRegion &) +void QWindowSurface::endPaint() { -// QApplication::syncX(); + // QApplication::syncX(); } /*! diff --git a/src/gui/painting/qwindowsurface_p.h b/src/gui/painting/qwindowsurface_p.h index 2c6ce6861..7209ba2c5 100644 --- a/src/gui/painting/qwindowsurface_p.h +++ b/src/gui/painting/qwindowsurface_p.h @@ -63,8 +63,8 @@ public: bool scroll(const QRegion &area, int dx, int dy); - void beginPaint(const QRegion &); - void endPaint(const QRegion &); + void beginPaint(const QRegion ®ion); + void endPaint(); QPoint offset(const QWidget *widget) const; inline QRect rect(const QWidget *widget) const;