diff options
-rw-r--r-- | src/widgets/kernel/qwidgetrepaintmanager.cpp | 13 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetrepaintmanager_p.h | 2 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/widgets/kernel/qwidgetrepaintmanager.cpp b/src/widgets/kernel/qwidgetrepaintmanager.cpp index 11647ae05e..6b5ca4b594 100644 --- a/src/widgets/kernel/qwidgetrepaintmanager.cpp +++ b/src/widgets/kernel/qwidgetrepaintmanager.cpp @@ -1063,17 +1063,15 @@ void QWidgetRepaintManager::markNeedsFlush(QWidget *widget, const QRegion ®io /*! Flushes the contents of the backing store into the top-level widget. - If the \a widget is non-zero, the content is flushed to the \a widget. */ -void QWidgetRepaintManager::flush(QWidget *widget) +void QWidgetRepaintManager::flush() { const bool hasNeedsFlushWidgets = !needsFlushWidgets.isEmpty(); bool flushed = false; // Flush the top level widget if (!topLevelNeedsFlush.isEmpty()) { - QWidget *target = widget ? widget : tlw; - flush(target, topLevelNeedsFlush, widgetTexturesFor(tlw, tlw)); + flush(tlw, topLevelNeedsFlush, widgetTexturesFor(tlw, tlw)); topLevelNeedsFlush = QRegion(); flushed = true; } @@ -1082,11 +1080,8 @@ void QWidgetRepaintManager::flush(QWidget *widget) if (!flushed && !hasNeedsFlushWidgets) { #ifndef QT_NO_OPENGL if (!tlw->d_func()->topData()->widgetTextures.empty()) { - QPlatformTextureList *widgetTextures = widgetTexturesFor(tlw, tlw); - if (widgetTextures) { - QWidget *target = widget ? widget : tlw; - flush(target, QRegion(), widgetTextures); - } + if (QPlatformTextureList *widgetTextures = widgetTexturesFor(tlw, tlw)) + flush(tlw, QRegion(), widgetTextures); } #endif } diff --git a/src/widgets/kernel/qwidgetrepaintmanager_p.h b/src/widgets/kernel/qwidgetrepaintmanager_p.h index e81eee0816..d7e38a9d69 100644 --- a/src/widgets/kernel/qwidgetrepaintmanager_p.h +++ b/src/widgets/kernel/qwidgetrepaintmanager_p.h @@ -115,7 +115,7 @@ private: void markNeedsFlush(QWidget *widget, const QRegion ®ion = QRegion()); - void flush(QWidget *widget = nullptr); + void flush(); void flush(QWidget *widget, const QRegion ®ion, QPlatformTextureList *widgetTextures); bool isDirty() const; |