diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2022-06-21 16:33:56 +0200 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2022-06-22 00:59:15 +0200 |
commit | 155dd36a56912fd4ab4b447db38073900e53fc67 (patch) | |
tree | f5ce0b7bf2ab37c448710aa68f39848dee90a2c4 /src | |
parent | fd57edbfe8014812b91b66c3d13d3e8a0aabf36e (diff) |
Update .clang-format and fix messed up style
- Make sure clang-format doesn't reformat SPDX-License-Identifier
(see https://code.qt.io/cgit/qt/qt5.git/commit/?id=6a4dab1134b10b432f69819018fef2044520e0ca )
- Fix C++ version to C++17
(see https://code.qt.io/cgit/qt/qt5.git/commit/?id=fe9efd359498dc342257908f6c9c2183e95fc05d )
- Update _clang_format to avoid adding a space in list-initialization
(see https://code.qt.io/cgit/qt/qt5.git/commit/?id=fc7251edfaf782f184030a5787fe3a88feef6083 )
- Disable indentation for preprocessing directives.
- Fix indentation of UIDelegatasManager macros and prevent formatting
them.
Pick-to: 6.4
Change-Id: Ieb59c993ee715430ebc2830828e488b9f62ec727
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/webenginequick/ui_delegates_manager.cpp | 5 | ||||
-rw-r--r-- | src/webenginequick/ui_delegates_manager.h | 28 |
2 files changed, 19 insertions, 14 deletions
diff --git a/src/webenginequick/ui_delegates_manager.cpp b/src/webenginequick/ui_delegates_manager.cpp index 06b72348c..2c84dd4e8 100644 --- a/src/webenginequick/ui_delegates_manager.cpp +++ b/src/webenginequick/ui_delegates_manager.cpp @@ -129,11 +129,14 @@ const char *defaultPropertyName(QObject *obj) #define COMPONENT_MEMBER_INIT(TYPE, COMPONENT) \ , COMPONENT##Component(0) +// clang-format off UIDelegatesManager::UIDelegatesManager(QQuickWebEngineView *view) : m_view(view) , m_toolTip(nullptr) , m_touchSelectionMenu(nullptr) - , m_autofillPopup(nullptr) FOR_EACH_COMPONENT_TYPE(COMPONENT_MEMBER_INIT, NO_SEPARATOR) + , m_autofillPopup(nullptr) + FOR_EACH_COMPONENT_TYPE(COMPONENT_MEMBER_INIT, NO_SEPARATOR) +// clang-format on { } diff --git a/src/webenginequick/ui_delegates_manager.h b/src/webenginequick/ui_delegates_manager.h index 218d403d4..e0d4ed0e8 100644 --- a/src/webenginequick/ui_delegates_manager.h +++ b/src/webenginequick/ui_delegates_manager.h @@ -47,19 +47,20 @@ #include <QtCore/qstring.h> #include <QtCore/qstringlist.h> -#define FOR_EACH_COMPONENT_TYPE(F, SEPARATOR) \ - F(Menu, menu) SEPARATOR F(MenuItem, menuItem) \ - SEPARATOR \ - F(MenuSeparator, menuSeparator) SEPARATOR F(AlertDialog, alertDialog) \ - SEPARATOR \ - F(ColorDialog, colorDialog) SEPARATOR F(ConfirmDialog, confirmDialog) \ - SEPARATOR \ - F(PromptDialog, promptDialog) SEPARATOR F(FilePicker, filePicker) \ - SEPARATOR \ - F(AuthenticationDialog, authenticationDialog) SEPARATOR F(ToolTip, toolTip) \ - SEPARATOR \ - F(TouchHandle, touchHandle) SEPARATOR F(TouchSelectionMenu, touchSelectionMenu) \ - SEPARATOR \ +// clang-format off +#define FOR_EACH_COMPONENT_TYPE(F, SEPARATOR) \ + F(Menu, menu) SEPARATOR \ + F(MenuItem, menuItem) SEPARATOR \ + F(MenuSeparator, menuSeparator) SEPARATOR \ + F(AlertDialog, alertDialog) SEPARATOR \ + F(ColorDialog, colorDialog) SEPARATOR \ + F(ConfirmDialog, confirmDialog) SEPARATOR \ + F(PromptDialog, promptDialog) SEPARATOR \ + F(FilePicker, filePicker) SEPARATOR \ + F(AuthenticationDialog, authenticationDialog) SEPARATOR \ + F(ToolTip, toolTip) SEPARATOR \ + F(TouchHandle, touchHandle) SEPARATOR \ + F(TouchSelectionMenu, touchSelectionMenu) SEPARATOR \ F(AutofillPopup, autofillPopup) SEPARATOR #define COMMA_SEPARATOR , @@ -68,6 +69,7 @@ TYPE #define MEMBER_DECLARATION(TYPE, COMPONENT) \ QQmlComponent *COMPONENT##Component +// clang-format on QT_BEGIN_NAMESPACE class QQmlComponent; |