Commit Graph

8 Commits

Author SHA1 Message Date
Artem Sokolovskii
e572bdd90c ClangFormat: Move global settings in main page
The settings: indenting instead formatting, format while
typing, format edited on file save are moved to Code Style
page.

Change-Id: I28787b44602ce288961c778fe704ad2a1a05913f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-05 09:41:14 +00:00
hjk
2361353289 CPlusPlus: Remove Rreprocessor::run overload for QStrings
The preprocessor operates on QByteArray, making it less
convenient to use strings helps preventing accidental
conversion roundtrips.

Change-Id: Ifb2068a8fed137c52b05f2979b99cbce3462151e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-01 12:18:06 +00:00
Artem Sokolovskii
7e69b64b74 CppEditor: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: I9915cf2c07bdcc570efc20601752d60f2ec82f34
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-06 13:35:43 +00:00
Artem Sokolovskii
9afe4f958a ClangFormat: Remove unneeded warning
- Remove warning when .clang-format file is absent
- Remove warning when a page is nullptr in addTab function

Change-Id: I4232bc77eaac56c78707fc37aaf75b00b8af9006
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-04-26 09:10:05 +00:00
Artem Sokolovskii
059d20ed22 ClangFormat: Fix unsaving properties for global settings
- Fixed behavior "Formatting mode" combobox settings isn't
saved after pressing "Ok" button when no one project is
open. Now it works as expected, settings save after press
"Ok" button.
- Added additional applying interface for ICodeStylePreferenceFactory
which allows pass-through apply call from dialog to the editor.

Note: it doesn't work with read-only code style profiles

Change-Id: If4f0c85e3105550db4ffd9860e94b678f0d9b386
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-03-30 16:32:08 +00:00
Artem Sokolovskii
a997161dd6 ClangFormat: Synchronize ClangFormat settings with CppEditor codestyle
Added synchronization between ClangFormat codestyle settings and
CppEditors codestyle settings. All changes which will be done in
ClangFormat settings tab settings tabs will be automatically
retranslated to CppEditor codestyle settings tabs and vice versa.

Change-Id: I408d726c12552856e3c1b72d3ba09b77fff83321
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-24 21:35:31 +00:00
Artem Sokolovskii
9cb0bd94f0 ClangFormat: Move ClangFormat settings page
- Move ClangFormat settings page to TabWidget in the dialog
that opens when a user press "Edit" button in the CodeStyle tab

Change-Id: Ibd285344f07a6b2b20e275f2134976c50f91a019
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-08 13:09:12 +00:00
Christian Kandeler
284817fae6 Merge CppTools into CppEditor
There was no proper separation of responsibilities between these
plugins. In particular, CppTools had lots of editor-related
functionality, so it's not clear why it was separated out in the first
place.
In fact, for a lot of code, it seemed quite arbitrary where it was put
(just one example: switchHeaderSource() was in CppTools, wheras
switchDeclarationDefinition() was in CppEditor).
Merging the plugins will enable us to get rid of various convoluted
pseudo-abstractions that were only introduced to keep up the artificial
separation.

Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-01 14:53:58 +00:00