summaryrefslogtreecommitdiffstats
path: root/tests/manual/rhi/rhiwidgetproto/rhiwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/rhi/rhiwidgetproto/rhiwidget.cpp')
-rw-r--r--tests/manual/rhi/rhiwidgetproto/rhiwidget.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/manual/rhi/rhiwidgetproto/rhiwidget.cpp b/tests/manual/rhi/rhiwidgetproto/rhiwidget.cpp
index e801940c860..d535c655d0b 100644
--- a/tests/manual/rhi/rhiwidgetproto/rhiwidget.cpp
+++ b/tests/manual/rhi/rhiwidgetproto/rhiwidget.cpp
@@ -155,14 +155,7 @@ QPlatformBackingStoreRhiConfig QRhiWidgetPrivate::rhiConfig() const
void QRhiWidgetPrivate::ensureRhi()
{
Q_Q(QRhiWidget);
- // the QRhi and infrastructure belongs to the top-level widget, not to this widget
- QWidget *tlw = q->window();
- QWidgetPrivate *wd = get(tlw);
-
- QRhi *currentRhi = nullptr;
- if (QWidgetRepaintManager *repaintManager = wd->maybeRepaintManager())
- currentRhi = repaintManager->rhi();
-
+ QRhi *currentRhi = QWidgetPrivate::rhi();
if (currentRhi && currentRhi->backend() != QBackingStoreRhiSupport::apiToRhiBackend(config.api())) {
qWarning("The top-level window is already using another graphics API for composition, "
"'%s' is not compatible with this widget",