From 4e266103ad8b75d71fb176a2f774faf71997123d Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 22 Jun 2020 13:00:03 +0200 Subject: Rename setSceneGraphBackend to setGraphicsApi ...and fix up the docs. The string-based setSceneGraphBackend() stays of course (the docs have been enhanced, however). The GraphicsApi enum-based overload is now renamed to setGraphicsApi(). Using the same name for both functions is a historical artifact, reflecting the evolution (5.0 - 5.8 - 5.14). In 6.0 we can give it a more appropriate name, since it does not have much to do with "backends" from the user's perspective. Change-Id: Id75dbf81f50a148797e5b5de9be4000153737473 Reviewed-by: Andy Nichols --- examples/quick/quickwidgets/qquickviewcomparison/main.cpp | 2 +- examples/quick/quickwidgets/quickwidget/main.cpp | 2 +- examples/quick/rendercontrol/rendercontrol_d3d11/main.cpp | 2 +- examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp | 2 +- examples/quick/rendercontrol/rendercontrol_opengl/main.cpp | 2 +- examples/quick/scenegraph/d3d11underqml/main.cpp | 2 +- examples/quick/scenegraph/fboitem/main.cpp | 2 +- examples/quick/scenegraph/metaltextureimport/main.cpp | 2 +- examples/quick/scenegraph/metalunderqml/main.cpp | 2 +- examples/quick/scenegraph/openglunderqml/main.cpp | 2 +- examples/quick/scenegraph/vulkantextureimport/main.cpp | 2 +- examples/quick/scenegraph/vulkanunderqml/main.cpp | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) (limited to 'examples/quick') diff --git a/examples/quick/quickwidgets/qquickviewcomparison/main.cpp b/examples/quick/quickwidgets/qquickviewcomparison/main.cpp index f1fe397462..e40c509829 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/main.cpp +++ b/examples/quick/quickwidgets/qquickviewcomparison/main.cpp @@ -61,7 +61,7 @@ int main(int argc, char **argv) QApplication app(argc, argv); // this example and QQuickWidget are only functional when rendering with OpenGL - QQuickWindow::setSceneGraphBackend(QSGRendererInterface::OpenGLRhi); + QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi); QCoreApplication::setApplicationName("Qt QQuickView/QQuickWidget Comparison Example"); QCoreApplication::setOrganizationName("QtProject"); diff --git a/examples/quick/quickwidgets/quickwidget/main.cpp b/examples/quick/quickwidgets/quickwidget/main.cpp index 3bff5901f9..1c8b21f790 100644 --- a/examples/quick/quickwidgets/quickwidget/main.cpp +++ b/examples/quick/quickwidgets/quickwidget/main.cpp @@ -198,7 +198,7 @@ int main(int argc, char **argv) QApplication app(argc, argv); // this example and QQuickWidget are only functional when rendering with OpenGL - QQuickWindow::setSceneGraphBackend(QSGRendererInterface::OpenGLRhi); + QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi); QCoreApplication::setApplicationName("Qt QQuickWidget Example"); QCoreApplication::setOrganizationName("QtProject"); diff --git a/examples/quick/rendercontrol/rendercontrol_d3d11/main.cpp b/examples/quick/rendercontrol/rendercontrol_d3d11/main.cpp index f9a1dbb75f..119b289500 100644 --- a/examples/quick/rendercontrol/rendercontrol_d3d11/main.cpp +++ b/examples/quick/rendercontrol/rendercontrol_d3d11/main.cpp @@ -64,7 +64,7 @@ int main(int argc, char **argv) QCoreApplication::setApplicationVersion(QT_VERSION_STR); // only functional when Qt Quick is also using D3D11 - QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Direct3D11Rhi); + QQuickWindow::setGraphicsApi(QSGRendererInterface::Direct3D11Rhi); Engine engine; if (!engine.create()) diff --git a/examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp b/examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp index ccbac5cbed..c574343a98 100644 --- a/examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp +++ b/examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp @@ -358,7 +358,7 @@ void Window::updateQuick() m_quickDirty = false; if (!m_quickInitialized) { - // In addition to setSceneGraphBackend, we need a call to + // In addition to setGraphicsApi(), we need a call to // setGraphicsDevice to tell Qt Quick what ID3D11Device(Context) to use // (i.e. we want it to use ours, not to create new ones). m_quickWindow->setGraphicsDevice(QQuickGraphicsDevice::fromDeviceAndContext(m_engine->device(), m_engine->context())); diff --git a/examples/quick/rendercontrol/rendercontrol_opengl/main.cpp b/examples/quick/rendercontrol/rendercontrol_opengl/main.cpp index 7a24d70ec5..11db82773b 100644 --- a/examples/quick/rendercontrol/rendercontrol_opengl/main.cpp +++ b/examples/quick/rendercontrol/rendercontrol_opengl/main.cpp @@ -57,7 +57,7 @@ int main(int argc, char **argv) QGuiApplication app(argc, argv); // only functional when Qt Quick is also using OpenGL - QQuickWindow::setSceneGraphBackend(QSGRendererInterface::OpenGLRhi); + QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi); WindowSingleThreaded window; window.resize(1024, 768); diff --git a/examples/quick/scenegraph/d3d11underqml/main.cpp b/examples/quick/scenegraph/d3d11underqml/main.cpp index bcefae6cb5..f2a224c1a2 100644 --- a/examples/quick/scenegraph/d3d11underqml/main.cpp +++ b/examples/quick/scenegraph/d3d11underqml/main.cpp @@ -56,7 +56,7 @@ int main(int argc, char **argv) { QGuiApplication app(argc, argv); - QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Direct3D11Rhi); + QQuickWindow::setGraphicsApi(QSGRendererInterface::Direct3D11Rhi); QQuickView view; view.setResizeMode(QQuickView::SizeRootObjectToView); diff --git a/examples/quick/scenegraph/fboitem/main.cpp b/examples/quick/scenegraph/fboitem/main.cpp index 5c4620c5b7..61510cdb93 100644 --- a/examples/quick/scenegraph/fboitem/main.cpp +++ b/examples/quick/scenegraph/fboitem/main.cpp @@ -58,7 +58,7 @@ int main(int argc, char **argv) { QGuiApplication app(argc, argv); - QQuickWindow::setSceneGraphBackend(QSGRendererInterface::OpenGLRhi); + QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi); QQuickView view; view.setResizeMode(QQuickView::SizeRootObjectToView); diff --git a/examples/quick/scenegraph/metaltextureimport/main.cpp b/examples/quick/scenegraph/metaltextureimport/main.cpp index 4fc010e710..2abc1c5671 100644 --- a/examples/quick/scenegraph/metaltextureimport/main.cpp +++ b/examples/quick/scenegraph/metaltextureimport/main.cpp @@ -54,7 +54,7 @@ int main(int argc, char **argv) { QGuiApplication app(argc, argv); - QQuickWindow::setSceneGraphBackend(QSGRendererInterface::MetalRhi); + QQuickWindow::setGraphicsApi(QSGRendererInterface::MetalRhi); QQuickView view; view.setResizeMode(QQuickView::SizeRootObjectToView); diff --git a/examples/quick/scenegraph/metalunderqml/main.cpp b/examples/quick/scenegraph/metalunderqml/main.cpp index cefb1c10a9..4a657a6bf4 100644 --- a/examples/quick/scenegraph/metalunderqml/main.cpp +++ b/examples/quick/scenegraph/metalunderqml/main.cpp @@ -56,7 +56,7 @@ int main(int argc, char **argv) { QGuiApplication app(argc, argv); - QQuickWindow::setSceneGraphBackend(QSGRendererInterface::MetalRhi); + QQuickWindow::setGraphicsApi(QSGRendererInterface::MetalRhi); QQuickView view; view.setResizeMode(QQuickView::SizeRootObjectToView); diff --git a/examples/quick/scenegraph/openglunderqml/main.cpp b/examples/quick/scenegraph/openglunderqml/main.cpp index c151af179e..d92cbb2d80 100644 --- a/examples/quick/scenegraph/openglunderqml/main.cpp +++ b/examples/quick/scenegraph/openglunderqml/main.cpp @@ -59,7 +59,7 @@ int main(int argc, char **argv) { QGuiApplication app(argc, argv); - QQuickWindow::setSceneGraphBackend(QSGRendererInterface::OpenGLRhi); + QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi); QQuickView view; view.setResizeMode(QQuickView::SizeRootObjectToView); diff --git a/examples/quick/scenegraph/vulkantextureimport/main.cpp b/examples/quick/scenegraph/vulkantextureimport/main.cpp index 5dc28eb8a3..d2eb5184dc 100644 --- a/examples/quick/scenegraph/vulkantextureimport/main.cpp +++ b/examples/quick/scenegraph/vulkantextureimport/main.cpp @@ -55,7 +55,7 @@ int main(int argc, char **argv) { QGuiApplication app(argc, argv); - QQuickWindow::setSceneGraphBackend(QSGRendererInterface::VulkanRhi); + QQuickWindow::setGraphicsApi(QSGRendererInterface::VulkanRhi); QQuickView view; view.setResizeMode(QQuickView::SizeRootObjectToView); diff --git a/examples/quick/scenegraph/vulkanunderqml/main.cpp b/examples/quick/scenegraph/vulkanunderqml/main.cpp index 6ed0efacdd..e4a3f36ca7 100644 --- a/examples/quick/scenegraph/vulkanunderqml/main.cpp +++ b/examples/quick/scenegraph/vulkanunderqml/main.cpp @@ -56,7 +56,7 @@ int main(int argc, char **argv) QGuiApplication app(argc, argv); // This example needs Vulkan. It will not run otherwise. - QQuickWindow::setSceneGraphBackend(QSGRendererInterface::VulkanRhi); + QQuickWindow::setGraphicsApi(QSGRendererInterface::VulkanRhi); QQuickView view; view.setResizeMode(QQuickView::SizeRootObjectToView); -- cgit v1.2.3