Commit Graph

10 Commits

Author SHA1 Message Date
Artem Sokolovskii
afed126ba1 ClangFormat: Fix wrong comment indentation
Fixes: QTCREATORBUG-25539
Change-Id: Ifecc4bc2c0984319d858720d5bcd1788a9008e90
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-26 07:21:07 +00:00
Eike Ziller
04e50438eb Utils: Remove Utils::optional
Since we are now requiring macOS 10.14 we can remove our local
implementation of optional and use std::optional for macOS too.

Change-Id: I2bd018261b68da64f7f031a812045dd7784697e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-09-01 06:58:04 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Artem Sokolovskii
17693bc415 ClangFormat: Fix list declaration
Fixed list declaration indentation.
Fixed function declaration with parameters on the new line.
Added tests for both cases.

Fixes: QTCREATORBUG-25011
Change-Id: Ida4f6ec4f407c5e5b015dc2c0afff110262d9645
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-23 09:07:59 +00:00
Artem Sokolovskii
2f18256633 Clangformat: Brings back some of checkboxes
Brought back checkboxes: format while typing, format on save.
Brought back format while typing feature.
Global checkboxes will be hidden in project settings,
and visible for global.

Change-Id: I193cf9e13b10de22091edb5fe04aef957dd74586
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-30 10:36:49 +00:00
Artem Sokolovskii
8f1a9ea6d7 Revert "ClangFormat: Remove format while typing feature"
This reverts commit 323ba720db.

Reason for revert: The feature is needed

Change-Id: Iaf09ef91c49ff0c85c1b5906a1c1464bd8e4cae6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-29 11:53:04 +00:00
Artem Sokolovskii
323ba720db ClangFormat: Remove format while typing feature
Change-Id: I6737c429694218d39fc06c9ef3ce502228e26a2a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-25 17:51:32 +00:00
Artem Sokolovskii
72dd90e512 ClangFormat: Start to use new file management
- Indenter uses .clang-format file from a dir of
editing file or from a parent dir. If there is no
such file then indenter starts to use file from a dir
with the name current CodeStyle settings.
- Test fixed

ToDo: Add file absentness processing in case of import

Change-Id: If09ef0c598899856b948c214e524bcfd5dad76e2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-04-20 07:52:17 +00:00
Artem Sokolovskii
ab5fdd94f3 [ClangFormat] Add test checkking indentation after Q_OBJECT
Added test checking behavior when after Q_OBJECT all class structure
have correct indenting and redundent tabs doesn't appear before key words
such as  public:, private: , etc.
Made automatic addition Qt defines to StatementMacro to .clang-format files.

Fixes: QTCREATORBUG-26776
Change-Id: I3490421a9caf2831b593939597940358f7ce8f01
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-10 13:37:05 +00:00
Christian Kandeler
ead181e385 ClangFormat: Move tests into plugin
That's where they belong

Change-Id: I78e33e76a2f42f05961f6fab31da5f3dd583a2e9
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-20 10:27:13 +00:00