Commit Graph

31 Commits

Author SHA1 Message Date
Artem Sokolovskii
6db8067821 ClangFormat: Fix warning readability message on dark theme
Fixes: QTCREATORBUG-30339
Change-Id: I57291907656b379468a066a09e767b886f17d7a0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-02-12 08:46:26 +00:00
Jarek Kobus
d6eec9ce2e ClangFormatWidget: Set the tooltip
Amends ac24b23ff8

Change-Id: I79ccca00b5b2c944979c255640809fdea7ba3eaa
Reviewed-by: hjk <hjk@qt.io>
2024-01-30 16:56:13 +00:00
hjk
225762dbe5 ClangFormat: Move ClangFormatGlobalConfigWidget definition to .cpp
Not needed outside anymore.

Change-Id: If5dc3e8b3eddaea59d2633f480abeadda140f564
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2024-01-19 15:10:13 +00:00
hjk
fddbb0e2d9 ClangFormat: Move ClangFormatStyleFactory creation closer to its code
Change-Id: I2378846e1dd9076b62e5d68cb75b7e0d9e4d65b0
Reviewed-by: hjk <hjk@qt.io>
2024-01-19 15:10:04 +00:00
Artem Sokolovskii
bb88c8c9be ClangFormat: Separate ClangFormat and Standard Indenter UI
The combined UI was a bit misleading for the user and cause
bunch of synchronization problems.

The synchronization between old CodeStyle settings and ClangFormat
settings was removed. Corresponding classes and functions
were also cleared.

The behavior now:
When "Indenting only" or "Full Formatting" modes are chosen then
The ClangFormat settings page is visible and the ClangFormat indenter
is used.
For "Disable" mode standard CodeStyle pages are shown and standard
indenter respectively.

Change-Id: Idb4974c68ceb16ef2e55b108043cc6f56f859840
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-01-19 10:26:09 +00:00
Artem Sokolovskii
f2cb979aa3 ClangFormat: Rename override checkbox
It improves the UX design of CodeStyle page.

Change-Id: I4458896d6787df462de18025d292bdb481d03c89
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-08 13:50:38 +00:00
Artem Sokolovskii
646eb5118b ClangFormat: Fix missing label in project settings
Fixes: QTCREATORBUG-29323
Change-Id: Ia8c89ec6b8c745cac2bcb13a149667d9c3e08496
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-06-27 10:51:02 +00:00
Eike Ziller
e7870f736d Merge remote-tracking branch 'origin/11.0'
Conflicts:
	src/plugins/clangformat/clangformatutils.cpp

Change-Id: Ide285cc25fca9101843ab9dca01c5a33644aca7f
2023-06-14 08:43:08 +02:00
Eike Ziller
c35dca17b8 Some more tr fixes
- avoid manual line breaks
- fix plural
- add some translator comments
- explicitly name an output pane
- use imperative for placeholder text
- it is a Markdown editor nowadays, not a viewer

Change-Id: I8418cfe0294c028b7d873305db0af4c25bc1097f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-06-14 06:10:53 +00:00
Artem Sokolovskii
ac24b23ff8 ClangFormat: Add file size threshold
Add file size threshold to prevent qtcreator freeze
when a file is big. The default value is 1MB.

Change-Id: I356c64cd5ca99a34413043896076dbab859538b6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-06-06 14:42:55 +00:00
Eike Ziller
8e8ebc8f88 Merge remote-tracking branch 'origin/10.0'
Conflicts:
	coin/instructions/build.yaml

Change-Id: I697b0107e75c6259989247de2180437d7987ff37
2023-05-17 14:55:02 +02:00
Artem Sokolovskii
948dc6b37e ClangFormat: Fix clangformat ignores configuration file
Fixes: QTCREATORBUG-29145
Change-Id: I6950151aaab9df51cfdd0af0ad9cf3c7b35c0636
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-05-15 10:08:38 +00:00
Eike Ziller
7f5876b45a Merge remote-tracking branch 'origin/10.0'
Change-Id: I98e5e1ad43103984b490c65cdeed84b7414303b3
2023-05-11 10:33:18 +02:00
Artem Sokolovskii
7960c1f3f6 ClangFormat: Fix code style preferences are grayed out
Code style preferences are grayed out even when formatting mode
is set to disable.

