aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-06-22 13:00:03 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-06-22 16:10:52 +0200
commit4e266103ad8b75d71fb176a2f774faf71997123d (patch)
treeecf675969c45271ca2c9d3e5199631f4f1b9c129 /examples/quick
parent38bd2bd83144e3b7e7935e3730c109358b3e5740 (diff)
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 <andy.nichols@qt.io>
Diffstat (limited to 'examples/quick')
-rw-r--r--examples/quick/quickwidgets/qquickviewcomparison/main.cpp2
-rw-r--r--examples/quick/quickwidgets/quickwidget/main.cpp2
-rw-r--r--examples/quick/rendercontrol/rendercontrol_d3d11/main.cpp2
-rw-r--r--examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp2
-rw-r--r--examples/quick/rendercontrol/rendercontrol_opengl/main.cpp2
-rw-r--r--examples/quick/scenegraph/d3d11underqml/main.cpp2
-rw-r--r--examples/quick/scenegraph/fboitem/main.cpp2
-rw-r--r--examples/quick/scenegraph/metaltextureimport/main.cpp2
-rw-r--r--examples/quick/scenegraph/metalunderqml/main.cpp2
-rw-r--r--examples/quick/scenegraph/openglunderqml/main.cpp2
-rw-r--r--examples/quick/scenegraph/vulkantextureimport/main.cpp2
-rw-r--r--examples/quick/scenegraph/vulkanunderqml/main.cpp2
12 files changed, 12 insertions, 12 deletions
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);