From 91f9ba2993a2652bcb349ce639aff67b5bfc8938 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 29 Feb 2024 10:25:19 +0100 Subject: [PATCH] XCB: replace header guards with #pragma once Following qtbase/1c8884fc277c5916a420a3c14de68547a391f9fc's making syncqt error out when an installable header contains #pragma once, we can now flip the coin and use #pragma once as a static assertion that the given header is not going to be installed, making it easier to understand which headers are "public", which ones are "private" and which ones are "neither, since never installed". Do this for the XCB platform support files. In qxcbglintegration.h, the header guard was actually broken (had only #ifndef and #endif, was missing the actual #define). As a drive-by, normalize vertical whitespace. Pick-to: 6.9 6.8 6.5 Change-Id: Iede0605c38cda7606edfc7155bd8bfc95990c5bc Reviewed-by: Alexey Edelev --- .../platforms/xcb/gl_integrations/qxcbglintegration.h | 4 +--- .../xcb/gl_integrations/qxcbglintegrationfactory.h | 6 +----- .../platforms/xcb/gl_integrations/qxcbglintegrationplugin.h | 5 +---- .../xcb/gl_integrations/qxcbnativeinterfacehandler.h | 5 +---- .../platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h | 5 +---- .../platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h | 5 +---- .../xcb/gl_integrations/xcb_egl/qxcbeglintegration.h | 4 +--- .../gl_integrations/xcb_egl/qxcbeglnativeinterfacehandler.h | 5 +---- .../platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.h | 4 +--- .../platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h | 5 +---- .../xcb/gl_integrations/xcb_glx/qxcbglxintegration.h | 5 +---- .../gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.h | 5 +---- .../platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.h | 5 +---- .../platforms/xcb/nativepainting/qbackingstore_x11_p.h | 5 +---- src/plugins/platforms/xcb/nativepainting/qcolormap_x11_p.h | 5 +---- .../platforms/xcb/nativepainting/qpaintengine_x11_p.h | 5 +---- src/plugins/platforms/xcb/nativepainting/qpixmap_x11_p.h | 5 +---- .../platforms/xcb/nativepainting/qpolygonclipper_p.h | 5 +---- src/plugins/platforms/xcb/nativepainting/qt_x11_p.h | 5 +---- src/plugins/platforms/xcb/nativepainting/qtessellator_p.h | 5 +---- .../platforms/xcb/nativepainting/qxcbnativepainting.h | 5 +---- src/plugins/platforms/xcb/qt_xlib_wrapper.h | 5 +---- src/plugins/platforms/xcb/qxcbatom.h | 5 +---- src/plugins/platforms/xcb/qxcbbackingstore.h | 5 +---- src/plugins/platforms/xcb/qxcbclipboard.h | 5 +---- src/plugins/platforms/xcb/qxcbconnection.h | 5 +---- src/plugins/platforms/xcb/qxcbconnection_basic.h | 6 ++---- src/plugins/platforms/xcb/qxcbcursor.h | 5 +---- src/plugins/platforms/xcb/qxcbcursorfont.h | 5 +---- src/plugins/platforms/xcb/qxcbdrag.h | 5 +---- src/plugins/platforms/xcb/qxcbeventdispatcher.h | 6 ++---- src/plugins/platforms/xcb/qxcbeventqueue.h | 6 ++---- src/plugins/platforms/xcb/qxcbexport.h | 5 +---- src/plugins/platforms/xcb/qxcbimage.h | 5 +---- src/plugins/platforms/xcb/qxcbintegration.h | 5 +---- src/plugins/platforms/xcb/qxcbkeyboard.h | 5 +---- src/plugins/platforms/xcb/qxcbmime.h | 5 +---- src/plugins/platforms/xcb/qxcbnativeinterface.h | 5 +---- src/plugins/platforms/xcb/qxcbobject.h | 5 +---- src/plugins/platforms/xcb/qxcbscreen.h | 5 +---- src/plugins/platforms/xcb/qxcbscrollingdevice_p.h | 5 +---- src/plugins/platforms/xcb/qxcbsessionmanager.h | 5 +---- src/plugins/platforms/xcb/qxcbsystemtraytracker.h | 5 +---- src/plugins/platforms/xcb/qxcbvulkaninstance.h | 5 +---- src/plugins/platforms/xcb/qxcbvulkanwindow.h | 5 +---- src/plugins/platforms/xcb/qxcbwindow.h | 5 +---- src/plugins/platforms/xcb/qxcbwmsupport.h | 6 ++---- src/plugins/platforms/xcb/qxcbxsettings.h | 5 +---- 48 files changed, 52 insertions(+), 190 deletions(-) diff --git a/src/plugins/platforms/xcb/gl_integrations/qxcbglintegration.h b/src/plugins/platforms/xcb/gl_integrations/qxcbglintegration.h index 8e2b3aed224..fb77a38860c 100644 --- a/src/plugins/platforms/xcb/gl_integrations/qxcbglintegration.h +++ b/src/plugins/platforms/xcb/gl_integrations/qxcbglintegration.h @@ -1,7 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBGLINTEGRATION_H +#pragma once #include "qxcbexport.h" #include "qxcbwindow.h" @@ -37,5 +37,3 @@ public: }; QT_END_NAMESPACE - -#endif //QXCBGLINTEGRATION_H diff --git a/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.h b/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.h index bb169aee4a6..021f310ad5a 100644 --- a/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.h +++ b/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBGLINTEGRATIONFACTORY_H -#define QXCBGLINTEGRATIONFACTORY_H +#pragma once #include @@ -17,6 +16,3 @@ public: }; QT_END_NAMESPACE - -#endif //QXCBGLINTEGRATIONFACTORY_H - diff --git a/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationplugin.h b/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationplugin.h index 3de9d3f408c..fb2a930287f 100644 --- a/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationplugin.h +++ b/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationplugin.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBGLINTEGRATIONPLUGIN_H -#define QXCBGLINTEGRATIONPLUGIN_H +#pragma once #include "qxcbexport.h" #include @@ -28,5 +27,3 @@ public: QXcbGlIntegration *create(const QString &) { return create(); } }; QT_END_NAMESPACE - -#endif //QXCBGLINTEGRATIONPLUGIN_H diff --git a/src/plugins/platforms/xcb/gl_integrations/qxcbnativeinterfacehandler.h b/src/plugins/platforms/xcb/gl_integrations/qxcbnativeinterfacehandler.h index 58c28c85b02..f3e6f489e57 100644 --- a/src/plugins/platforms/xcb/gl_integrations/qxcbnativeinterfacehandler.h +++ b/src/plugins/platforms/xcb/gl_integrations/qxcbnativeinterfacehandler.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBNATIVEINTERFACEHANDLER_H -#define QXCBNATIVEINTERFACEHANDLER_H +#pragma once #include #include @@ -30,5 +29,3 @@ protected: }; QT_END_NAMESPACE - -#endif //QXCBNATIVEINTERFACEHANDLER_H diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h index 3044493291f..1598da86ab5 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBEGLCONTEXT_H -#define QXCBEGLCONTEXT_H +#pragma once #include "qxcbeglwindow.h" #include @@ -52,5 +51,3 @@ public: }; QT_END_NAMESPACE -#endif //QXCBEGLCONTEXT_H - diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h index d12501bd90d..cf010e51a25 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBINCLUDE_H -#define QXCBINCLUDE_H +#pragma once #include #include @@ -14,5 +13,3 @@ QT_BEGIN_NAMESPACE QT_END_NAMESPACE - -#endif //QXCBINCLUDE_H diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.h b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.h index 7caf4304bcb..bd60677e9d2 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.h +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBEGLINTEGRATION_H -#define QXCBEGLINTEGRATION_H +#pragma once #include "qxcbglintegration.h" @@ -51,4 +50,3 @@ private: }; QT_END_NAMESPACE -#endif //QXCBEGLINTEGRATION_H diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglnativeinterfacehandler.h b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglnativeinterfacehandler.h index fdd48fc8425..e147f251796 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglnativeinterfacehandler.h +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglnativeinterfacehandler.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBEGLNATIVEINTERFACEHANDLER_H -#define QXCBEGLNATIVEINTERFACEHANDLER_H +#pragma once #include "qxcbnativeinterfacehandler.h" @@ -30,5 +29,3 @@ private: }; QT_END_NAMESPACE - -#endif //QXCBEGLNATIVEINTERFACEHANDLER_H diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.h b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.h index 935a0c6d43f..d045158b687 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.h +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBEGLWINDOW_H -#define QXCBEGLWINDOW_H +#pragma once #include "qxcbwindow.h" @@ -34,4 +33,3 @@ private: }; QT_END_NAMESPACE -#endif //QXCBEGLWINDOW_H diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h index f46ae46b31e..8e80733c619 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QGLXINTEGRATION_H -#define QGLXINTEGRATION_H +#pragma once #include "qxcbwindow.h" #include "qxcbscreen.h" @@ -76,5 +75,3 @@ private: }; QT_END_NAMESPACE - -#endif diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h index 797f6c4b3fe..077af6f2de3 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBGLXINTEGRATION_H -#define QXCBGLXINTEGRATION_H +#pragma once #include "qxcbglintegration.h" @@ -36,5 +35,3 @@ private: }; QT_END_NAMESPACE - -#endif //QXCBGLXINTEGRATION_H diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.h b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.h index 5ca329a3685..73a7b7b8b5a 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.h +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBGLXNATIVEINTERFACEHANDLER_H -#define QXCBGLXNATIVEINTERFACEHANDLER_H +#pragma once #include "qxcbnativeinterfacehandler.h" @@ -25,5 +24,3 @@ private: }; QT_END_NAMESPACE - -#endif //QXCBGLXNATIVEINTERFACEHANDLER_H diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.h b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.h index 3b39dc1ba08..05902efb883 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.h +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBGLXWINDOW_H -#define QXCBGLXWINDOW_H +#pragma once #include "qxcbglxintegration.h" #include "qxcbwindow.h" @@ -20,5 +19,3 @@ protected: }; QT_END_NAMESPACE - -#endif //QXCBGLXWINDOW_H diff --git a/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11_p.h b/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11_p.h index f57a5be9a68..f2851adf23e 100644 --- a/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11_p.h +++ b/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11_p.h @@ -1,8 +1,7 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QBACKINGSTORE_X11_H -#define QBACKINGSTORE_X11_H +#pragma once #include @@ -36,5 +35,3 @@ private: }; QT_END_NAMESPACE - -#endif // QBACKINGSTORE_X11_H diff --git a/src/plugins/platforms/xcb/nativepainting/qcolormap_x11_p.h b/src/plugins/platforms/xcb/nativepainting/qcolormap_x11_p.h index eedf798e008..56955ee7939 100644 --- a/src/plugins/platforms/xcb/nativepainting/qcolormap_x11_p.h +++ b/src/plugins/platforms/xcb/nativepainting/qcolormap_x11_p.h @@ -1,8 +1,7 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QCOLORMAP_X11_H -#define QCOLORMAP_X11_H +#pragma once #include #include @@ -41,5 +40,3 @@ private: }; QT_END_NAMESPACE - -#endif // QCOLORMAP_X11_H diff --git a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h index f799fdd900b..ad8ac57d259 100644 --- a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h +++ b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h @@ -1,8 +1,7 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QPAINTENGINE_X11_H -#define QPAINTENGINE_X11_H +#pragma once #include @@ -84,5 +83,3 @@ private: }; QT_END_NAMESPACE - -#endif // QPAINTENGINE_X11_H diff --git a/src/plugins/platforms/xcb/nativepainting/qpixmap_x11_p.h b/src/plugins/platforms/xcb/nativepainting/qpixmap_x11_p.h index 7d830baaa7d..b7a633f5b8e 100644 --- a/src/plugins/platforms/xcb/nativepainting/qpixmap_x11_p.h +++ b/src/plugins/platforms/xcb/nativepainting/qpixmap_x11_p.h @@ -1,8 +1,7 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QX11PLATFORMPIXMAP_H -#define QX11PLATFORMPIXMAP_H +#pragma once #include #include @@ -129,5 +128,3 @@ int qt_x11SetDefaultScreen(int screen); void qt_x11SetScreen(QPixmap &pixmap, int screen); QT_END_NAMESPACE - -#endif // QX11PLATFORMPIXMAP_H diff --git a/src/plugins/platforms/xcb/nativepainting/qpolygonclipper_p.h b/src/plugins/platforms/xcb/nativepainting/qpolygonclipper_p.h index e640fc11a0c..fb0e0dd34cf 100644 --- a/src/plugins/platforms/xcb/nativepainting/qpolygonclipper_p.h +++ b/src/plugins/platforms/xcb/nativepainting/qpolygonclipper_p.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QPOLYGONCLIPPER_P_H -#define QPOLYGONCLIPPER_P_H +#pragma once // // W A R N I N G @@ -276,5 +275,3 @@ private: }; QT_END_NAMESPACE - -#endif // QPOLYGONCLIPPER_P_H diff --git a/src/plugins/platforms/xcb/nativepainting/qt_x11_p.h b/src/plugins/platforms/xcb/nativepainting/qt_x11_p.h index 66e0aa2cf85..4307429d2cd 100644 --- a/src/plugins/platforms/xcb/nativepainting/qt_x11_p.h +++ b/src/plugins/platforms/xcb/nativepainting/qt_x11_p.h @@ -1,8 +1,7 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QT_X11_P_H -#define QT_X11_P_H +#pragma once #define register /* C++17 deprecated register */ #include @@ -161,5 +160,3 @@ constexpr inline int lowest_bit(T v) noexcept } QT_END_NAMESPACE - -#endif // QT_X11_P_H diff --git a/src/plugins/platforms/xcb/nativepainting/qtessellator_p.h b/src/plugins/platforms/xcb/nativepainting/qtessellator_p.h index 70379c9e554..9b64f6fdea8 100644 --- a/src/plugins/platforms/xcb/nativepainting/qtessellator_p.h +++ b/src/plugins/platforms/xcb/nativepainting/qtessellator_p.h @@ -1,8 +1,7 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QTESSELATOR_P_H -#define QTESSELATOR_P_H +#pragma once #include #include @@ -49,5 +48,3 @@ private: }; QT_END_NAMESPACE - -#endif diff --git a/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.h b/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.h index 5ee42986459..58d9b99ed38 100644 --- a/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.h +++ b/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.h @@ -1,8 +1,7 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBNATIVEPAINTING_H -#define QXCBNATIVEPAINTING_H +#pragma once #include #include "qt_x11_p.h" @@ -62,5 +61,3 @@ private: }; QT_END_NAMESPACE - -#endif // QXCBNATIVEPAINTING_H diff --git a/src/plugins/platforms/xcb/qt_xlib_wrapper.h b/src/plugins/platforms/xcb/qt_xlib_wrapper.h index 642dbdeadd3..0439adb609c 100644 --- a/src/plugins/platforms/xcb/qt_xlib_wrapper.h +++ b/src/plugins/platforms/xcb/qt_xlib_wrapper.h @@ -1,7 +1,6 @@ // Copyright (C) 2022 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QT_XLIB_WRAPPER_H -#define QT_XLIB_WRAPPER_H +#pragma once #ifdef __cplusplus extern "C" { @@ -13,5 +12,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif // QT_XLIB_WRAPPER_H diff --git a/src/plugins/platforms/xcb/qxcbatom.h b/src/plugins/platforms/xcb/qxcbatom.h index 7dd52f122c7..eccb0dc62ce 100644 --- a/src/plugins/platforms/xcb/qxcbatom.h +++ b/src/plugins/platforms/xcb/qxcbatom.h @@ -1,7 +1,6 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBATOM_H -#define QXCBATOM_H +#pragma once #include @@ -230,5 +229,3 @@ protected: private: xcb_atom_t m_allAtoms[QXcbAtom::NAtoms]; }; - -#endif // QXCBATOM_H diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.h b/src/plugins/platforms/xcb/qxcbbackingstore.h index 979b2543267..674640780eb 100644 --- a/src/plugins/platforms/xcb/qxcbbackingstore.h +++ b/src/plugins/platforms/xcb/qxcbbackingstore.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBBACKINGSTORE_H -#define QXCBBACKINGSTORE_H +#pragma once #include #include @@ -77,5 +76,3 @@ private: }; QT_END_NAMESPACE - -#endif diff --git a/src/plugins/platforms/xcb/qxcbclipboard.h b/src/plugins/platforms/xcb/qxcbclipboard.h index 4538481f1cc..36eff4d8dfc 100644 --- a/src/plugins/platforms/xcb/qxcbclipboard.h +++ b/src/plugins/platforms/xcb/qxcbclipboard.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBCLIPBOARD_H -#define QXCBCLIPBOARD_H +#pragma once #include #include @@ -110,5 +109,3 @@ private: #endif // QT_NO_CLIPBOARD QT_END_NAMESPACE - -#endif // QXCBCLIPBOARD_H diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h index b99a48cdc55..41cf7d4b35b 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.h +++ b/src/plugins/platforms/xcb/qxcbconnection.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBCONNECTION_H -#define QXCBCONNECTION_H +#pragma once #include #include @@ -376,5 +375,3 @@ template struct alignas(32) q_padded_xcb_event : T { }; QT_END_NAMESPACE - -#endif diff --git a/src/plugins/platforms/xcb/qxcbconnection_basic.h b/src/plugins/platforms/xcb/qxcbconnection_basic.h index 586b45e8a7c..b66bb384c82 100644 --- a/src/plugins/platforms/xcb/qxcbconnection_basic.h +++ b/src/plugins/platforms/xcb/qxcbconnection_basic.h @@ -1,7 +1,7 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBBASICCONNECTION_H -#define QXCBBASICCONNECTION_H + +#pragma once #include "qxcbatom.h" #include "qxcbexport.h" @@ -137,5 +137,3 @@ struct QStdFreeDeleter { ) QT_END_NAMESPACE - -#endif // QXCBBASICCONNECTION_H diff --git a/src/plugins/platforms/xcb/qxcbcursor.h b/src/plugins/platforms/xcb/qxcbcursor.h index 5ec553119da..d8c78882878 100644 --- a/src/plugins/platforms/xcb/qxcbcursor.h +++ b/src/plugins/platforms/xcb/qxcbcursor.h @@ -1,8 +1,7 @@ // Copyright (C) 2022 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBCURSOR_H -#define QXCBCURSOR_H +#pragma once #include #include "qxcbscreen.h" @@ -103,5 +102,3 @@ private: }; QT_END_NAMESPACE - -#endif diff --git a/src/plugins/platforms/xcb/qxcbcursorfont.h b/src/plugins/platforms/xcb/qxcbcursorfont.h index fe74e276919..92108641909 100644 --- a/src/plugins/platforms/xcb/qxcbcursorfont.h +++ b/src/plugins/platforms/xcb/qxcbcursorfont.h @@ -3,8 +3,7 @@ // copied from -#ifndef QXCBCURSORFONT_H -#define QXCBCURSORFONT_H +#pragma once #define XC_num_glyphs 154 #define XC_X_cursor 0 @@ -84,5 +83,3 @@ #define XC_ur_angle 148 #define XC_watch 150 #define XC_xterm 152 - -#endif /* QXCBCURSORFONT_H */ diff --git a/src/plugins/platforms/xcb/qxcbdrag.h b/src/plugins/platforms/xcb/qxcbdrag.h index 1e6c6f8a733..784b8050df7 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.h +++ b/src/plugins/platforms/xcb/qxcbdrag.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBDRAG_H -#define QXCBDRAG_H +#pragma once #include #include @@ -155,5 +154,3 @@ private: Q_DECLARE_TYPEINFO(QXcbDrag::Transaction, Q_RELOCATABLE_TYPE); QT_END_NAMESPACE - -#endif diff --git a/src/plugins/platforms/xcb/qxcbeventdispatcher.h b/src/plugins/platforms/xcb/qxcbeventdispatcher.h index 9c7e745ac94..717dd97b3f2 100644 --- a/src/plugins/platforms/xcb/qxcbeventdispatcher.h +++ b/src/plugins/platforms/xcb/qxcbeventdispatcher.h @@ -1,7 +1,7 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBEVENTDISPATCHER_H -#define QXCBEVENTDISPATCHER_H + +#pragma once #include #include @@ -68,5 +68,3 @@ public: }; QT_END_NAMESPACE - -#endif // QXCBEVENTDISPATCHER_H diff --git a/src/plugins/platforms/xcb/qxcbeventqueue.h b/src/plugins/platforms/xcb/qxcbeventqueue.h index 7d8f6d5417f..7880b9bda8f 100644 --- a/src/plugins/platforms/xcb/qxcbeventqueue.h +++ b/src/plugins/platforms/xcb/qxcbeventqueue.h @@ -1,7 +1,7 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBEVENTQUEUE_H -#define QXCBEVENTQUEUE_H + +#pragma once #include #include @@ -147,5 +147,3 @@ xcb_generic_event_t *QXcbEventQueue::peek(PeekOption option, Peeker &&peeker) } QT_END_NAMESPACE - -#endif diff --git a/src/plugins/platforms/xcb/qxcbexport.h b/src/plugins/platforms/xcb/qxcbexport.h index 1a163415591..e282a1fcffe 100644 --- a/src/plugins/platforms/xcb/qxcbexport.h +++ b/src/plugins/platforms/xcb/qxcbexport.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBEXPORT_H -#define QXCBEXPORT_H +#pragma once #include @@ -15,5 +14,3 @@ QT_BEGIN_NAMESPACE # endif QT_END_NAMESPACE -#endif //QXCBEXPORT_H - diff --git a/src/plugins/platforms/xcb/qxcbimage.h b/src/plugins/platforms/xcb/qxcbimage.h index c022fae6393..7b5f0f44d95 100644 --- a/src/plugins/platforms/xcb/qxcbimage.h +++ b/src/plugins/platforms/xcb/qxcbimage.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBIMAGE_H -#define QXCBIMAGE_H +#pragma once #include "qxcbscreen.h" #include @@ -21,5 +20,3 @@ xcb_cursor_t qt_xcb_createCursorXRender(QXcbScreen *screen, const QImage &image, const QPoint &spot); QT_END_NAMESPACE - -#endif diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h index a5323496f75..f05afa29b13 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.h +++ b/src/plugins/platforms/xcb/qxcbintegration.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBINTEGRATION_H -#define QXCBINTEGRATION_H +#pragma once #include #include @@ -127,5 +126,3 @@ private: }; QT_END_NAMESPACE - -#endif diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.h b/src/plugins/platforms/xcb/qxcbkeyboard.h index 62d9268c64f..9528b8a7e47 100644 --- a/src/plugins/platforms/xcb/qxcbkeyboard.h +++ b/src/plugins/platforms/xcb/qxcbkeyboard.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBKEYBOARD_H -#define QXCBKEYBOARD_H +#pragma once #include "qxcbobject.h" @@ -105,5 +104,3 @@ private: }; QT_END_NAMESPACE - -#endif diff --git a/src/plugins/platforms/xcb/qxcbmime.h b/src/plugins/platforms/xcb/qxcbmime.h index 4c99c39c8b9..2aee718bd9c 100644 --- a/src/plugins/platforms/xcb/qxcbmime.h +++ b/src/plugins/platforms/xcb/qxcbmime.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBMIME_H -#define QXCBMIME_H +#pragma once #include @@ -30,5 +29,3 @@ public: }; QT_END_NAMESPACE - -#endif // QXCBMIME_H diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.h b/src/plugins/platforms/xcb/qxcbnativeinterface.h index 62bfb4c634f..45be5c7ef4c 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.h +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBNATIVEINTERFACE_H -#define QXCBNATIVEINTERFACE_H +#pragma once #include #include @@ -119,5 +118,3 @@ private: }; QT_END_NAMESPACE - -#endif // QXCBNATIVEINTERFACE_H diff --git a/src/plugins/platforms/xcb/qxcbobject.h b/src/plugins/platforms/xcb/qxcbobject.h index 965ec636b71..fe26aef9f14 100644 --- a/src/plugins/platforms/xcb/qxcbobject.h +++ b/src/plugins/platforms/xcb/qxcbobject.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBOBJECT_H -#define QXCBOBJECT_H +#pragma once #include "qxcbconnection.h" @@ -24,5 +23,3 @@ private: }; QT_END_NAMESPACE - -#endif diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h index 49165d3ba40..4fb0171a124 100644 --- a/src/plugins/platforms/xcb/qxcbscreen.h +++ b/src/plugins/platforms/xcb/qxcbscreen.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBSCREEN_H -#define QXCBSCREEN_H +#pragma once #include #include @@ -228,5 +227,3 @@ Q_GUI_EXPORT QDebug operator<<(QDebug, const QXcbScreen *); #endif QT_END_NAMESPACE - -#endif diff --git a/src/plugins/platforms/xcb/qxcbscrollingdevice_p.h b/src/plugins/platforms/xcb/qxcbscrollingdevice_p.h index 3ee0c06a862..044cd40358d 100644 --- a/src/plugins/platforms/xcb/qxcbscrollingdevice_p.h +++ b/src/plugins/platforms/xcb/qxcbscrollingdevice_p.h @@ -1,8 +1,7 @@ // Copyright (C) 2020 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBSCROLLINGDEVICE_P_H -#define QXCBSCROLLINGDEVICE_P_H +#pragma once #include @@ -52,5 +51,3 @@ public: }; QT_END_NAMESPACE - -#endif // QXCBSCROLLINGDEVICE_P_H diff --git a/src/plugins/platforms/xcb/qxcbsessionmanager.h b/src/plugins/platforms/xcb/qxcbsessionmanager.h index 10759319d2c..553ebb271b0 100644 --- a/src/plugins/platforms/xcb/qxcbsessionmanager.h +++ b/src/plugins/platforms/xcb/qxcbsessionmanager.h @@ -2,8 +2,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBSESSIONMANAGER_H -#define QXCBSESSIONMANAGER_H +#pragma once // // W A R N I N G @@ -54,5 +53,3 @@ private: QT_END_NAMESPACE #endif //QT_NO_SESSIONMANAGER - -#endif //QXCBSESSIONMANAGER_H diff --git a/src/plugins/platforms/xcb/qxcbsystemtraytracker.h b/src/plugins/platforms/xcb/qxcbsystemtraytracker.h index 5c054626b6c..c2e58e6e225 100644 --- a/src/plugins/platforms/xcb/qxcbsystemtraytracker.h +++ b/src/plugins/platforms/xcb/qxcbsystemtraytracker.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBSYSTEMTRAYTRACKER_H -#define QXCBSYSTEMTRAYTRACKER_H +#pragma once #include "qxcbconnection.h" @@ -45,5 +44,3 @@ private: }; QT_END_NAMESPACE - -#endif // QXCBSYSTEMTRAYTRACKER_H diff --git a/src/plugins/platforms/xcb/qxcbvulkaninstance.h b/src/plugins/platforms/xcb/qxcbvulkaninstance.h index 445cd706ae0..24544f61a1f 100644 --- a/src/plugins/platforms/xcb/qxcbvulkaninstance.h +++ b/src/plugins/platforms/xcb/qxcbvulkaninstance.h @@ -1,8 +1,7 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBVULKANINSTANCE_H -#define QXCBVULKANINSTANCE_H +#pragma once #if defined(VULKAN_H_) && !defined(VK_USE_PLATFORM_XCB_KHR) #error "vulkan.h included without xcb WSI" @@ -36,5 +35,3 @@ private: }; QT_END_NAMESPACE - -#endif // QXCBVULKANINSTANCE_H diff --git a/src/plugins/platforms/xcb/qxcbvulkanwindow.h b/src/plugins/platforms/xcb/qxcbvulkanwindow.h index 377acd2e8c5..88fbab03867 100644 --- a/src/plugins/platforms/xcb/qxcbvulkanwindow.h +++ b/src/plugins/platforms/xcb/qxcbvulkanwindow.h @@ -1,8 +1,7 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBVULKANWINDOW_H -#define QXCBVULKANWINDOW_H +#pragma once #include "qxcbwindow.h" #include "qxcbvulkaninstance.h" @@ -25,5 +24,3 @@ private: }; QT_END_NAMESPACE - -#endif // QXCBVULKANWINDOW_H diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h index 795c5aad8b9..e7f8a5e66ca 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.h +++ b/src/plugins/platforms/xcb/qxcbwindow.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBWINDOW_H -#define QXCBWINDOW_H +#pragma once #include #include @@ -281,5 +280,3 @@ QList qRegionToXcbRectangleList(const QRegion ®ion); QT_END_NAMESPACE Q_DECLARE_METATYPE(QXcbWindow*) - -#endif diff --git a/src/plugins/platforms/xcb/qxcbwmsupport.h b/src/plugins/platforms/xcb/qxcbwmsupport.h index 77ad55c4027..f448d2daeca 100644 --- a/src/plugins/platforms/xcb/qxcbwmsupport.h +++ b/src/plugins/platforms/xcb/qxcbwmsupport.h @@ -1,7 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBWMSUPPORT_H -#define QXCBWMSUPPORT_H + +#pragma once #include "qxcbobject.h" #include "qxcbconnection.h" @@ -28,5 +28,3 @@ private: }; QT_END_NAMESPACE - -#endif diff --git a/src/plugins/platforms/xcb/qxcbxsettings.h b/src/plugins/platforms/xcb/qxcbxsettings.h index efcaae8a20d..e8a75e3556b 100644 --- a/src/plugins/platforms/xcb/qxcbxsettings.h +++ b/src/plugins/platforms/xcb/qxcbxsettings.h @@ -1,8 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QXCBXSETTINGS_H -#define QXCBXSETTINGS_H +#pragma once #include "qxcbscreen.h" @@ -31,5 +30,3 @@ private: }; QT_END_NAMESPACE - -#endif // QXCBXSETTINGS_H