From 5d219361892480689f39e6af4a6fb8f817b3b26d 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.5 Change-Id: Iede0605c38cda7606edfc7155bd8bfc95990c5bc Reviewed-by: Alexey Edelev (cherry picked from commit 91f9ba2993a2652bcb349ce639aff67b5bfc8938) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit 4e475b5cc2f6210a2e8f05153953a469ff4337f0) --- .../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 c6492f02ae..09ac5602b2 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 bb169aee4a..021f310ad5 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 3de9d3f408..fb2a930287 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 58c28c85b0..f3e6f489e5 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 3044493291..1598da86ab 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 d12501bd90..cf010e51a2 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 7caf4304bc..bd60677e9d 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 fdd48fc842..e147f25179 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 935a0c6d43..d045158b68 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 f46ae46b31..8e80733c61 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 797f6c4b3f..077af6f2de 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 5ca329a368..73a7b7b8b5 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 3b39dc1ba0..05902efb88 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 f57a5be9a6..f2851adf23 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 eedf798e00..56955ee793 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 f799fdd900..ad8ac57d25 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 7d830baaa7..b7a633f5b8 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 e640fc11a0..fb0e0dd34c 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 66e0aa2cf8..4307429d2c 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 70379c9e55..9b64f6fdea 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 5ee4298645..58d9b99ed3 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 642dbdeadd..0439adb609 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 bc677eaf3e..39cada5087 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 @@ -226,5 +225,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 979b254326..674640780e 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 134daf4be7..c163107179 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 @@ -109,5 +108,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 b99a48cdc5..41cf7d4b35 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 586b45e8a7..b66bb384c8 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 bf26861e8f..1991fe26a0 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" @@ -93,5 +92,3 @@ private: }; QT_END_NAMESPACE - -#endif diff --git a/src/plugins/platforms/xcb/qxcbcursorfont.h b/src/plugins/platforms/xcb/qxcbcursorfont.h index fe74e27691..9210864190 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 ae7cc915c8..94fd940e72 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 @@ -157,5 +156,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 9c7e745ac9..717dd97b3f 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 7d8f6d5417..7880b9bda8 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 1a16341559..e282a1fcff 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 c022fae639..7b5f0f44d9 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 a1e0c3f3e1..f916e521d9 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 @@ -126,5 +125,3 @@ private: }; QT_END_NAMESPACE - -#endif diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.h b/src/plugins/platforms/xcb/qxcbkeyboard.h index 62d9268c64..9528b8a7e4 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 4c99c39c8b..2aee718bd9 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 62bfb4c634..45be5c7ef4 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 965ec636b7..fe26aef9f1 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 49165d3ba4..4fb0171a12 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 3ee0c06a86..044cd40358 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 10759319d2..553ebb271b 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 5c054626b6..c2e58e6e22 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 445cd706ae..24544f61a1 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 377acd2e8c..88fbab0386 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 0c047d569b..039e14a349 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 @@ -280,5 +279,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 77ad55c402..f448d2daec 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 efcaae8a20..e8a75e3556 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