Commit Graph

7307 Commits

Author SHA1 Message Date
Jarek Kobus
c098b261dc TaskTree: Refactor Group internal data
Introduce the GroupData structure. In this way it's easily
possible to add extra properties of already used types, e.g. int.

It's also possible to easily create elements with multiple
properties.

Simplify internal TaskItem::Type enum.

Get rid of special ParallelLimit and Workflow elements.
Provide global parallelLimit() and workflowPolicy() functions.

Make global items (e.g. parallel, stopOnDone, etc...) const.

Change-Id: Ic5628255b542fd6c5a5565b055ff11804c8d7b68
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-19 15:30:15 +00:00
Jarek Kobus
0793b945f3 TaskTree: Replace usages of OnGroup... with onGroup... functions
Change-Id: I06ce6c917ac28b6362ad2cdef42355e5aa28f4eb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 15:29:55 +00:00
Jarek Kobus
2274847bfe tst_SubDirFileIterator: Fix build with Qt < 6.3
QDirIterator::nextFileInfo() was introduced in Qt 6.3.

Change-Id: I3ed6293d4262b0ff2bb4423eb37c35c7b3650e97
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 14:54:27 +00:00
Jarek Kobus
7501d7587f TaskTree: Introduce WorkflowPolicy::StopOnFinished
The policy is useful mainly in parallel mode.
It stops executing the Group when any task finishes.
It reports the task's result.

Change-Id: I7aa98365cdc4c1eb869ab419d42d0cc5438d43bf
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 08:40:24 +00:00
Jarek Kobus
f0acaecc63 tst_Async: Reuse TaskTree:runBlocking()
Change-Id: Ia5dd76bed15014d920e44f51de1774323be0b9a6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-19 07:19:46 +00:00
Jarek Kobus
6a8e8f5fbd tst_Tasking: Reuse TaskTree:runBlocking()
Get rid of the OnStart enum - that's checked indirectly
through the runBlocking() call.

Change-Id: I190de0f911c68195c31e722bcb1823b678cb0bd4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-19 07:19:33 +00:00
Jarek Kobus
686a40d199 SubDirFileIterator: Add manual performance test
Compare the total time spent on iterating a big file tree
with 3 different time iterators:
- Utils::SubDirFileIterator
- manually written iterator using QDir::entryInfoList()
- QDirIterator

The iterator run through about one million files (including
about ~100K directories). The more files above this
number to be iterated over, the bigger the relative time
difference of SubDirFileIterator compared to other iterators.

The number of generated files depends on the running
machine's core number. In my case:

Number of cores: 24
Number of generated files: 898753
Number of generated directories: 112345
Time spent on generating file tree: ~2 seconds
Time spent on iterating using SubDirIterator: ~80 seconds
Time spent on iterating using manual iterator: ~8 seconds
Time spent on iterating using QDirIterator: ~4 seconds
Time spent on removing generated file tree: ~2 seconds

Task-number: QTCREATORBUG-28892
Change-Id: I94d7cf0169a470820dc27f39c9cdb4150eea51c1
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-05-19 07:17:01 +00:00
The Qt Project
7057962e44 Merge "Merge remote-tracking branch 'origin/10.0'" 2023-05-17 14:23:50 +00:00
Christian Stenger
23b0082b20 Tests: Build text tests with Qbs as well
Amends 1a98dda5c4.

Change-Id: If563437141ac75bb2b72a9d550d1fb507a89e63c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-05-17 13:36:18 +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
David Schulz
b2e30e7ef8 Utils: add Position::fromCursor with tests
Change-Id: I1cd989eaf7e75bc04f171989f9f9fe932402abef
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-17 12:53:22 +00:00
Christian Stenger
a468bc2f02 Fix Qbs build
Amends f84199f8b7 and
reverts 796cfceb3a.

Change-Id: I7eb686c012bd99cddf36aa16219e3f33de2b15b2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-17 10:36:29 +00:00
hjk
8f5703a7b9 Tests: Add a test to feed shells via stdin
Change-Id: I7e19537d0a3015aeb329849758cc92da17a67606
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-05-17 08:21:09 +00:00
Christian Stenger
796cfceb3a Tests: Fix Qbs build
Amends f84199f8b7.

Change-Id: I6a233aca13f9908451748c20c1804fa2851043aa
Reviewed-by: hjk <hjk@qt.io>
2023-05-17 08:17:12 +00:00
Jarek Kobus
f84199f8b7 Solutions: Long live Solutions!
Short live Tasking in Solutions!

Add src/libs/solutions/README.md with the motivation and hints.

Move TaskTree and Barrier from Utils into Tasking object lib,
the first solution in Solutions project.

Tasking: Some more work is still required for adapting auto and
manual tests. Currently they use Async task, which stayed in Utils.
For Qt purposed we most probably need to have a clone of
Async task inside the Tasking namespace that is more Qt-like
(no Utils::FutureSynchronizer, no priority field,
global QThreadPool instead of a custom one for Creator).

Change-Id: I5d10a2d68170ffa467d8c299be5995b9aa4f8f77
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-17 06:29:03 +00:00
David Schulz
9758e71458 Utils: add tests for Position::fromPositionInDocument
Change-Id: I2b530cf62a4defe0292c51834b1e5093a7d5e55f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-16 10:30:15 +00:00
David Schulz
479d7e3732 Utils: remove duplicated test
Change-Id: I0391feb848af09295afd9d3e84e25337023c24b6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-16 08:55:21 +00:00
David Schulz
b4734ff727 Utils: add tests for Position::fromFileName
Change-Id: I321b91567e47e08883c7b991cd24d02bb8a9b9c6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-16 08:24:28 +00:00
Robert Löhning
e719a2b47a SquishTests: Update tst_create_proj_wizard
Change-Id: Id17f5d1a68da7fe7c9f45dc5b62ab3fe1039f753
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-15 14:13:41 +00:00
Robert Löhning
0b241f42f1 SquishTests: Make suite_tools Python3 compatible
Except for tst_designer_edit which needs a bigger update.

Change-Id: I8300a9491ec34b4d8deeed39f02fc59281cc20c9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-15 14:12:17 +00:00
Robert Löhning
a820b5490c SquishTests: Fix using invalid paste IDs
Change-Id: Ibc48506ff1632cbfe8d662cd00ed057af7d16a6a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-15 14:12:01 +00:00
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