MCPcopy Create free account
hub / github.com/KDAB/GammaRay / apply

Method apply

plugins/quickinspector/quickinspector.cpp:288–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286}
287
288void RenderModeRequest::apply()
289{
290 QMutexLocker lock(&mutex);
291
292 if (connection)
293 disconnect(connection);
294
295 if (window && window->rendererInterface()->graphicsApi() != QSGRendererInterface::OpenGL)
296 return;
297
298 if (window) {
299 const QByteArray mode = renderModeToString(RenderModeRequest::mode);
300 QQuickWindowPrivate *winPriv = QQuickWindowPrivate::get(window);
301 QObject::connect(window.get(), &QQuickWindow::beforeSynchronizing, this, [this, winPriv, mode]() {
302 emit aboutToCleanSceneGraph();
303 QMetaObject::invokeMethod(window, "cleanupSceneGraph", Qt::DirectConnection);
304 winPriv->visualizationMode = mode;
305 emit sceneGraphCleanedUp(); }, static_cast<Qt::ConnectionType>(Qt::DirectConnection | Qt::SingleShotConnection));
306 }
307
308 QMetaObject::invokeMethod(this, "preFinished", Qt::QueuedConnection);
309}
310
311void RenderModeRequest::preFinished()
312{

Callers

nothing calls this directly

Calls 2

renderModeToStringFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected