Commit Graph

7286 Commits

Author SHA1 Message Date
David Schulz
1a98dda5c4 Utils: fix Text::Range length and remove mid
Those functions are based on the assumption that the passed text starts
at the begin position, which was good enough for search results, but if
used in other parts of the codebase it might give unwanted results.
Calculate the length of the range now as expected and subtract the
beginning lines.
In order to still got the correct results for the text result texts
modify the result range to always start at the first line before
calculating the length of the range.
Also add tests for the modified functionality

Change-Id: I7ccd75b642dda6dd4f738877cbe3543d46c03652
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-12 11:03:33 +00:00
Jarek Kobus
97a66067bb TaskTree: Prepare for de-utils-ization - part 2
Move TaskTree into Tasking namespace.
Move Tasking namespace out of Utils namespace.

Change-Id: Ib4c1d7f54f1808517e54768dfa27209c33517b61
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-12 08:09:19 +00:00
David Schulz
1acd2499e2 Utils: replace LineColumn with Text::Position
Change-Id: Ia69547374efec7412717cbed1eb4162162a89d39
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-05-11 17:00:28 +00:00
Eike Ziller
7f5876b45a Merge remote-tracking branch 'origin/10.0'
Change-Id: I98e5e1ad43103984b490c65cdeed84b7414303b3
2023-05-11 10:33:18 +02:00
David Schulz
5b0c3258bb Utils: Make column of LineColumn consistently 0-based
Change-Id: I4ab153d1c55653936efbcdc13ac04463185930e0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-11 05:53:49 +00:00
Marcus Tillmanns
fc95d7a737 Utils: Improve FilePath::sort
Remove the conversion to/from QString for sorting.

Change-Id: I89921328b6d9e952c802d41998495bd2ffbb9f99
Reviewed-by: hjk <hjk@qt.io>
2023-05-10 08:56:32 +00:00
Jarek Kobus
c68a013a3e Tasking::Tree: Rename Tree into TaskTreeTask
Task-number: QTCREATORBUG-29102
Change-Id: I70073bcb44a712c427c8c5aea42c48dbc30eebe0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-10 06:07:45 +00:00
Jarek Kobus
c75b59f9b4 Process: Rename QtcProcessPrivate -> ProcessPrivate
Rename the logging category for Process.
Fix inline comments accordingly.
Adapt warning/debug messages accordingly.

Change-Id: I2b1f0f558701def3afa3c1b04adf629833dba9e7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-10 06:07:22 +00:00
hjk
2e7930b56e LayoutBuilder: Rename Id to ID
The Id was only used in the demo. "ID" is Not exactly canonical naming,
but this clashes often with Utils::Id, so mis-spell until we settle on a
proper name.

Change-Id: I6fdf806c41abf224f7422ec6c9263db3eb357190
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-10 04:59:13 +00:00
Jarek Kobus
936086745a FileSearch: Get rid of FileSearchResult
Use SearchResultItem instead.
This change should reduce the remaining freeze described in
a9eb732ce6 even more.

Change-Id: I102b82ed5677360ccd9e425dd0bdd941d87116f0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-09 11:03:48 +00:00
Robert Löhning
8764bab627 SquishTests: Improve version detection for imports
Change-Id: If38aa92c22c3390859f738ad5bfa5bacf47302ec
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-09 08:29:14 +00:00
Robert Löhning
13e0011dba SquishTests: Fix formatting of exception message
Amends 8d03220017

Change-Id: I05266fe6152a8ac2601890e8dcf32fc68d0989d3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-09 08:28:51 +00:00
Robert Löhning
a32e720692 SquishTests: Some more Python3 adaption
Change-Id: Iee0fd4107c3423d72a1dc51b0087837e4de46537
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-09 08:28:29 +00:00
hjk
41b6ecf502 Fix environment auto test
Amends 1e1befd9eb.

Change-Id: Iecd06ee06081057208a2b3387d618142dc74d0bd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-08 12:03:52 +00:00
Semih Yavuz
cd73f8c6b8 qmljsreformatter: don't default foreach type to "in"
Fixes: QTCREATORBUG-29123
Change-Id: I4d3a611c359946c4483388cbf18a0b6f16d0a8d6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-08 07:39:26 +00:00
Robert Löhning
82b5cc89cb SquishTests: Log used Python version
Change-Id: I60cb928382840f34800af6a8ee1ed7f084acfb93
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-08 07:33:12 +00:00
The Qt Project
a65637be5c Merge "Merge remote-tracking branch 'origin/10.0' into temp" 2023-05-08 07:30:02 +00:00
Eike Ziller
5917171911 Merge remote-tracking branch 'origin/10.0' into temp
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs

