Commit Graph

80147 Commits

Author SHA1 Message Date
Jarek Kobus
36dad70ab0 TaskTree: Replace the usages of old WaitFor with new Barrier
Adapt the TaskTree tests and the usage in FileStreamer.
The FileStreamer may be tested by running the
FileSystemAccessTest.

Change-Id: I1d8086dd359c458b7bdd3d4d47cf249184b04c65
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-02 06:53:59 +00:00
Marcus Tillmanns
015d12ccf3 FakeVim: Accept suggestion with Tab Key
* Changed signals to callbacks as only one receiver was ever added
* Added "tabPressedInInsertMode" callback to allow accepting
  a suggestion with the Tab Key

Fixes: QTCREATORBUG-28830
Change-Id: Ie70ba595b8802b6100fff495164d8e0471b1354c
Reviewed-by: hjk <hjk@qt.io>
2023-05-02 06:53:54 +00:00
hjk
8f345bbc35 Layouting: Drop compile dependency on BoolAspect
Change-Id: I4068048f470db126a2583d6b1b90245205cfd601
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-02 06:09:04 +00:00
Marcus Tillmanns
9f0919c4a3 FakeVim: Block Suggestions
Block suggestions when FakeVim is enabled and the mode
is not "Insert" or "Replace".

Change-Id: I778eb25d9570b76e42652f9d938a8c580033c462
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-02 06:04:53 +00:00
Jarek Kobus
e46a4eba8d Utils: Introduce Barrier primitive
This primitive is going to replace the TaskTree's built-in
mechanism consisting of Wait, Condition and ConditionActivator
elements.

When combining 2 barriers, one placed in a custom storage,
and the other in a tree, it's possible to fully substitute
the Wait, Condition and ConditionActivator with the comparable
amount of code.

However, the Barrier is much more versatile, since it
makes it possible to:

1. distribute the decision about the ultimate barrier pass on the
   whole tree.

   In order to utilize it, increase the limit of the shared barrier
   with setLimit() to the expected number of places that participate
   in the decision about the ultimate barrier pass and use advance()
   from multiple places in the tree. When the number of calls
   to advance() reaches the limit(), the shared barrier passes
   automatically.
   Whenever some participant failed, so that the shared barrier
   can not be passed, it may call stopWithResult(false).
   Whenever some other participant decided that all the needed
   data are already collected, so that the barrier may pass early,
   it may call stopWithResult(true), making the remaining calls to
   advance no-op.

2. wait for the same barrier from multiple places.

   Before, only one WaitFor was possible for a single Condition.

3. insert multiple Barriers into one Group element.

   Before, only one WaitFor could be placed in a single Group.

Provide ready-made SingleCondition and waitFor() helpers.
With the new approach, the following equivalents are provided:

- SingleBarrier (substitutes old Condition)
- WaitForBarrier() (substitutes old WaitFor)
- Barrier (substitutes old ConditionActivator)

This change replaces the mechanism introduced in
29f634a8ca.

This change conforms to the naming scheme proposed in QTCREATORBUG-29102.

Task-number: QTCREATORBUG-29102
Change-Id: I48b3e2ee723c3b9fe73a59a25eb7facc72940c3b
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-02 05:55:55 +00:00
Jarek Kobus
56b0d77c82 TaskTree: Add an useful warning message
It's a common mistake to forget to insert the Storage
element into the tree, but reuse it from inside running
handlers.

This message should help in quick fixing the issue.

Change-Id: I771e89b06943667b56188d0655ec3da1b48f8a34
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-02 05:29:48 +00:00
Orgad Shaneh
eeb1a4e1ec Terminal: Save settings on apply
Amends 3d354290be.

Change-Id: I467806afc27f1aef474f9058426b4c3119b53e8d
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-02 05:07:48 +00:00
Jarek Kobus
0b3a0dce88 TaskTree: Rewrite tests to use AsyncTask
Instead of using QtcProcess. In this way the tests may be
executed much faster, since there is no need to start
qtcreator_processlauncher.

This should limit the CI failures caused by timeout when
executing these tests.

Remove testapp, unneeded now.

Change-Id: I80775276c2aaec7c2d463b1ac25010efa942b258
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-02 04:51:42 +00:00
Jarek Kobus
341ade96fb CppIncludesFilter: Reimplement matchers()
Change-Id: Ie449a9560203e50285bd0dab7bed7f8a5495628a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-28 14:24:07 +00:00
Jarek Kobus
9df9185382 LocatorFileCache: Update the cache in one go
Don't leave the partially updated cache when the generate()
method was canceled. Before, it was possible that only
m_filePaths were updated, without updating m_lastInput and
m_cache, what could leave the cache in inconsistent state.

Remove unneeded namespace qualifier.
Some doc fixes.

Amends 19918129bf

Change-Id: Icef6389f45f0699d851ce412f134c93353728338
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-28 13:37:05 +00:00
Jarek Kobus
27f62806ca SpotlightLocatorFilter: Reimplement matchers()
Change-Id: I6ce29929516dee3b23b67f0cc07dce16ae7ad49d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-28 12:23:26 +00:00
Jarek Kobus
f44641bec7 Core: Add a test for LocatorFileCache
This test corresponds to the old test for BaseFileFilter.

