From 5f3c071ee3dc5536227055573af5a17d3aaa1a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 17 Mar 2020 14:49:06 +0100 Subject: widgets: Remove unused member QTLWExtra::inTopLevelResize It was introduced in Qt 4.4 (e150f6a6e619) to work around slow resizes on Windows and X11 due to excessive painting, but has since been removed when old dead code never ported to QPA was removed in a2337f79ffd229. Change-Id: Ic14e714a02edb4194a445a6bb0759b601799fdc6 Reviewed-by: Paul Olav Tvete --- src/widgets/kernel/qwidgetrepaintmanager.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/widgets/kernel/qwidgetrepaintmanager.cpp') diff --git a/src/widgets/kernel/qwidgetrepaintmanager.cpp b/src/widgets/kernel/qwidgetrepaintmanager.cpp index 135a1527ac..523e226c08 100644 --- a/src/widgets/kernel/qwidgetrepaintmanager.cpp +++ b/src/widgets/kernel/qwidgetrepaintmanager.cpp @@ -166,7 +166,7 @@ void QWidgetPrivate::invalidateBackingStore(const T &r) return; QTLWExtra *tlwExtra = q->window()->d_func()->maybeTopData(); - if (!tlwExtra || tlwExtra->inTopLevelResize || !tlwExtra->backingStore) + if (!tlwExtra || !tlwExtra->backingStore) return; T clipped(r); @@ -213,7 +213,6 @@ void QWidgetRepaintManager::markDirty(const T &r, QWidget *widget, UpdateTime up Q_ASSERT(tlw->d_func()->extra); Q_ASSERT(tlw->d_func()->extra->topextra); - Q_ASSERT(!tlw->d_func()->extra->topextra->inTopLevelResize); Q_ASSERT(widget->isVisible() && widget->updatesEnabled()); Q_ASSERT(widget->window() == tlw); Q_ASSERT(!r.isEmpty()); @@ -446,8 +445,6 @@ void QWidgetPrivate::moveRect(const QRect &rect, int dx, int dy) QWidget *tlw = q->window(); QTLWExtra* x = tlw->d_func()->topData(); - if (x->inTopLevelResize) - return; static const bool accelEnv = qEnvironmentVariableIntValue("QT_NO_FAST_MOVE") == 0; @@ -543,8 +540,6 @@ void QWidgetPrivate::scrollRect(const QRect &rect, int dx, int dy) Q_Q(QWidget); QWidget *tlw = q->window(); QTLWExtra* x = tlw->d_func()->topData(); - if (x->inTopLevelResize) - return; QWidgetRepaintManager *repaintManager = x->repaintManager.get(); if (!repaintManager) @@ -722,8 +717,7 @@ void QWidgetRepaintManager::sync(QWidget *exposedWidget, const QRegion &exposedR { qCInfo(lcWidgetPainting) << "Syncing" << exposedRegion << "of" << exposedWidget; - QTLWExtra *tlwExtra = tlw->d_func()->maybeTopData(); - if (!tlw->isVisible() || !tlwExtra || tlwExtra->inTopLevelResize) + if (!tlw->isVisible()) return; if (!exposedWidget || !hasPlatformWindow(exposedWidget) @@ -815,10 +809,9 @@ void QWidgetRepaintManager::paintAndFlush() const bool updatesDisabled = !tlw->updatesEnabled(); bool repaintAllWidgets = false; - const bool inTopLevelResize = tlw->d_func()->maybeTopData()->inTopLevelResize; const QRect tlwRect = tlw->data->crect; const QRect surfaceGeometry(tlwRect.topLeft(), store->size()); - if ((inTopLevelResize || surfaceGeometry.size() != tlwRect.size()) && !updatesDisabled) { + if ((surfaceGeometry.size() != tlwRect.size()) && !updatesDisabled) { if (hasStaticContents() && !store->size().isEmpty() ) { // Repaint existing dirty area and newly visible area. const QRect clipRect(0, 0, surfaceGeometry.width(), surfaceGeometry.height()); @@ -837,7 +830,7 @@ void QWidgetRepaintManager::paintAndFlush() } } - if (inTopLevelResize || surfaceGeometry.size() != tlwRect.size()) + if (surfaceGeometry.size() != tlwRect.size()) store->resize(tlwRect.size()); if (updatesDisabled) -- cgit v1.2.3