diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-08-07 10:05:04 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-08-07 22:06:29 +0200 |
commit | 08457385be89603d7c5ce84dce9ee36e0c6a0263 (patch) | |
tree | 35bc20021eebcdc0845aa7765baab2bb019ddc25 | |
parent | b42c8c4de293af0b6e9c0691daa835939b54d4e1 (diff) |
Rename QQuickRenderControl::stop() to invalidate()
To be consistent.
Change-Id: Ia78bf4a27e8ccb1a4f0a44865e810f1070c39e5d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
-rw-r--r-- | src/quick/items/qquickrendercontrol.cpp | 8 | ||||
-rw-r--r-- | src/quick/items/qquickrendercontrol.h | 2 | ||||
-rw-r--r-- | src/quickwidgets/qquickwidget.cpp | 12 | ||||
-rw-r--r-- | src/quickwidgets/qquickwidget_p.h | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/quick/items/qquickrendercontrol.cpp b/src/quick/items/qquickrendercontrol.cpp index 005ee72037..f3e51649c6 100644 --- a/src/quick/items/qquickrendercontrol.cpp +++ b/src/quick/items/qquickrendercontrol.cpp @@ -157,13 +157,13 @@ QQuickRenderControl::QQuickRenderControl(QObject *parent) /*! Destroys the instance. Releases all scenegraph resources. - \sa stop() + \sa invalidate() */ QQuickRenderControl::~QQuickRenderControl() { Q_D(QQuickRenderControl); - stop(); + invalidate(); if (d->window) QQuickWindowPrivate::get(d->window)->renderControl = 0; @@ -257,7 +257,7 @@ bool QQuickRenderControl::sync() initialize(), to be the current one at the time of destroying the QQuickRenderControl instance. - Once stop() has been called, it is possible to reuse the + Once invalidate() has been called, it is possible to reuse the QQuickRenderControl instance by calling initialize() again. \note This function does not take @@ -265,7 +265,7 @@ bool QQuickRenderControl::sync() QQuickWindow::persistentOpenGLContext() into account. This means that context-specific resources are always released. */ -void QQuickRenderControl::stop() +void QQuickRenderControl::invalidate() { Q_D(QQuickRenderControl); if (!d->initialized) diff --git a/src/quick/items/qquickrendercontrol.h b/src/quick/items/qquickrendercontrol.h index e5c04fee23..c3e5380af3 100644 --- a/src/quick/items/qquickrendercontrol.h +++ b/src/quick/items/qquickrendercontrol.h @@ -60,7 +60,7 @@ public: ~QQuickRenderControl(); void initialize(QOpenGLContext *gl); - void stop(); + void invalidate(); void polishItems(); void render(); diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index fed39b18a5..6cca36b726 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)); @@ -960,7 +960,7 @@ void QQuickWidget::showEvent(QShowEvent *) void QQuickWidget::hideEvent(QHideEvent *) { Q_D(QQuickWidget); - d->stopRenderControl(); + d->invalidateRenderControl(); } /*! \reimp */ diff --git a/src/quickwidgets/qquickwidget_p.h b/src/quickwidgets/qquickwidget_p.h index 356c34e7f5..8a8d98f45e 100644 --- a/src/quickwidgets/qquickwidget_p.h +++ b/src/quickwidgets/qquickwidget_p.h @@ -92,7 +92,7 @@ public: void init(QQmlEngine* e = 0); void handleWindowChange(); - void stopRenderControl(); + void invalidateRenderControl(); QSize rootObjectSize() const; |