summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-01-30 14:32:42 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-02-01 20:52:02 +0000
commitd4c76a683f684541d3c110d0f496493bcea28ded (patch)
tree9e44b51b006bdf1c21e6f39d8557246d32ab35ef
parent379649dd8bb7b0d68dbf81b215be50a7dcc3f49a (diff)
Examples: Add missing include guards
Task-number: QTBUG-109394 Change-Id: I09a1b522d0faeb2346e1e075141f1e810c8155f7 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> (cherry picked from commit ddb94dd7927126978fc2a620ebd91954e2f96862) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <QWidget>
#include "ui_validators.h"
@@ -15,3 +18,5 @@ private slots:
void updateValidator();
void updateDoubleValidator();
};
+
+#endif // VALIDATORWIDGET_H