diff options
author | Laszlo Agocs <[email protected]> | 2023-05-16 10:44:34 +0200 |
---|---|---|
committer | Laszlo Agocs <[email protected]> | 2023-06-01 09:09:49 +0200 |
commit | da4de6b6e361879993f834ed4c157d5bdba2c050 (patch) | |
tree | cb45136d2de1607cbebc3f52779accbd31946a66 | |
parent | 3c6c3eccd1f91bd1ae0a518318ef264f8eff63f5 (diff) |
Polish forward decl in vulkan and opengl examples
Pick-to: 6.5
Change-Id: I9f05aedc7649ab7e248b7332c04a6664e85182d8
Reviewed-by: Laszlo Agocs <[email protected]>
Reviewed-by: Andy Nichols <[email protected]>
-rw-r--r-- | examples/opengl/hellogl2/window.h | 6 | ||||
-rw-r--r-- | examples/opengl/hellogles3/glwindow.h | 12 | ||||
-rw-r--r-- | examples/opengl/openglwindow/openglwindow.h | 8 | ||||
-rw-r--r-- | examples/vulkan/hellovulkancubes/mainwindow.h | 10 | ||||
-rw-r--r-- | examples/vulkan/hellovulkanwidget/hellovulkanwidget.h | 10 |
5 files changed, 17 insertions, 29 deletions
diff --git a/examples/opengl/hellogl2/window.h b/examples/opengl/hellogl2/window.h index f9e06079039..2099bc119ae 100644 --- a/examples/opengl/hellogl2/window.h +++ b/examples/opengl/hellogl2/window.h @@ -6,10 +6,8 @@ #include <QWidget> -QT_BEGIN_NAMESPACE -class QSlider; -class QPushButton; -QT_END_NAMESPACE +QT_FORWARD_DECLARE_CLASS(QSlider) +QT_FORWARD_DECLARE_CLASS(QPushButton) class GLWidget; class MainWindow; diff --git a/examples/opengl/hellogles3/glwindow.h b/examples/opengl/hellogles3/glwindow.h index fc2a0e487ef..54bc531af81 100644 --- a/examples/opengl/hellogles3/glwindow.h +++ b/examples/opengl/hellogles3/glwindow.h @@ -9,14 +9,10 @@ #include <QVector3D> #include "../hellogl2/logo.h" -QT_BEGIN_NAMESPACE - -class QOpenGLTexture; -class QOpenGLShaderProgram; -class QOpenGLBuffer; -class QOpenGLVertexArrayObject; - -QT_END_NAMESPACE +QT_FORWARD_DECLARE_CLASS(QOpenGLTexture) +QT_FORWARD_DECLARE_CLASS(QOpenGLShaderProgram) +QT_FORWARD_DECLARE_CLASS(QOpenGLBuffer) +QT_FORWARD_DECLARE_CLASS(QOpenGLVertexArrayObject) class GLWindow : public QOpenGLWindow { diff --git a/examples/opengl/openglwindow/openglwindow.h b/examples/opengl/openglwindow/openglwindow.h index 579f9eede49..41bcbab9c42 100644 --- a/examples/opengl/openglwindow/openglwindow.h +++ b/examples/opengl/openglwindow/openglwindow.h @@ -7,11 +7,9 @@ #include <QWindow> #include <QOpenGLFunctions> -QT_BEGIN_NAMESPACE -class QPainter; -class QOpenGLContext; -class QOpenGLPaintDevice; -QT_END_NAMESPACE +QT_FORWARD_DECLARE_CLASS(QPainter) +QT_FORWARD_DECLARE_CLASS(QOpenGLContext) +QT_FORWARD_DECLARE_CLASS(QOpenGLPaintDevice) //! [1] class OpenGLWindow : public QWindow, protected QOpenGLFunctions diff --git a/examples/vulkan/hellovulkancubes/mainwindow.h b/examples/vulkan/hellovulkancubes/mainwindow.h index 2e931c1a526..8ecb0002e75 100644 --- a/examples/vulkan/hellovulkancubes/mainwindow.h +++ b/examples/vulkan/hellovulkancubes/mainwindow.h @@ -6,12 +6,10 @@ #include <QWidget> -QT_BEGIN_NAMESPACE -class QLCDNumber; -class QLabel; -class QPushButton; -class QCheckBox; -QT_END_NAMESPACE +QT_FORWARD_DECLARE_CLASS(QLCDNumber) +QT_FORWARD_DECLARE_CLASS(QLabel) +QT_FORWARD_DECLARE_CLASS(QPushButton) +QT_FORWARD_DECLARE_CLASS(QCheckBox) class VulkanWindow; diff --git a/examples/vulkan/hellovulkanwidget/hellovulkanwidget.h b/examples/vulkan/hellovulkanwidget/hellovulkanwidget.h index d545e681727..cbebe17f64d 100644 --- a/examples/vulkan/hellovulkanwidget/hellovulkanwidget.h +++ b/examples/vulkan/hellovulkanwidget/hellovulkanwidget.h @@ -7,13 +7,11 @@ #include "../shared/trianglerenderer.h" #include <QWidget> -class VulkanWindow; +QT_FORWARD_DECLARE_CLASS(QTabWidget) +QT_FORWARD_DECLARE_CLASS(QPlainTextEdit) +QT_FORWARD_DECLARE_CLASS(QLCDNumber) -QT_BEGIN_NAMESPACE -class QTabWidget; -class QPlainTextEdit; -class QLCDNumber; -QT_END_NAMESPACE +class VulkanWindow; class MainWindow : public QWidget { |