aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/quick/scenegraph/rendernode/customrenderitem.cpp2
-rw-r--r--src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp2
-rw-r--r--src/plugins/scenegraph/d3d12/qsgd3d12engine_p.h2
-rw-r--r--src/quick/items/context2d/qquickcontext2d.cpp2
-rw-r--r--src/quick/items/qquickrendererinfo.cpp4
-rw-r--r--src/quick/items/qquickrendererinfo_p.h10
-rw-r--r--src/quick/items/qquickwindow.cpp4
-rw-r--r--src/quick/items/qquickwindow.h2
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp2
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarecontext_p.h2
-rw-r--r--src/quick/scenegraph/coreapi/qsgrendererinterface.cpp4
-rw-r--r--src/quick/scenegraph/coreapi/qsgrendererinterface.h4
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp2
-rw-r--r--src/quick/scenegraph/qsgdefaultcontext.cpp2
-rw-r--r--src/quick/scenegraph/qsgdefaultcontext_p.h2
-rw-r--r--src/quickwidgets/qquickwidget.cpp2
-rw-r--r--tests/auto/quick/qquickrendererinfo/tst_qquickrendererinfo.cpp2
-rw-r--r--tests/auto/quick/qquickwindow/tst_qquickwindow.cpp10
-rw-r--r--tests/auto/quick/scenegraph/tst_scenegraph.cpp4
19 files changed, 32 insertions, 32 deletions
diff --git a/examples/quick/scenegraph/rendernode/customrenderitem.cpp b/examples/quick/scenegraph/rendernode/customrenderitem.cpp
index 4070a86395..433f3c5a1e 100644
--- a/examples/quick/scenegraph/rendernode/customrenderitem.cpp
+++ b/examples/quick/scenegraph/rendernode/customrenderitem.cpp
@@ -59,7 +59,7 @@ QSGNode *CustomRenderItem::updatePaintNode(QSGNode *node, UpdatePaintNodeData *)
QSGRendererInterface *ri = window()->rendererInterface();
if (!ri)
return nullptr;
- switch (ri->graphicsAPI()) {
+ switch (ri->graphicsApi()) {
case QSGRendererInterface::OpenGL:
#ifndef QT_NO_OPENGL
n = new OpenGLRenderNode(this);
diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp
index 615be32d32..9c2bb68bbe 100644
--- a/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp
+++ b/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp
@@ -535,7 +535,7 @@ void QSGD3D12Engine::simulateDeviceLoss()
d->simulateDeviceLoss();
}
-QSGRendererInterface::GraphicsAPI QSGD3D12Engine::graphicsAPI() const
+QSGRendererInterface::GraphicsApi QSGD3D12Engine::graphicsApi() const
{
return Direct3D12;
}
diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12engine_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12engine_p.h
index 649dc048c8..07f2d360c8 100644
--- a/src/plugins/scenegraph/d3d12/qsgd3d12engine_p.h
+++ b/src/plugins/scenegraph/d3d12/qsgd3d12engine_p.h
@@ -373,7 +373,7 @@ public:
void simulateDeviceLoss();
// QSGRendererInterface
- GraphicsAPI graphicsAPI() const override;
+ GraphicsApi graphicsApi() const override;
void *getResource(Resource resource) const override;
private:
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp
index 93ca8e9358..caec6cb36a 100644
--- a/src/quick/items/context2d/qquickcontext2d.cpp
+++ b/src/quick/items/context2d/qquickcontext2d.cpp
@@ -4094,7 +4094,7 @@ void QQuickContext2D::init(QQuickCanvasItem *canvasItem, const QVariantMap &args
// Disable Framebuffer Object based rendering when not running with OpenGL
if (m_renderTarget == QQuickCanvasItem::FramebufferObject) {
QSGRendererInterface *rif = canvasItem->window()->rendererInterface();
- if (rif && rif->graphicsAPI() != QSGRendererInterface::OpenGL)
+ if (rif && rif->graphicsApi() != QSGRendererInterface::OpenGL)
m_renderTarget = QQuickCanvasItem::Image;
}
diff --git a/src/quick/items/qquickrendererinfo.cpp b/src/quick/items/qquickrendererinfo.cpp
index e41f4ebbae..b31cfd7f94 100644
--- a/src/quick/items/qquickrendererinfo.cpp
+++ b/src/quick/items/qquickrendererinfo.cpp
@@ -96,12 +96,12 @@ QQuickRendererInfo *QQuickRendererInfo::qmlAttachedProperties(QObject *object)
void QQuickRendererInfo::updateInfo()
{
- GraphicsAPI newAPI = Unknown;
+ GraphicsApi newAPI = Unknown;
if (m_window && m_window->isSceneGraphInitialized()) {
QSGRendererInterface *rif = m_window->rendererInterface();
if (rif)
- newAPI = GraphicsAPI(rif->graphicsAPI()); // this function is safe to call on the gui/main thread too
+ newAPI = GraphicsApi(rif->graphicsApi()); // this function is safe to call on the gui/main thread too
}
if (m_api != newAPI) {
diff --git a/src/quick/items/qquickrendererinfo_p.h b/src/quick/items/qquickrendererinfo_p.h
index d76f4010e0..d0298baa21 100644
--- a/src/quick/items/qquickrendererinfo_p.h
+++ b/src/quick/items/qquickrendererinfo_p.h
@@ -63,23 +63,23 @@ class QQuickWindow;
class QQuickRendererInfo : public QObject
{
Q_OBJECT
- Q_PROPERTY(GraphicsAPI api READ api NOTIFY apiChanged FINAL)
+ Q_PROPERTY(GraphicsApi api READ api NOTIFY apiChanged FINAL)
public:
// must match QSGRendererInterface
- enum GraphicsAPI {
+ enum GraphicsApi {
Unknown,
Software,
OpenGL,
Direct3D12
};
- Q_ENUM(GraphicsAPI)
+ Q_ENUM(GraphicsApi)
QQuickRendererInfo(QQuickItem *item = 0);
static QQuickRendererInfo *qmlAttachedProperties(QObject *object);
- GraphicsAPI api() const { return m_api; }
+ GraphicsApi api() const { return m_api; }
Q_SIGNALS:
void apiChanged();
@@ -90,7 +90,7 @@ private Q_SLOTS:
private:
QPointer<QQuickWindow> m_window;
- GraphicsAPI m_api;
+ GraphicsApi m_api;
};
QT_END_NAMESPACE
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 6333bf704a..b3ca563f16 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -3223,7 +3223,7 @@ QOpenGLContext *QQuickWindow::openglContext() const
Q_D(const QQuickWindow);
if (d->context && d->context->isValid()) {
QSGRendererInterface *rif = d->context->sceneGraphContext()->rendererInterface(d->context);
- if (rif && rif->graphicsAPI() == QSGRendererInterface::OpenGL) {
+ if (rif && rif->graphicsApi() == QSGRendererInterface::OpenGL) {
auto openglRenderContext = static_cast<const QSGDefaultRenderContext *>(d->context);
return openglRenderContext->openglContext();
}
@@ -4453,7 +4453,7 @@ QSGRendererInterface *QQuickWindow::rendererInterface() const
\since 5.8
*/
-void QQuickWindow::setSceneGraphBackend(QSGRendererInterface::GraphicsAPI api)
+void QQuickWindow::setSceneGraphBackend(QSGRendererInterface::GraphicsApi api)
{
switch (api) {
case QSGRendererInterface::Software:
diff --git a/src/quick/items/qquickwindow.h b/src/quick/items/qquickwindow.h
index 37be6d591c..c741772253 100644
--- a/src/quick/items/qquickwindow.h
+++ b/src/quick/items/qquickwindow.h
@@ -156,7 +156,7 @@ public:
QSGRendererInterface *rendererInterface() const;
- static void setSceneGraphBackend(QSGRendererInterface::GraphicsAPI api);
+ static void setSceneGraphBackend(QSGRendererInterface::GraphicsApi api);
static void setSceneGraphBackend(const QString &backend);
Q_SIGNALS:
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp
index a9dbd7e325..fe9ad67901 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp
@@ -174,7 +174,7 @@ QSGRendererInterface *QSGSoftwareContext::rendererInterface(QSGRenderContext *re
return this;
}
-QSGRendererInterface::GraphicsAPI QSGSoftwareContext::graphicsAPI() const
+QSGRendererInterface::GraphicsApi QSGSoftwareContext::graphicsApi() const
{
return Software;
}
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarecontext_p.h b/src/quick/scenegraph/adaptations/software/qsgsoftwarecontext_p.h
index 12568706d4..023a33cbd5 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarecontext_p.h
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarecontext_p.h
@@ -95,7 +95,7 @@ public:
QSurfaceFormat defaultSurfaceFormat() const override;
QSGRendererInterface *rendererInterface(QSGRenderContext *renderContext) override;
- GraphicsAPI graphicsAPI() const override;
+ GraphicsApi graphicsApi() const override;
};
QT_END_NAMESPACE
diff --git a/src/quick/scenegraph/coreapi/qsgrendererinterface.cpp b/src/quick/scenegraph/coreapi/qsgrendererinterface.cpp
index b680dbe3d5..2920a187e2 100644
--- a/src/quick/scenegraph/coreapi/qsgrendererinterface.cpp
+++ b/src/quick/scenegraph/coreapi/qsgrendererinterface.cpp
@@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \enum QSGRenderNode::GraphicsAPI
+ \enum QSGRenderNode::GraphicsApi
\value Unknown An unknown graphics API is in use
\value Software The Qt Quick 2D Renderer is in use
\value OpenGL OpenGL ES 2.0 or higher
@@ -84,7 +84,7 @@ QSGRendererInterface::~QSGRendererInterface()
}
/*!
- \fn QSGRenderNode::GraphicsAPI QSGRenderNode::graphicsAPI() const
+ \fn QSGRenderNode::GraphicsApi QSGRenderNode::graphicsApi() const
Returns the graphics API that is in use by the Qt Quick scenegraph.
diff --git a/src/quick/scenegraph/coreapi/qsgrendererinterface.h b/src/quick/scenegraph/coreapi/qsgrendererinterface.h
index a34b4b3c26..75b79336fd 100644
--- a/src/quick/scenegraph/coreapi/qsgrendererinterface.h
+++ b/src/quick/scenegraph/coreapi/qsgrendererinterface.h
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class Q_QUICK_EXPORT QSGRendererInterface
{
public:
- enum GraphicsAPI {
+ enum GraphicsApi {
Unknown,
Software,
OpenGL,
@@ -62,7 +62,7 @@ public:
virtual ~QSGRendererInterface();
- virtual GraphicsAPI graphicsAPI() const = 0;
+ virtual GraphicsApi graphicsApi() const = 0;
virtual void *getResource(Resource resource) const;
virtual void *getResource(const char *resource) const;
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index 27d0f01753..40d65d99aa 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -318,7 +318,7 @@ QSize QSGContext::minimumFBOSize() const
Returns a pointer to the (presumably) global renderer interface.
\note This function may be called on the gui thread in order to get access
- to QSGRendererInterface::graphicsAPI().
+ to QSGRendererInterface::graphicsApi().
*/
QSGRendererInterface *QSGContext::rendererInterface(QSGRenderContext *renderContext)
{
diff --git a/src/quick/scenegraph/qsgdefaultcontext.cpp b/src/quick/scenegraph/qsgdefaultcontext.cpp
index 4b05f64887..46127544a0 100644
--- a/src/quick/scenegraph/qsgdefaultcontext.cpp
+++ b/src/quick/scenegraph/qsgdefaultcontext.cpp
@@ -246,7 +246,7 @@ QSGRendererInterface *QSGDefaultContext::rendererInterface(QSGRenderContext *ren
return this;
}
-QSGRendererInterface::GraphicsAPI QSGDefaultContext::graphicsAPI() const
+QSGRendererInterface::GraphicsApi QSGDefaultContext::graphicsApi() const
{
return OpenGL;
}
diff --git a/src/quick/scenegraph/qsgdefaultcontext_p.h b/src/quick/scenegraph/qsgdefaultcontext_p.h
index 923d1ee7ec..d14d9d6812 100644
--- a/src/quick/scenegraph/qsgdefaultcontext_p.h
+++ b/src/quick/scenegraph/qsgdefaultcontext_p.h
@@ -78,7 +78,7 @@ public:
void setDistanceFieldEnabled(bool enabled);
bool isDistanceFieldEnabled() const;
- GraphicsAPI graphicsAPI() const override;
+ GraphicsApi graphicsApi() const override;
private:
QMutex m_mutex;
diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp
index 26a540455e..d6de552017 100644
--- a/src/quickwidgets/qquickwidget.cpp
+++ b/src/quickwidgets/qquickwidget.cpp
@@ -100,7 +100,7 @@ void QQuickWidgetPrivate::init(QQmlEngine* e)
// Check if the Software Adaptation is being used
auto sgRendererInterface = offscreenWindow->rendererInterface();
- if (sgRendererInterface && sgRendererInterface->graphicsAPI() == QSGRendererInterface::Software)
+ if (sgRendererInterface && sgRendererInterface->graphicsApi() == QSGRendererInterface::Software)
useSoftwareRenderer = true;
if (!useSoftwareRenderer) {
diff --git a/tests/auto/quick/qquickrendererinfo/tst_qquickrendererinfo.cpp b/tests/auto/quick/qquickrendererinfo/tst_qquickrendererinfo.cpp
index b9e8c30ea7..5e2da76333 100644
--- a/tests/auto/quick/qquickrendererinfo/tst_qquickrendererinfo.cpp
+++ b/tests/auto/quick/qquickrendererinfo/tst_qquickrendererinfo.cpp
@@ -58,7 +58,7 @@ void tst_QQuickRendererInfo::testProperties()
QVERIFY(obj);
QSGRendererInterface *rif = view.rendererInterface();
- const int expectedAPI = rif ? rif->graphicsAPI() : QSGRendererInterface::Unknown;
+ const int expectedAPI = rif ? rif->graphicsApi() : QSGRendererInterface::Unknown;
QCOMPARE(obj->property("api").toInt(), expectedAPI);
}
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
index 138f2759a4..0985198d65 100644
--- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
@@ -393,7 +393,7 @@ void tst_qquickwindow::openglContextCreatedSignal()
window.show();
QTest::qWaitForWindowExposed(&window);
- if (window.rendererInterface()->graphicsAPI() != QSGRendererInterface::OpenGL)
+ if (window.rendererInterface()->graphicsApi() != QSGRendererInterface::OpenGL)
QSKIP("Skipping OpenGL context test due to not running with OpenGL");
QVERIFY(spy.size() > 0);
@@ -1240,7 +1240,7 @@ void tst_qquickwindow::headless()
// Verify that the window is alive and kicking
QVERIFY(window->isSceneGraphInitialized());
- const bool isGL = window->rendererInterface()->graphicsAPI() == QSGRendererInterface::OpenGL;
+ const bool isGL = window->rendererInterface()->graphicsApi() == QSGRendererInterface::OpenGL;
// Store the visual result
QImage originalContent = window->grabWindow();
@@ -1614,7 +1614,7 @@ void tst_qquickwindow::hideThenDelete()
QTest::qWaitForWindowExposed(&window);
const bool threaded = QQuickWindowPrivate::get(&window)->context->thread() != QGuiApplication::instance()->thread();
- const bool isGL = window.rendererInterface()->graphicsAPI() == QSGRendererInterface::OpenGL;
+ const bool isGL = window.rendererInterface()->graphicsApi() == QSGRendererInterface::OpenGL;
#ifndef QT_NO_OPENGL
if (isGL)
openglDestroyed = new QSignalSpy(window.openglContext(), SIGNAL(aboutToBeDestroyed()));
@@ -2044,7 +2044,7 @@ void tst_qquickwindow::defaultSurfaceFormat()
window.show();
QVERIFY(QTest::qWaitForWindowExposed(&window));
- if (window.rendererInterface()->graphicsAPI() != QSGRendererInterface::OpenGL)
+ if (window.rendererInterface()->graphicsApi() != QSGRendererInterface::OpenGL)
QSKIP("Skipping OpenGL context test due to not running with OpenGL");
const QSurfaceFormat reqFmt = window.requestedFormat();
@@ -2182,7 +2182,7 @@ void tst_qquickwindow::testRenderJob()
QCOMPARE(completedJobs.size(), 1);
#ifndef QT_NO_OPENGL
- if (window.rendererInterface()->graphicsAPI() == QSGRendererInterface::OpenGL) {
+ if (window.rendererInterface()->graphicsApi() == QSGRendererInterface::OpenGL) {
// Do a synchronized GL job.
GLubyte readPixel[4] = {0, 0, 0, 0};
GlRenderJob *glJob = new GlRenderJob(readPixel);
diff --git a/tests/auto/quick/scenegraph/tst_scenegraph.cpp b/tests/auto/quick/scenegraph/tst_scenegraph.cpp
index 86f971041f..c0d1b53e92 100644
--- a/tests/auto/quick/scenegraph/tst_scenegraph.cpp
+++ b/tests/auto/quick/scenegraph/tst_scenegraph.cpp
@@ -439,7 +439,7 @@ void tst_SceneGraph::render()
QQuickView dummy;
dummy.show();
QTest::qWaitForWindowExposed(&dummy);
- if (dummy.rendererInterface()->graphicsAPI() != QSGRendererInterface::OpenGL)
+ if (dummy.rendererInterface()->graphicsApi() != QSGRendererInterface::OpenGL)
QSKIP("Skipping complex rendering tests due to not running with OpenGL");
dummy.hide();
@@ -506,7 +506,7 @@ void tst_SceneGraph::hideWithOtherContext()
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
- if (view.rendererInterface()->graphicsAPI() != QSGRendererInterface::OpenGL)
+ if (view.rendererInterface()->graphicsApi() != QSGRendererInterface::OpenGL)
QSKIP("Skipping OpenGL context test due to not running with OpenGL");
renderingOnMainThread = view.openglContext()->thread() == QGuiApplication::instance()->thread();