widgets: Rename QWidgetPrivate::repaint_sys to paintOnScreen

Change-Id: Ic853e42cbed9b770bef0e1d7c7376c861bceb891
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
Tor Arne Vestbø 2019-08-23 15:19:52 +02:00
parent 6dd5cb40ef
commit e8c70fb07f
5 changed files with 13 additions and 13 deletions

View File

@ -184,7 +184,7 @@ public:
inline void dispatchPendingUpdateRequests()
{
if (qt_widget_private(viewport)->paintOnScreen())
if (qt_widget_private(viewport)->shouldPaintOnScreen())
QCoreApplication::sendPostedEvents(viewport, QEvent::UpdateRequest);
else
QCoreApplication::sendPostedEvents(viewport->window(), QEvent::UpdateRequest);

View File

@ -1758,8 +1758,8 @@ QRegion QWidgetPrivate::overlappedRegion(const QRect &rect, bool breakAfterFirst
void QWidgetPrivate::syncBackingStore()
{
if (paintOnScreen()) {
repaint_sys(dirty);
if (shouldPaintOnScreen()) {
paintOnScreen(dirty);
dirty = QRegion();
} else if (QWidgetRepaintManager *repaintManager = maybeRepaintManager()) {
repaintManager->sync();
@ -1768,14 +1768,14 @@ void QWidgetPrivate::syncBackingStore()
void QWidgetPrivate::syncBackingStore(const QRegion &region)
{
if (paintOnScreen())
repaint_sys(region);
if (shouldPaintOnScreen())
paintOnScreen(region);
else if (QWidgetRepaintManager *repaintManager = maybeRepaintManager()) {
repaintManager->sync(q_func(), region);
}
}
void QWidgetPrivate::repaint_sys(const QRegion &rgn)
void QWidgetPrivate::paintOnScreen(const QRegion &rgn)
{
if (data.in_destructor)
return;
@ -2138,7 +2138,7 @@ void QWidgetPrivate::clipToEffectiveMask(QRegion &region) const
}
}
bool QWidgetPrivate::paintOnScreen() const
bool QWidgetPrivate::shouldPaintOnScreen() const
{
#if defined(QT_NO_BACKINGSTORE)
return true;
@ -5276,7 +5276,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
return;
const bool asRoot = flags & DrawAsRoot;
bool onScreen = paintOnScreen();
bool onScreen = shouldPaintOnScreen();
Q_Q(QWidget);
#if QT_CONFIG(graphicseffect)

View File

@ -350,7 +350,8 @@ public:
#if QT_CONFIG(graphicsview)
static QGraphicsProxyWidget * nearestGraphicsProxyWidget(const QWidget *origin);
#endif
void repaint_sys(const QRegion &rgn);
bool shouldPaintOnScreen() const;
void paintOnScreen(const QRegion &rgn);
QRect clipRect() const;
QRegion clipRegion() const;
@ -362,7 +363,6 @@ public:
void updateIsOpaque();
void setOpaque(bool opaque);
void updateIsTranslucent();
bool paintOnScreen() const;
#if QT_CONFIG(graphicseffect)
void invalidateGraphicsEffectsRecursively();
#endif // QT_CONFIG(graphicseffect)

View File

@ -221,7 +221,7 @@ void QWidgetRepaintManager::markDirty(const T &r, QWidget *widget, UpdateTime up
// ---------------------------------------------------------------------------
if (widget->d_func()->paintOnScreen()) {
if (widget->d_func()->shouldPaintOnScreen()) {
if (widget->d_func()->dirty.isEmpty()) {
widget->d_func()->dirty = r;
sendUpdateRequest(widget, updateTime);
@ -1019,7 +1019,7 @@ void QWidgetRepaintManager::paintAndFlush()
*/
void QWidgetRepaintManager::markNeedsFlush(QWidget *widget, const QRegion &region, const QPoint &topLevelOffset)
{
if (!widget || widget->d_func()->paintOnScreen() || region.isEmpty())
if (!widget || widget->d_func()->shouldPaintOnScreen() || region.isEmpty())
return;
if (widget == tlw) {

View File

@ -803,7 +803,7 @@ void QWidgetWindow::handleResizeEvent(QResizeEvent *event)
if (updateSize()) {
QGuiApplication::forwardEvent(m_widget, event);
if (m_widget->d_func()->paintOnScreen()) {
if (m_widget->d_func()->shouldPaintOnScreen()) {
QRegion updateRegion(geometry());
if (m_widget->testAttribute(Qt::WA_StaticContents))
updateRegion -= QRect(0, 0, oldSize.width(), oldSize.height());