From 762afd33ad89680f96baed409f443ffd2e50e112 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 30 Jan 2023 14:32:42 +0100 Subject: Examples: Add missing include guards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-109394 Change-Id: I09a1b522d0faeb2346e1e075141f1e810c8155f7 Reviewed-by: Amir Masoud Abdol Reviewed-by: MÃ¥rten Nordheim (cherry picked from commit ddb94dd7927126978fc2a620ebd91954e2f96862) Reviewed-by: Qt Cherry-pick Bot --- examples/opengl/hellowindow/hellowindow.h | 5 +++++ examples/opengl/openglwindow/openglwindow.h | 4 ++++ examples/opengl/paintedwindow/paintedwindow.h | 5 +++++ examples/qpa/windows/window.h | 5 +++++ examples/vulkan/hellovulkantexture/hellovulkantexture.h | 5 +++++ examples/vulkan/hellovulkanwidget/hellovulkanwidget.h | 5 +++++ examples/vulkan/hellovulkanwindow/hellovulkanwindow.h | 5 +++++ examples/vulkan/shared/trianglerenderer.h | 5 +++++ examples/widgets/animation/easing/window.h | 5 +++++ examples/widgets/graphicsview/flowlayout/flowlayout.h | 5 +++++ examples/widgets/graphicsview/flowlayout/window.h | 5 +++++ examples/widgets/widgets/validators/validatorwidget.h | 5 +++++ 12 files changed, 59 insertions(+) (limited to 'examples') diff --git a/examples/opengl/hellowindow/hellowindow.h b/examples/opengl/hellowindow/hellowindow.h index 51c326c75f..1e117ab2e0 100644 --- a/examples/opengl/hellowindow/hellowindow.h +++ b/examples/opengl/hellowindow/hellowindow.h @@ -1,6 +1,9 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#ifndef HELLOWINDOW_H +#define HELLOWINDOW_H + #include #include @@ -70,3 +73,5 @@ private: QColor m_color; const QSharedPointer m_renderer; }; + +#endif // HELLOWINDOW_H diff --git a/examples/opengl/openglwindow/openglwindow.h b/examples/opengl/openglwindow/openglwindow.h index 7206fc57ef..579f9eede4 100644 --- a/examples/opengl/openglwindow/openglwindow.h +++ b/examples/opengl/openglwindow/openglwindow.h @@ -1,6 +1,9 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#ifndef OPENGLWINDOW_H +#define OPENGLWINDOW_H + #include #include @@ -42,3 +45,4 @@ private: }; //! [1] +#endif // OPENGLWINDOW_H diff --git a/examples/opengl/paintedwindow/paintedwindow.h b/examples/opengl/paintedwindow/paintedwindow.h index 3fa781bf2c..11a76a3056 100644 --- a/examples/opengl/paintedwindow/paintedwindow.h +++ b/examples/opengl/paintedwindow/paintedwindow.h @@ -1,6 +1,9 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#ifndef PAINTEDWINDOW_H +#define PAINTEDWINDOW_H + #include #include @@ -55,3 +58,5 @@ private: QPropertyAnimation *m_animation; QTimer *m_paintTimer; }; + +#endif // PAINTEDWINDOW_H diff --git a/examples/qpa/windows/window.h b/examples/qpa/windows/window.h index 0e0aca40c8..c7eae4028a 100644 --- a/examples/qpa/windows/window.h +++ b/examples/qpa/windows/window.h @@ -1,6 +1,9 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#ifndef WINDOW_H +#define WINDOW_H + #include #include @@ -34,3 +37,5 @@ private: QBackingStore *m_backingStore; int m_renderTimer; }; + +#endif // WINDOW_H diff --git a/examples/vulkan/hellovulkantexture/hellovulkantexture.h b/examples/vulkan/hellovulkantexture/hellovulkantexture.h index 893d953b6c..251bdfb2e2 100644 --- a/examples/vulkan/hellovulkantexture/hellovulkantexture.h +++ b/examples/vulkan/hellovulkantexture/hellovulkantexture.h @@ -1,6 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#ifndef HELLOVULKANTEXTURE_H +#define HELLOVULKANTEXTURE_H + #include #include @@ -59,3 +62,5 @@ class VulkanWindow : public QVulkanWindow public: QVulkanWindowRenderer *createRenderer() override; }; + +#endif // HELLOVULKANTEXTURE_H diff --git a/examples/vulkan/hellovulkanwidget/hellovulkanwidget.h b/examples/vulkan/hellovulkanwidget/hellovulkanwidget.h index f4bcd5bb58..d545e68172 100644 --- a/examples/vulkan/hellovulkanwidget/hellovulkanwidget.h +++ b/examples/vulkan/hellovulkanwidget/hellovulkanwidget.h @@ -1,6 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#ifndef HELLOVULKANWIDGET_H +#define HELLOVULKANWIDGET_H + #include "../shared/trianglerenderer.h" #include @@ -51,3 +54,5 @@ signals: void vulkanInfoReceived(const QString &text); void frameQueued(int colorValue); }; + +#endif // HELLOVULKANWIDGET_H diff --git a/examples/vulkan/hellovulkanwindow/hellovulkanwindow.h b/examples/vulkan/hellovulkanwindow/hellovulkanwindow.h index 783abef2a9..ee203fb615 100644 --- a/examples/vulkan/hellovulkanwindow/hellovulkanwindow.h +++ b/examples/vulkan/hellovulkanwindow/hellovulkanwindow.h @@ -1,6 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#ifndef HELLOVULKANWINDOW_H +#define HELLOVULKANWINDOW_H + #include //! [0] @@ -28,3 +31,5 @@ public: QVulkanWindowRenderer *createRenderer() override; }; //! [0] + +#endif // HELLOVULKANWINDOW_H diff --git a/examples/vulkan/shared/trianglerenderer.h b/examples/vulkan/shared/trianglerenderer.h index 37fa608973..129c35aed9 100644 --- a/examples/vulkan/shared/trianglerenderer.h +++ b/examples/vulkan/shared/trianglerenderer.h @@ -1,6 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#ifndef TRIANGLERENDERER_H +#define TRIANGLERENDERER_H + #include class TriangleRenderer : public QVulkanWindowRenderer @@ -36,3 +39,5 @@ protected: QMatrix4x4 m_proj; float m_rotation = 0.0f; }; + +#endif // TRIANGLERENDERER_H diff --git a/examples/widgets/animation/easing/window.h b/examples/widgets/animation/easing/window.h index b454d1853f..ea6bb74667 100644 --- a/examples/widgets/animation/easing/window.h +++ b/examples/widgets/animation/easing/window.h @@ -1,6 +1,9 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#ifndef WINDOW_H +#define WINDOW_H + #include #include "ui_form.h" @@ -37,3 +40,5 @@ private: Animation *m_anim; QSize m_iconSize; }; + +#endif // WINDOW_H diff --git a/examples/widgets/graphicsview/flowlayout/flowlayout.h b/examples/widgets/graphicsview/flowlayout/flowlayout.h index 43c469ac3c..028394827a 100644 --- a/examples/widgets/graphicsview/flowlayout/flowlayout.h +++ b/examples/widgets/graphicsview/flowlayout/flowlayout.h @@ -1,6 +1,9 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#ifndef FLOWLAYOUT_H +#define FLOWLAYOUT_H + #include class FlowLayout : public QGraphicsLayout @@ -37,3 +40,5 @@ inline void FlowLayout::addItem(QGraphicsLayoutItem *item) { insertItem(-1, item); } + +#endif // FLOWLAYOUT_H diff --git a/examples/widgets/graphicsview/flowlayout/window.h b/examples/widgets/graphicsview/flowlayout/window.h index 54c27929ac..2fc5570406 100644 --- a/examples/widgets/graphicsview/flowlayout/window.h +++ b/examples/widgets/graphicsview/flowlayout/window.h @@ -1,6 +1,9 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#ifndef WINDOW_H +#define WINDOW_H + #include class Window : public QGraphicsWidget @@ -9,3 +12,5 @@ class Window : public QGraphicsWidget public: Window(QGraphicsItem *parent = nullptr); }; + +#endif // WINDOW_H diff --git a/examples/widgets/widgets/validators/validatorwidget.h b/examples/widgets/widgets/validators/validatorwidget.h index 635257f16b..d186c5863b 100644 --- a/examples/widgets/widgets/validators/validatorwidget.h +++ b/examples/widgets/widgets/validators/validatorwidget.h @@ -1,6 +1,9 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#ifndef VALIDATORWIDGET_H +#define VALIDATORWIDGET_H + #include #include "ui_validators.h" @@ -15,3 +18,5 @@ private slots: void updateValidator(); void updateDoubleValidator(); }; + +#endif // VALIDATORWIDGET_H -- cgit v1.2.1