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 --- .../quick/qquickframebufferobject/tst_qquickframebufferobject.cpp | 2 +- tests/auto/quick/qquickrendercontrol/tst_qquickrendercontrol.cpp | 4 ++-- tests/auto/quick/qquickshape/tst_qquickshape.cpp | 2 +- tests/auto/quick/qquickwindow/tst_qquickwindow.cpp | 4 ++-- tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/auto/quick/qquickframebufferobject/tst_qquickframebufferobject.cpp b/tests/auto/quick/qquickframebufferobject/tst_qquickframebufferobject.cpp index 17c8f9ba12..5e7ab02537 100644 --- a/tests/auto/quick/qquickframebufferobject/tst_qquickframebufferobject.cpp +++ b/tests/auto/quick/qquickframebufferobject/tst_qquickframebufferobject.cpp @@ -154,7 +154,7 @@ private slots: void tst_QQuickFramebufferObject::initTestCase() { QQmlDataTest::initTestCase(); - QQuickWindow::setSceneGraphBackend(QSGRendererInterface::OpenGLRhi); + QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi); } void tst_QQuickFramebufferObject::testThatStuffWorks_data() diff --git a/tests/auto/quick/qquickrendercontrol/tst_qquickrendercontrol.cpp b/tests/auto/quick/qquickrendercontrol/tst_qquickrendercontrol.cpp index 7e8fcbfcf1..a2217f5427 100644 --- a/tests/auto/quick/qquickrendercontrol/tst_qquickrendercontrol.cpp +++ b/tests/auto/quick/qquickrendercontrol/tst_qquickrendercontrol.cpp @@ -147,7 +147,7 @@ void tst_RenderControl::renderAndReadBackWithRhi() // QQuickRenderControl, etc. instances are destroyed, before creating new // ones. That's why it is possible to have this test run with multiple QRhi // backends. - QQuickWindow::setSceneGraphBackend(api); + QQuickWindow::setGraphicsApi(api); QScopedPointer renderControl(new QQuickRenderControl); QScopedPointer quickWindow(new QQuickWindow(renderControl.data())); @@ -316,7 +316,7 @@ void tst_RenderControl::renderAndReadBackWithVulkanNative() if (!vulkanInstance.isValid()) QSKIP("Skipping native Vulkan test due to failing to create a VkInstance"); - QQuickWindow::setSceneGraphBackend(QSGRendererInterface::VulkanRhi); + QQuickWindow::setGraphicsApi(QSGRendererInterface::VulkanRhi); // We will create our own VkDevice and friends, which will then get used by // Qt Quick as well (instead of creating its own objects), so this is a test diff --git a/tests/auto/quick/qquickshape/tst_qquickshape.cpp b/tests/auto/quick/qquickshape/tst_qquickshape.cpp index 578d8d4e3a..3a26f7e382 100644 --- a/tests/auto/quick/qquickshape/tst_qquickshape.cpp +++ b/tests/auto/quick/qquickshape/tst_qquickshape.cpp @@ -95,7 +95,7 @@ private: tst_QQuickShape::tst_QQuickShape() { // Force the software backend to get reliable rendering results regardless of the hw and drivers. - QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software); + QQuickWindow::setGraphicsApi(QSGRendererInterface::Software); const char *uri = "tst_qquickpathitem"; qmlRegisterType(uri, 1, 0, "Shape"); diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp index 91a898d834..c957d2d702 100644 --- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp +++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp @@ -3741,7 +3741,7 @@ void tst_qquickwindow::rendererInterfaceWithRenderControl() // QQuickRenderControl, etc. instances are destroyed, before creating new // ones. That's why it is possible to have this test run with multiple QRhi // backends. - QQuickWindow::setSceneGraphBackend(api); + QQuickWindow::setGraphicsApi(api); QScopedPointer renderControl(new QQuickRenderControl); QScopedPointer quickWindow(new QQuickWindow(renderControl.data())); @@ -3911,7 +3911,7 @@ void tst_qquickwindow::rendererInterfaceWithRenderControl() // Now that everything is torn down, go back to the default unspecified-api // state, to prevent conflicting with tests that come afterwards. - QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Unknown); + QQuickWindow::setGraphicsApi(QSGRendererInterface::Unknown); } QTEST_MAIN(tst_qquickwindow) diff --git a/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp b/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp index b47837179a..3f67006554 100644 --- a/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp +++ b/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp @@ -152,7 +152,7 @@ private: tst_qquickwidget::tst_qquickwidget() { - QQuickWindow::setSceneGraphBackend(QSGRendererInterface::OpenGLRhi); + QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi); } void tst_qquickwidget::showHide() -- cgit v1.2.3