diff --git a/src/widgets/kernel/qrhiwidget.cpp b/src/widgets/kernel/qrhiwidget.cpp index dbb1cec5520..0382caecc7e 100644 --- a/src/widgets/kernel/qrhiwidget.cpp +++ b/src/widgets/kernel/qrhiwidget.cpp @@ -145,12 +145,12 @@ QT_BEGIN_NAMESPACE \enum QRhiWidget::Api Specifies the 3D API and QRhi backend to use + \value Null \value OpenGL \value Metal \value Vulkan \value Direct3D11 \value Direct3D12 - \value Null \sa QRhi */ @@ -727,7 +727,7 @@ QRhiWidget::Api QRhiWidget::api() const backend to render. Attempting to set another value, or to add another QRhiWidget with a different \a api will not function as expected. - \sa setColorBufferFormat(), setDebugLayer(), api() + \sa setColorBufferFormat(), setDebugLayerEnabled(), api() */ void QRhiWidget::setApi(Api api) { @@ -758,7 +758,7 @@ void QRhiWidget::setApi(Api api) \return true if a debug or validation layer will be requested if applicable to the graphics API in use. - \sa setDebugLayer() + \sa setDebugLayerEnabled() */ bool QRhiWidget::isDebugLayerEnabled() const { @@ -781,7 +781,7 @@ bool QRhiWidget::isDebugLayerEnabled() const \sa setApi(), isDebugLayerEnabled() */ -void QRhiWidget::setDebugLayer(bool enable) +void QRhiWidget::setDebugLayerEnabled(bool enable) { Q_D(QRhiWidget); d->config.setDebugLayer(enable); diff --git a/src/widgets/kernel/qrhiwidget.h b/src/widgets/kernel/qrhiwidget.h index de2e8d2b1e0..6a95ec12395 100644 --- a/src/widgets/kernel/qrhiwidget.h +++ b/src/widgets/kernel/qrhiwidget.h @@ -25,16 +25,16 @@ class Q_WIDGETS_EXPORT QRhiWidget : public QWidget Q_PROPERTY(bool mirrorVertically READ isMirrorVerticallyEnabled WRITE setMirrorVertically NOTIFY mirrorVerticallyChanged) public: - QRhiWidget(QWidget *parent = nullptr, Qt::WindowFlags f = {}); - ~QRhiWidget(); + explicit QRhiWidget(QWidget *parent = nullptr, Qt::WindowFlags f = {}); + ~QRhiWidget() override; enum class Api { + Null, OpenGL, Metal, Vulkan, Direct3D11, Direct3D12, - Null }; Q_ENUM(Api) @@ -42,7 +42,7 @@ public: RGBA8, RGBA16F, RGBA32F, - RGB10A2 + RGB10A2, }; Q_ENUM(TextureFormat) @@ -50,7 +50,7 @@ public: void setApi(Api api); bool isDebugLayerEnabled() const; - void setDebugLayer(bool enable); + void setDebugLayerEnabled(bool enable); int sampleCount() const; void setSampleCount(int samples);