summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <[email protected]>2023-01-30 14:32:42 +0100
committerFriedemann Kleint <[email protected]>2023-02-01 18:12:36 +0000
commitddb94dd7927126978fc2a620ebd91954e2f96862 (patch)
tree6e36b086e114a6084f3256e408ef85b8432b0c1d
parentae92c571a36703f6ab95d98b55d070cc57023376 (diff)
Examples: Add missing include guards
Pick-to: 6.5 6.4 6.2 Task-number: QTBUG-109394 Change-Id: I09a1b522d0faeb2346e1e075141f1e810c8155f7 Reviewed-by: Amir Masoud Abdol <[email protected]> Reviewed-by: MÃ¥rten Nordheim <[email protected]>
-rw-r--r--examples/opengl/hellowindow/hellowindow.h5
-rw-r--r--examples/opengl/openglwindow/openglwindow.h4
-rw-r--r--examples/opengl/paintedwindow/paintedwindow.h5
-rw-r--r--examples/qpa/windows/window.h5
-rw-r--r--examples/vulkan/hellovulkantexture/hellovulkantexture.h5
-rw-r--r--examples/vulkan/hellovulkanwidget/hellovulkanwidget.h5
-rw-r--r--examples/vulkan/hellovulkanwindow/hellovulkanwindow.h5
-rw-r--r--examples/vulkan/shared/trianglerenderer.h5
-rw-r--r--examples/widgets/animation/easing/window.h5
-rw-r--r--examples/widgets/graphicsview/flowlayout/flowlayout.h5
-rw-r--r--examples/widgets/graphicsview/flowlayout/window.h5
-rw-r--r--examples/widgets/widgets/validators/validatorwidget.h5
12 files changed, 59 insertions, 0 deletions
diff --git a/examples/opengl/hellowindow/hellowindow.h b/examples/opengl/hellowindow/hellowindow.h
index 51c326c75fc..1e117ab2e05 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 <QWindow>
#include <QColor>
@@ -70,3 +73,5 @@ private:
QColor m_color;
const QSharedPointer<Renderer> m_renderer;
};
+
+#endif // HELLOWINDOW_H
diff --git a/examples/opengl/openglwindow/openglwindow.h b/examples/opengl/openglwindow/openglwindow.h
index 7206fc57efc..579f9eede49 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 <QWindow>
#include <QOpenGLFunctions>
@@ -42,3 +45,4 @@ private:
};
//! [1]
+#endif // OPENGLWINDOW_H
diff --git a/examples/opengl/paintedwindow/paintedwindow.h b/examples/opengl/paintedwindow/paintedwindow.h
index 3fa781bf2ca..11a76a30560 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 <QWindow>
#include <QtGui/qopengl.h>
@@ -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 0e0aca40c89..c7eae4028ae 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 <QWindow>
#include <QImage>
@@ -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 893d953b6c5..251bdfb2e26 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 <QVulkanWindow>
#include <QImage>
@@ -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 f4bcd5bb581..d545e681727 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 <QWidget>
@@ -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 783abef2a9f..ee203fb6156 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 <QVulkanWindow>
//! [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 37fa6089734..129c35aed92 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 <QVulkanWindow>
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 b454d1853f1..ea6bb746679 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 <QtWidgets>
#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 43c469ac3c5..028394827a2 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 <QGraphicsLayout>
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 54c27929ac1..2fc55704067 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 <QGraphicsWidget>
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 635257f16b9..d186c5863ba 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 <QWidget>
#include "ui_validators.h"
@@ -15,3 +18,5 @@ private slots:
void updateValidator();
void updateDoubleValidator();
};
+
+#endif // VALIDATORWIDGET_H