Change-Id: If1e775f0f8490943ff41fb6a7ccc4069914fe1f2
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-28 11:20:59 +00:00
Jarek Kobus
19918129bf ILocatorFilter: Introduce LocatorFilterCache
It's going to be used as a BaseFileFilter replacement.

Add docs for it.

Change-Id: I20a52d948373238b07db6cbe1bbadf8c648ae3bf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-28 08:23:28 +00:00
hjk
e13c000196 CppEditor: Use IOptionPage::setWidgetCreator() for cppquickfix settings
Change-Id: I33455f2ea98b1cafbb56ab8267b4d0afca106f33
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-28 07:29:55 +00:00
Leena Miettinen
85d25390c9 Doc: Describe the markdown editor
Task-number: QTCREATORBUG-28996
Change-Id: I9222f51e5e6c1131198a0eef0361531190675db9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-28 07:08:37 +00:00
Eike Ziller
d172e59d6e External tools: Fall back to active project's Qt
for the Qt related external tools, if there is no open document with a
project.

Change-Id: I1d059d70e5163921a8d98b6a93224aef1fbf1743
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-28 06:55:01 +00:00
hjk
b3df7c3cdb CppEditor: Use IOptionPage::setWidgetCreator() for settings
Change-Id: I0d2f8ffae7ca4e7360de0f69566ab03036c10c53
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-28 06:45:32 +00:00
hjk
198d07e256 ProjectExplorer: Use IOptionPage::setWidgetCreator() for main kits page
Change-Id: I25545bfb00af3715adae35ba70e52e963dcdfc76
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-27 13:47:02 +00:00
hjk
1a1b040642 ProjectExplorer: Use IOptionPage::setWidgetCreator() for settings
Change-Id: I4267e577ce91d97e633e8cdf513bde496d3f7c09
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-27 12:53:50 +00:00
hjk
b23dbc310c Qnx: Do not re-validate information on each Qt version manager chance
That's rarely resulting in an actual change, but fairly expensive
and triggered often, even when not actively using Qnx.

Change-Id: I784bc7fa4919bf48711036d655e8246805aa578b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-27 11:45:46 +00:00
hjk
1eb765ecbb Qnx: Use more declarative syntax for settings page items
Change-Id: Iced5efa88b059a55d7d0b3e33a24bbf3b9423fbc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-27 11:24:12 +00:00
hjk
e0aaa3960f Qnx: Ensure up-to-date contents of combobox in settingspage
Change-Id: I2b157ac60d6ce79238c22fcdcb042798940ba647
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-27 11:17:19 +00:00
Marcus Tillmanns
1339a4a998 TextEditor: Add valid checks for text lines
QTextLayout::lineForTextPosition can return invalid lines,
which when accessed may crash. To workaround we add
QTC_ASSERT to guard against this (see linked issue crash report)

Fixes: QTCREATORBUG-28837
Change-Id: I66d8d8a46e766caa492ec2178b1fa88e35211333
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-27 09:24:43 +00:00
Eike Ziller
2b640f3dc3 Support creating directories from file system locator
It was already possible to create files, so add the option to create
directories instead.

Change-Id: I2e70dba0015ab30b1757f09c74eb2c2dd0db296b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-27 08:59:26 +00:00
Jarek Kobus
fad8ed8e28 ILocatorFilter: Simplify Sync's onSetup in matchers
Remove no longer necessary bool return value from onSetup
functions and from refresh recipe functions,
see df5e3c587a.

By default, when no return bool is specified inside a function
passed to Sync element, it's assumed that the return value is true.

Eliminate passing "=" captures in 2 lambdas.

Change-Id: I5005821444a386f70c0f05322812f98d3fd49926
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-04-27 08:42:34 +00:00
Jarek Kobus
df5e3c587a TaskTree: Enhance Sync's function
Make it possible to pass a void returning function to the
Sync constructor. In this case it's assumed that function
returns true by default and finishes successfully.

Add some helpful error messages when requirements for the
passed function are not met.

Change-Id: I8be75acd277d06e87db3c87a6eb96173aa9cd890
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-04-27 08:11:24 +00:00
Marcus Tillmanns
1a658eff26 FakeVim: Clear suggestions on mode change
Change-Id: I5d3a37ab61f83a70e055063de397654f5621401d
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-04-27 06:56:47 +00:00
Jarek Kobus
86cdc6667d RunConfigurationLocatorFilter: Reimplement matchers()
Change-Id: I36a0aca3eac0ecb7988e1c68056601054837b4ad
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-27 06:18:56 +00:00
Jarek Kobus
76ba3ea6a5 ActionsFilter: Reimplement matchers()
Change-Id: I54421904ce17118984e5dd6f02e2adee75849dde
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-27 06:17:37 +00:00
Jarek Kobus
82e57b4e9f QmlJSToolsPlugin: Reimplement matchers()
Change-Id: If6767b4dc62eddddce0285b7b766f44241f3367e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-04-27 06:17:21 +00:00
Jarek Kobus
7db28e788f CMakeTargetLocatorFilter: Reimplement matchers()
Change-Id: I1d515da13ca2b9c84b4b21565926d6df8ca8db99
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-27 06:16:03 +00:00
Jarek Kobus
36eab77c61 tst_taskTree: Add more tests for WaitFor/Condition/Activator
Change-Id: I662d56c3b943a4df8b4c12da95eb57fbca9e3048
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-27 06:08:22 +00:00
Christian Stenger
a5e5058c41 FakeVim: Avoid using invalid regular expressions
Print a warning in case of an invalid regular expression
and do not apply it to the settings.
This silently drops invalid regular expressions entered
and restored from settings.

