aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickwidgets/qquickwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickwidgets/qquickwidget.cpp')
-rw-r--r--src/quickwidgets/qquickwidget.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp
index 77d16222d2..8a61e371e7 100644
--- a/src/quickwidgets/qquickwidget.cpp
+++ b/src/quickwidgets/qquickwidget.cpp
@@ -116,23 +116,23 @@ void QQuickWidgetPrivate::init(QQmlEngine* e)
QObject::connect(renderControl, SIGNAL(sceneChanged()), q, SLOT(triggerUpdate()));
}
-void QQuickWidgetPrivate::stopRenderControl()
+void QQuickWidgetPrivate::invalidateRenderControl()
{
if (!context) // this is not an error, could be called before creating the context, or multiple times
return;
bool success = context->makeCurrent(offscreenSurface);
if (!success) {
- qWarning("QQuickWidget::stopRenderControl could not make context current");
+ qWarning("QQuickWidget::invalidateRenderControl could not make context current");
return;
}
- renderControl->stop();
+ renderControl->invalidate();
}
void QQuickWidgetPrivate::handleWindowChange()
{
- stopRenderControl();
+ invalidateRenderControl();
destroyContext();
}
@@ -158,7 +158,7 @@ QQuickWidgetPrivate::~QQuickWidgetPrivate()
if (QQmlDebugService::isDebuggingEnabled())
QQmlInspectorService::instance()->removeView(q_func());
- stopRenderControl();
+ invalidateRenderControl();
// context and offscreenSurface are current at this stage, if the context was created.
Q_ASSERT(!context || (QOpenGLContext::currentContext() == context && context->surface() == offscreenSurface));
@@ -964,7 +964,7 @@ void QQuickWidget::showEvent(QShowEvent *)
void QQuickWidget::hideEvent(QHideEvent *)
{
Q_D(QQuickWidget);
- d->stopRenderControl();
+ d->invalidateRenderControl();
}
/*! \reimp */