Fixes: QTCREATORBUG-29129
Change-Id: Icf82fa0751f9291122c2af55111b6bd5fac85c7b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-05-11 08:11:54 +00:00
Alessandro Portale
9c31267e58 Remove ineffective resize() calls
This removes apparently unnecessary resize() calls on QWidgets based
forms which get anyways added to layouts and resized. Most of these size
values looked "accidental", i.e. neither divisible by 2 nor by 5, in
most cases a remnant from the ui inlining.

Change-Id: I95da3b93f2915ef955b5235e5c2ecc94b51f813a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-10 11:14:10 +00:00
hjk
50084f6b0e Layouting: Handle attach types via setter
Change-Id: I862f5cd109db3582b4f029787ec0cded2da39ce6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-03 13:44:19 +00:00
hjk
70b02d23e1 LayoutBuilder: Rework
Everying is a LayoutItem now, and everything is split into
a proper setup and execution phase.

Execution happens only via LayoutBuilder (directly or via
convenience wrappers in LayoutItem).

No direct access to the widget in creation, funnel out is
via the new bindTo() facility.

Change-Id: I7eb38fd736ae57a68f9a72a6add5c767da82b49f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-03 13:44:02 +00:00
Eike Ziller
c9696fbabb Merge remote-tracking branch 'origin/10.0'
Change-Id: I8b36c1812b61dbe08fe3e7930f950e6b8e8a7079
2023-04-24 08:52:35 +02:00
Artem Sokolovskii
178c0abbd3 ClangFormat: Fix preview updating
Fixed the behavior when the preview does not update when the Override
checkbox was not enabled initially. Currently, the preview is updating
when Override the checkbox is enabled.

Fixes: QTCREATORBUG-29043
Change-Id: I8a2a6f3cd5890b66d4bffd0c84aeafb5a29fba48
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-18 11:21:58 +00:00
Eike Ziller
2bc37de42b Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/plugins/python/pipsupport.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/qtsupport/examplesparser.cpp
	tests/auto/examples/tst_examples.cpp

Change-Id: I00273622423fa99d41621969f6ecbbdaa0e18664
2023-04-13 15:59:08 +02:00
Artem Sokolovskii
e0be80a19d ClangFormat: Change Override check box name and ToolTip
Change-Id: I3d80ca3c2fd9dd6210220eca0db1ecec5dad9f0e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-06 12:03:48 +00:00
Artem Sokolovskii
028686b419 ClangFormat: Grey out Clang-Format Style config when not overridden
Add feature to grey out the Clang-Format Style configuration widget
after unchecking the 'Override' checkbox.

Change-Id: I94bbb1f4436f3caeaed55d49582211257e480d0d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-06 11:20:29 +00:00
Alessandro Portale
389b9503d7 ClangFormat: Tr::tr()
Change-Id: Iabbe39bfdd3ae24d65610a00d792e16591a1b6ee
Reviewed-by: hjk <hjk@qt.io>
2023-02-08 11:09:12 +00:00
Artem Sokolovskii
34638aa497 ClangFormat: Add use global settings check box for a project
Change-Id: Ie2872de3574aaad058a9fca17247db00e9559ba7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-01-13 12:55:42 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Artem Sokolovskii
feb72dd084 ClangFormat: Make formatting mode a project option
- Added the possibility to set formatting mode for every project
separately. The indenter will be switched for a file if the mode
changes.

Fixes: QTCREATORBUG-28188
Change-Id: I4e7f9841c54f9b6763586c16672a10ca36bf843d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-15 16:12:28 +00:00
Alessandro Portale
cc7d757a3a ClangFormat: Remove extra margins around ConfigWidget
Change-Id: I542ce841bf1144d4063190d1ec83fef7c1295248
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-16 07:28:31 +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
2d375eb776 ClangFormat: Move override checkbox to global settings
Moved override checkbox to global settings groupbox.

Change-Id: I70c97486a61f69274d059edc5095fe02c86fb04d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-24 15:11:40 +00:00
hjk
031bf8d3a4 ClangFormat: Inline *.ui files
Change-Id: Ie6bcb486c70896894121434b1030861b029a46a2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-05 11:55:28 +00:00
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