Change-Id: I2f7686066541cf2307cf7cf96b3c6f89f6a677d8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-27 05:15:02 +00:00
Jarek Kobus
ec0462748b CommandLocator: Reimplement matchers()
Change-Id: I57fd82dda9b74eff470c1708e12df1361294c575
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-04-26 19:13:52 +00:00
hjk
3d354290be Terminal: Use IOptionPage::setWidgetCreator() for settings
Less boilerplate for the implementation add user code access to
IOptionPage::{apply,finish} is planned to be removed.

Change-Id: Id8ec4006d1060be2032caf8eda6bf80760f6db22
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-04-26 13:52:09 +00:00
hjk
7612ef1d0f QNX: Mark toolchains detected by manual operation as "manual"
Change-Id: I9683c4e7f471b9c6485f48ad14fce029522722b3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-26 13:25:52 +00:00
hjk
e18c1dceb2 Layouting: Add QTextEdit
Change-Id: I3a74dce8ee7874b73cb11acab52092c4053722b8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-26 13:05:48 +00:00
Jarek Kobus
836cffc161 ExternalToolsFilter: Reimplement matchers()
Change-Id: I158558688f3013329a8970e29744527003070f7e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-04-26 12:49:55 +00:00
Jarek Kobus
9d9f1f9c23 MacroLocatorFilter: Reimplement matchers()
Change-Id: I90e638e68414e8b6fc38cc98d85720d05a78df50
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-26 12:36:57 +00:00
Christian Kandeler
b024ebda0e ProjectExplorer: Support moving to different dir when renaming
... files in the project tree.

Fixes: QTCREATORBUG-15981
Change-Id: Id704ec0638046e2191638b59e0a597b984d4822a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-26 12:32:34 +00:00
Leena Miettinen
2d91be25f2 Doc: Try to make All Topics more visible
And provide some tips for searching.

Task-number: QTCREATORBUG-28996
Change-Id: I35d611326555ccc568c98c49e092380d206fce6b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-26 12:21:38 +00:00
Leena Miettinen
e7b5e64a70 Doc: Remove detailed info about wizard templates
Improve descriptions of some wizard templates.

Task-number: QTCREATORBUG-28996
Change-Id: Ib53fa38918120af60a03f3850fed7db1e6f0c391
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-26 12:18:57 +00:00
Jarek Kobus
eb41e98b00 ClangCodeModel: Reimplement matchers()
Change-Id: I2d541e24347aa47ec41f88cd7d18004dee7197cf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-26 12:05:23 +00:00
Jarek Kobus
5a341e087f LocatorFiltersFilter: Reimplement matchers()
Change-Id: I59d7f005e9e044b0375cb94254392f23a330f3f0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-26 09:30:26 +00:00
hjk
0ec89bc10f Qnx: Allow kit creator creation per target architecture
So far there were always kits for "all" (usually three?) archs
created, leaving n-1 of them in an typically unused but expensive
to validate state.

Change-Id: I78c7ed3faea0829104dc62bf358e9e1c62082b01
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-26 09:25:12 +00:00
Christian Kandeler
5e73bacb0e CppEditor: Merge two factories
They are closely related, and we might want to add more variants of this
functionality.

Change-Id: Ida83cce018fad5a84d5f6d24a0fa4ff2bca5a67b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-26 09:23:32 +00:00
Alessandro Portale
3821683647 StyleHelper: Add setter for "panelwidget[_singlerow]"
20 string duplications warrant a centralized setter. A couple more of
them will come with the upcoming toolbar changes.

Change-Id: Ide8c680da21d5be09f968bcc0a774e062c6f0260
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-26 09:23:29 +00:00
Christian Kandeler
963ae0a192 ProjectExplorer: Keep "Run" entry in top-level project node visible
Enable/disable instead of show/hide, for more stable UI.

Fixes: QTCREATORBUG-29042
Change-Id: Ie2c37b3cb127f9dffaf42570f11b2cca6accd3fd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-26 09:21:24 +00:00
The Qt Project
3a70cb2870 Merge "Merge remote-tracking branch 'origin/10.0'" 2023-04-26 09:12:23 +00:00
Christian Kandeler
02d86516c7 ProjectExplorer: Optionally show run environment in app output pane
Fixes: QTCREATORBUG-28427
Change-Id: I1022a377d3728ad5e91fa62514082110b86db9f4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-26 09:11:53 +00:00