Commit Graph

80529 Commits

Author SHA1 Message Date
David Schulz
ba5e09f03f TextEditor: always return a valid assist interface
It is required for updating currently visible proposals. Also guard
against potential null assist interfaces.

Amends 0bd6d7a69f

Fixes: QTCREATORBUG-29096
Change-Id: Ic34d70561b471e7e529f2fb7c239b49712aca502
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-02 12:08:04 +00:00
hjk
1c2b29b31a Layouting: Introduce a 'bindTo' LayoutItem
... to 'export' the widget being operated on.

The 'Tab' related changes are related, as they affect the order
of execution.

Change-Id: I7aa079f12e49a1dab7c6a49acfae9dc684cfb479
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-02 11:44:03 +00:00
Christian Kandeler
8aecf0d749 Fix qbs build for QML test
Change-Id: I8df3988f574cc94c8bb441a54a1b861913029dfa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-02 11:17:36 +00:00
Leena Miettinen
885bf15a79 Doc: Describe the "Qt Quick Application (compat)" wizard template
Fix descriptions of the "Qt Quick Application" wizard template.

Change-Id: I15390252b29f5437d488bb8692787993855d1545
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-02 09:33:21 +00:00
Alessandro Portale
c192536b64 Examples: Use theme colors for section separator + link
Change-Id: Ia5706dd81c0494f0a7c1a1df346918462b52ba53
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-02 09:23:41 +00:00
Robert Löhning
d86b091297 SquishTests: Further Python3 adaption
Fixing tests in suite_editors

Change-Id: I4e5e1adc2c4e6606232d76a794aff7a7144d5c9e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-02 09:14:12 +00:00
Eike Ziller
66c0c36bc1 Fix compiler warnings
Change-Id: I9b0b4a60d1152142f62bf3f76885cf8019714623
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sivert Krøvel <sivert.krovel@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-02 09:05:16 +00:00
hjk
3e953f4896 Layouting: Add some example code as show case
Change-Id: I92842c7859514397748e744949688090154772df
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-02 08:58:20 +00:00
Jarek Kobus
3e0a179d24 ResultsCollector: Fix destructor
It may happen that still running LocatorMatcher is destructed
from the LocatorWidget destructor (i.e. from CorePlugin d'tor).
In this case the global future synchronizer is already reset,
so the d'tor of ResultsCollector can't put running deduplicator
task into the global synchronizer.

Check this case and place the deduplicator task into the global
future synchronizer only when it still exists. Otherwise, blocking
wait for the deduplicator to finish.

Change-Id: Ie788db923808dd91bdfdc4f1f53d336baf7c672a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-02 08:11:50 +00:00
Jarek Kobus
a5db02c9a7 AllProjectsFilter: Reimplement matchers()
Change-Id: I963929ce121e1dd22e0ea3ef4a72f1654b195066
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-02 08:00:22 +00:00
Eike Ziller
fac2e3c548 Add change log for 10.0.1
Change-Id: I992218bd0108d5afc9eb42d01d4a1a776db8a82b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-05-02 07:59:37 +00:00
hjk
c3a213cc65 FakeVim: Remove QtcProcess use from fakevimhandler.cpp
fakevimhandler.{h,cpp} are meant to be re-usable outside of Qt Creator.

Amends 91605c3.

Change-Id: I569a393d13049ef92ed3ef0c4f69de5232b2fa32
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-02 07:45:43 +00:00
Jarek Kobus
a35fe27188 DirectoryFilter: Reimplement matchers()
Change-Id: I8891d253ba4f2409f3547b49293a35de12c3ee3c
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-05-02 07:43:10 +00:00
Jarek Kobus
5299bca359 CurrentProjectFilter: Reimplement matchers()
Change-Id: Iec838504aa0fc1a08754779a55acb53f57b5bf6c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-02 07:42:14 +00:00
hjk
fbe9366498 LayoutBuilder: Cut remaining dependency to utils
layoutbuilder.{cpp,h} can now be re-used outside Creator

Change-Id: I306d2d8168d8a09658ea008f4606ca37a0dbbc01
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-02 07:40:55 +00:00
Christian Stenger
3aefbb37b9 Tests: Fix qbs build
Amends 0b3a0dce88.

Change-Id: I89a301a8780f17c3197ffe99a6cfc9a61d5961b3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-02 07:00:07 +00:00
Jarek Kobus
ce1a9b5990 TaskTree: Add tests for new functionality enabled by Barrier
Test, that it's possible to distribute the barrier advance
in multiple tasks.

The barrier passes after the both advances are triggered.

Change-Id: Ica58f9657ecdf1ba45e1059ea47be0453948e7b9
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-02 06:54:28 +00:00
Jarek Kobus
c4acd5ce4c TaskTree: Refactor barrier tests
A preparation step before adding new barrier tests.

Change-Id: I83aa8a7788859f98c98885384b52dc3377e01916
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-02 06:54:20 +00:00
Jarek Kobus
68d05b05d9 TaskTree: Remove the old WaitFor, Condition, ConditionActivator
Remove it from internals of TaskTree. It's replaced with the
new mechanism consisting of Barrier, implemented outside of
TaskTree.

The change mostly reverts 29f634a8ca.

Change-Id: I1f2f4100e7c992389a19c3cc9132c3f2980b9bf8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-02 06:54:10 +00:00
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
Christian Kandeler
3593de9846 Update qbs submodule to HEAD of 2.0 branch
Change-Id: I861f73625162351639b8f1ab61d0442cc061fad3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-29 08:37:52 +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
Christian Kandeler
dbfd378f5c Wizards: Fix "New Class" with QML_ELEMENT and no QQuickItem include
Amends 2f94e93334.

Fixes: QTCREATORBUG-29092
Change-Id: Ic27729a601534f5b4ed98451f637b9d49029a33a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp>
2023-04-28 12:52:46 +00:00
Christian Kandeler
239805e540 Update qbs submodule to HEAD of 2.0 branch
Change-Id: I357d5d0b6fdef8e089f4d8ef633e0ef7b1809a01
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-28 12:52:29 +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
Eike Ziller
73d8b20d52 Merge remote-tracking branch 'origin/9.0' into 10.0
Change-Id: Ic82c30a479a7ce7eab31b3c18abb3c46a71711cd
2023-04-28 11:03:36 +02:00
Patrik Teivonen
9e54d37ef6 Coin: Add instructions to install pyenv for qtsdk.git
Make sure that the required Python version for qtsdk can be
installed in the future.

Change-Id: Ie69cf79a33e4e4529dd34de7729d3014f8631fe2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-28 08:48:05 +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
Christian Stenger
927c34df2f Core: Fix item flag on locator settingspage
Do not make the 'included by default' column editable as this would make
the column act strange on double clicks.
Instead of providing a non-functional change opportunity for the
checkstate's value this is now handled similar to the double click on
other columns.

Change-Id: Id2851b2bfe2b7cda8c3231f58bf436196a533171
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-27 13:26:49 +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
Cristian Adam
3aec6b776c CMakePM: Fix presets condition with a const value
Fixes: QTCREATORBUG-29077
Change-Id: If1ebaa22c07eaa39fb8d4f24c33f26249f17d793
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-27 09:50:24 +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