Change-Id: I877666cf9c209c5b0a1365aeb81d9cb13144a993
2023-05-08 09:17:56 +02:00
hjk
cc45afdfb0 Layouting: Avoid a lambda in the demo
Change-Id: Ic11936fd2a6da2153a52e39249d49d174ffb8466
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-05-08 06:58:17 +00:00
Jarek Kobus
8b3aa900da Utils: Move SearchResultItem/Color into Utils
It's going to be reused inside FileSearch.

Change-Id: I8993d7158ff31c311c2283d32bc43465a8946a52
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-08 06:41:27 +00:00
Alessandro Portale
1e1befd9eb Proliferate pathListSeparator()
Change-Id: I546107af6a88ad5901659a0a64485e4ebca3a164
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-05 15:17:10 +00:00
hjk
62f3d29be4 Layouting: Introduce Ids for Items
Intenally just wrapping a 'bindTo' result, but less trigger potential
for pointer related peladophobia

Change-Id: I25171a2675fb0474ce97c04552ac1cf5ffd6ee56
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-05-05 15:08:23 +00:00
hjk
d5329d56b6 Layouting: Add demo
Currently almost the same as the comparison example, but planeed to
grow.

Change-Id: Id129266a1b5b12438e2fb643ee114e6d816581f6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-05 13:09:02 +00:00
Jarek Kobus
af32b0ce44 Tests: Rename tst_AsyncTask -> tst_Async
Follows 187a7640de

Change-Id: I58e6afbc0cbdea37c405b11e133d794a91f09fc6
Reviewed-by: hjk <hjk@qt.io>
2023-05-05 12:35:56 +00:00
Jarek Kobus
abce79939a Tests: Rename tst_QtcProcess -> tst_Process
Follows 470c95c94b

Change-Id: Ie26b5677d28e645ab27aeebf5976b5507385716a
Reviewed-by: hjk <hjk@qt.io>
2023-05-05 12:35:50 +00:00
Robert Löhning
200d3b455b SquishTests: Don't test.verify state of checkbox in getBuildIssues
- It generates a ridiculously large number of test results in
  comparison to what's actually tested
- In tst_memberoperator, it is used in waitFor(). Thus, it depends
  on timing and the number of test results varies from one
  execution to another

Change-Id: I7d4ad8f87590b4fc2dda51e9eda703961c7acd9e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-05 09:35:38 +00:00
Robert Löhning
8d03220017 SquishTests: Improve log messages of exceptions
...and make them more similar to Squish's own "Error" messages.

Change-Id: If5df701d4fa01fc1c1aea94cc9778a6a5dccc44e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-05 09:33:01 +00:00
Eike Ziller
7724f8653f Merge remote-tracking branch 'origin/10.0'
Change-Id: I7a3925ad8e4f97461b64a70217102ed900430253
2023-05-05 10:39:47 +02:00
Jarek Kobus
867b10a06b Remove unused includes of QFutureInterface
Change-Id: I70f5e842801b628c7f9ad4d433334ce04d4e648e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 06:50:36 +00:00
Jarek Kobus
a0f6e8dc04 Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}
Follows QtcProcess -> Process rename.

Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 05:52:26 +00:00
Jarek Kobus
470c95c94b Utils: Rename QtcProcess -> Process
Task-number: QTCREATORBUG-29102
Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-04 05:52:16 +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
Jarek Kobus
a3a5b8f806 Utils: Rename asynctask.{cpp,h} -> async.{cpp,h}
Follows AsyncTask -> Async rename.

Change-Id: I37f18368ab826c9960a24087b52f6691bb33f225
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 13:24:20 +00:00
Jarek Kobus
82bc4870b3 Tasking::WaitForBarrier: Rename it into WaitForBarrierTask
Rename BarrierAdapter into BarrierTaskAdapter.

Task-number: QTCREATORBUG-29102
Change-Id: I003b09fd71af1bde870f761d365a8cea1858862a
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 13:07:51 +00:00
Jarek Kobus
187a7640de Tasking::Async: Rename Async into AsyncTask
Rename Utils::AsyncTask into Utils::Async.
Rename AsyncTaskBase into AsyncTask.

Task-number: QTCREATORBUG-29102
Change-Id: I3aa24d84138c19922d4f61b1c9cf15bc8989f60e
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 12:47:28 +00:00
Jarek Kobus
4b129df44f TaskTree: Enable the fluent interface for Tasks
Make it possible to use the default Task c'tor
and add selected handlers with onSetup/Done/Error()
methods.

Change-Id: I94f5806f347931faa07cff0ade620a3d30777cfe
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 07:05:28 +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
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
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
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
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
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
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
Robert Loehning
1fe7b77393 SquishTests: Remove workarounds for closed issues
Change-Id: If5f62b0f9013223643f016ce4e04932cca53397c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-26 11:49:13 +00:00