Commit Graph

2999 Commits

Author SHA1 Message Date
Jarek Kobus
10a97e1f0e Various Tests: Use typed connections in QSignalSpy
Change-Id: I0965916f5ce302e9bdcb47ae7126262327f63613
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-27 14:07:13 +00:00
Eike Ziller
380f7622de Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/plugins/debugger/watchhandler.cpp

Change-Id: If759b6260dfa008738d3a0ce543eb0eead8a8bba
2023-02-27 09:48:12 +01:00
David Schulz
5169469911 Debugger: add <load more> functionality to array dumper
Change-Id: Ib44748fa3218788ca20a99b0a0f4cd85716dde06
Reviewed-by: hjk <hjk@qt.io>
2023-02-27 08:35:32 +00:00
Marcus Tillmanns
c41d30711a Utils: Make UnixDeviceFileAccess macOS compatible
"stat" on macOS has slightly different formatting options.

Also adds unittests for UnixDeviceFileAccess

Task-number: QTCREATORBUG-28142
Change-Id: Ib42fc1c22ef2771365e915df34f2286e2c705568
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-02-25 09:45:47 +00:00
Marcus Tillmanns
a62c5cf89a Utils: Cleanup searchInX functions
Also move some often used types into new file "utiltypes.h"

Change-Id: I3f152d1dc2f96ba0259ad6c098d9ac5ee03a59f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-02-24 15:13:32 +00:00
Jarek Kobus
8eaf73700e TaskTree: Don't call storage done handlers from TaskTree's d'tor
Change-Id: Ie2b04d433be3452f9e668efd3341dedfcb154290
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-02-24 12:48:44 +00:00
Marcus Tillmanns
d5a9e28a96 Utils: Add tst_filepath
Moves all tests that are applicable only to FilePath over from
tst_fileutils.

Change-Id: Ic331e1470a7479ee2f8ba38baec84124982a000a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-24 09:45:56 +00:00
Eike Ziller
c2266981c9 Add tests to Utils::wildcardToRegularExpression
It was unclear if the new non-filepath version that is added to Qt is
similar enough to replace our own version, so just add the new tests
from Qt to check.

Change-Id: I9ac2739500ab3b8557c0e6223489e0fdddd79091
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
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-02-23 13:33:37 +00:00
Marcus Tillmanns
00fd4c8fea Utils: Fix diriterator for scheme folders
Previously the "fileName" of every device inside a scheme subfolder
would be empty. Therefore QDirIterator would skip them.

Change-Id: Ifa46859aadbd8a81364a1fe0a72b9a50a7a396ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-23 10:25:15 +00:00
Eike Ziller
66d4e12a58 Build: Remove FindQt5.cmake
No longer needed, since we generally only support building with
Qt 6 nowadays, and the parts that still do support building with
Qt 5 handle that manually.

Change-Id: I72381589ca3ab7bf1af88d9f185cad7f0cdf149c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-02-23 07:12:44 +00:00
Eike Ziller
37ec527e6d Fix tilde expansion in FilePath::fromUserInput
It was not working for just "~/" without additional path component.

Change-Id: I559a7771fc09d2e604f567548585a668e8809729
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-23 07:12:15 +00:00
Christian Stenger
a759e400cc Debugger: disable inheritance dumper tests for LLDB
Change-Id: I6944d156cbef49838a6fcbae066d3a59f91325b7
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-23 06:00:27 +00:00
Eike Ziller
ddbf8a4ffb Merge remote-tracking branch 'origin/10.0'
Change-Id: I8a53e2e8216fab7e45c3a1b8a3d2dc6656dfa7e2
2023-02-22 11:28:08 +01:00
David Schulz
01d3ed0463 Debugger: fix optional and variant dumper test when using qt5 qmake
Change-Id: Ib9cf05384535eab9d0e39a49d96aa88af48548d2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-22 04:58:58 +00:00
David Schulz
b625e8bb9b Debugger: improve dumping Qt pointer types
Adding the data as pointers allow casting the data to the actual derived
class

Change-Id: Id1b421c2729c6da8bf17054e39b4f1e8d8ff2cfa
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-02-21 08:45:59 +00:00
David Schulz
1a575cd2df Debugger: Fix printing of pointer to multiple inheritence base class
...for cdb when we have no nativeValue. This is the case whenever we
have a container like std::vector, QList or a c array to the base class.

Fixes: QTCREATORBUG-28337
Change-Id: I18c63dfbc207d76bf41d85d5da83f7f4603504f9
Reviewed-by: hjk <hjk@qt.io>
2023-02-21 08:45:49 +00:00
Jarek Kobus
efc4a0f1af AsyncTask: Make it possible to run with promise
Using QtConcurrent API.
Adapt asynctask tests according to new API.
The old API in going to be removed, soon.

Change-Id: I3cf163e9492526f0b49bd162c27e6c55a98ace7a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-02-20 14:21:06 +00:00
Jarek Kobus
2d53e90a2b Utils::Link: Remove 3rd arg from fromString()
Not used anymore.

Change-Id: Iba758c0b5a6bb72c4b65511ab7e0e25e88cbf4f7
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-02-16 15:19:18 +00:00
Eike Ziller
4e9309f923 Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/plugins/clangcodemodel/clangcodemodelplugin.cpp

Change-Id: Idb3d6e8fdfd278979f6180dc3795a2138bc2e61d
2023-02-16 12:47:32 +01:00
Marcus Tillmanns
cab8eee85c Utils: Fix fileInfoFlagsfromStatMode
Previously the checks for the mode bits were incorrectly
using AND checks. As a fix the contents of "stat.h" was
copied and converted so it can be used directly and on
platforms that do not contain stat.h

Change-Id: If735dcffb8ffc490d297dae7f8c43ae01e79f460
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-02-16 08:20:11 +00:00
David Schulz
2c39db8eb7 Debugger: modify dumper for std::variant
Directly display the containing value without the need to expand the
variant. Additionally fix the dumper for Windows and add tests.

Change-Id: Iaae49470750fa3659339331e1518e13020df7938
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-15 08:23:18 +00:00
David Schulz
3a2b49aafa Debugger: test std::optional dumpers
Change-Id: Iae177dd3448a861e93935d02388ea6af187bd9f3
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-15 08:23:13 +00:00
Orgad Shaneh
6a0a4ac5e4 Merge remote-tracking branch 'origin/10.0'
Change-Id: Iff4973fc4116122bcaa7aa9434294dba875ef56a
2023-02-14 15:52:41 +02:00
David Schulz
4838dead1a DumperTest: print total time in debugger
Change-Id: I1397bd3d8034cb334bdc3b84bdbcc060aa0cd9f5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-14 09:47:52 +00:00
Alessandro Portale
6138414813 Tests: Remove a couple of tr() calls
No need to have them translatable and to risk lupdating them.

Change-Id: I41c84240ed30ffb6e19ab133422f4e5fb3a97aa4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-10 16:27:08 +00:00
Jarek Kobus
06dda40ccc TaskTree: Add synchronous invocation (Tasking::Sync)
Make it possible to mix synchronous and asynchronous calls
inside task tree.

Basically, it's a shortcut for:

bool syncMethod();
Group {
    OnGroupSetup([syncMethod] { return syncMethod()
                                ? TaskAction::StopWithDone
                                : TaskAction::StopWithError; })
}

Please note: similarly to Group, Sync isn't counted as a task
inside taskCount() and doesn't emit TaskTree::progressValueChanged()
when finished. It's being considered as a simple handler
that doesn't last long and shouldn't block the GUI thread.
Otherwise, use AsyncTask instead.

Change-Id: If71c5da2f9b202a69c41a555cc93d314476952f4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-02-10 10:50:47 +00:00
hjk
4b9aaf6ca1 ExtensionSystem: Remove the IPlugin back pointer to pluginspec
The price of having to loop in two places seems small compared
to cleaner relations between the classes.

There's a new hack in the helpmanager to make sure we aren't
looping to often. The hack wouldn't be needed if the (odd(?))
check there weren't there.

Change-Id: Ifed50213b2de8feedfb45c185808d163c00c19ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-10 10:23:33 +00:00
Eike Ziller
2f5aed6c78 Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/plugins/clangcodemodel/clangdlocatorfilters.cpp

Change-Id: If91f26625ea9620fb9fdbf45705b32f37cb7f158
2023-02-10 10:43:06 +01:00
Christian Kandeler
207f2b216c CPlusPlus: Add lexer support for new C++20 keywords
Change-Id: I2b83deb0502ebf2cdca2af774fbb2ce26e947c11
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-09 13:19:53 +00:00
Christian Kandeler
bd2ca236e1 CPlusPlus: Check maximum include depth in lexer
We use a value of 200, which is also GCC's default.

Fixes: QTCREATORBUG-28770
Change-Id: Id02b324cd2ffa81a709441a5d93856bcd06501c3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-08 12:53:31 +00:00
Jarek Kobus
84ba73be8c RunExtenstions: Remove StackSizeInBytes
It's currently not used.

Change-Id: I223a2e8add92a107b85518bcaf44bbd8a5e3fb9a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-07 12:56:43 +00:00
Marcus Tillmanns
516fce6f53 Utils: Add FilePath::tmpDir and createTempFile
Change-Id: I6f3143e59a87edffeee5e08708ba721293a8a369
Reviewed-by: hjk <hjk@qt.io>
2023-02-07 09:28:38 +00:00
Jarek Kobus
d829d9ff33 StringUtils: Add trimFront(), trimBack() and trim() methods
Change-Id: I900c30111c79bee548c4861b082d7b035a5dc43d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-02-05 17:17:00 +00:00
Jarek Kobus
2d8d27c9ba StringUtils: Add joinStrings method
See QTBUG-110900. In meantime, StringUtils addition.

Change-Id: I700321a65d2d00b85daa412c77b573457312ad3c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-02-03 11:33:27 +00:00
Jarek Kobus
45d72db1b4 TaskTree: Add 2 more variants of NestedParallelError test
Variant 2:
Inside this test the process 2 should finish first, then synchonously:
- process 3 should exit setup with error
- process 1 should be stopped as a consequence of error inside the group
- processes 4 and 5 should be skipped

Variant 3:
This test ensures process 1 doesn't invoke its done handler,
being ready while sleeping in process 2 done handler.
Inside this test the process 2 should finish first, then synchonously:
- process 3 should exit setup with error
- process 1 should be stopped as a consequence of error inside the group
- process 4 should be skipped
- the first child group of root should finish with error
- process 5 should be started (because of root's continueOnError policy)

Change-Id: Ie34737244c7da4334a6cbbae4f0ddba99503d09c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-01 13:10:06 +00:00
Jarek Kobus
f8d4e485c2 TaskTree: Add a test for running empty tree with group handlers
Change-Id: Ia8c31928f07bec7a91937e0a1798d99ac761d0e2
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-01 13:10:00 +00:00
David Schulz
739d4942e2 Merge remote-tracking branch 'origin/master' into 10.0
Change-Id: I9f6090e2a9f62fd3a9823f5a7342ea423dfbb2ac
2023-02-01 05:24:33 +00:00
David Schulz
4e8b7eee9d Cpp: support space ship operator in lexer
Fixes: QTCREATORBUG-27503
Change-Id: Idbff5a9b5b2e6e841e298ca6f706ef3c6aa1622b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-01-30 05:47:41 +00:00
Eike Ziller
3724520499 Merge remote-tracking branch 'origin/master' into 10.0
Change-Id: I4dd2149e046d33b65e6d9c3497d0153f81fd3f31
2023-01-27 15:41:54 +01:00
Jarek Kobus
0f19fd6d0d TaskTree: Add tests for proper continuation unwinding
Change-Id: I79a077277328033b99fab6b2503621f3209c63be
Reviewed-by: hjk <hjk@qt.io>
2023-01-27 14:15:25 +00:00
Jarek Kobus
6b11e1d572 TaskTree: Revamp tests
Get rid of std::bind.

Enclose each data tag of processTree inside its own block,
so that "root" and "log" names are unique within each block.
This makes each block look like a pattern with filled data up.

Introduce TestData structure, so that it's harder now to mix
the order of test data in new rows.

Introduce some enums instead of bools to make more meaning
on the returned data.

Change-Id: Iffe49cf1c7f912378467ab9f9c1256003dba7b9c
Reviewed-by: hjk <hjk@qt.io>
2023-01-27 14:15:14 +00:00
hjk
55dd933066 Haskell: Import from superrepo
Change-Id: I83c6c817c78ccbf1aee65847777f2652e19275a5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-27 13:30:26 +00:00
Jarek Kobus
01828cfd8e tst_qtcprocess: Add testPipe
Change-Id: I5b54231d201960eb6909780e4a2c5b9860b7e523
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-01-25 09:34:34 +00:00
Eike Ziller
06c4df37b9 CMake build: Remove usages of Qt5_VERSION
and remove checks for Qt < 6.2, since that is our minimum version.
Except for sdktool and qml2puppet.

Change-Id: Id36cd1a15a5a6e5480e4ae5d0a8ffaea4b2a1864
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-24 15:35:46 +00:00
Jarek Kobus
567216bb49 TaskTree: Fix continuation of group with parallel limit
Change-Id: I10c40d06c21a0446187b8227b526ee903c569307
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-24 13:15:54 +00:00
Jarek Kobus
817553f3e5 TaskTree: Merge DynamicSetup with OnGroupSetup
Don't define 2 separate group setup items. Make OnGroupSetup
be able to handle also dynamic setup - like it's done with
CustomTask's setup handler.

Change-Id: I43e135f268ea96419b44ef5a4325707a124b4921
Reviewed-by: hjk <hjk@qt.io>
2023-01-23 08:07:36 +00:00
Jarek Kobus
98ff1d32f9 TaskTree: Remove GroupConfig / GroupAction
Use TaskAction for dynamic group setup. Get rid of possibility
of selecting group's children to be started inside group setup.
Use dynamic children's setup instead, so that each individual child
may decide itself whether it wants to be started or not.

Change-Id: Ie31f707791db0dc26be92663ca6238b8e49c3b98
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-01-20 14:18:56 +00:00
Jarek Kobus
9dfd72017c TaskTree: Add more tests for recently added fixes
Change-Id: Ia71fa174380b484cbe07a23f8b641755c5edcc65
Reviewed-by: hjk <hjk@qt.io>
2023-01-20 09:20:14 +00:00
Jarek Kobus
e6ca18e194 TaskTree: Implement dynamic setup for tasks
Before it was possible to dynamically setup groups only.
This functionalily is probably good enough to replace
Group's DynamicSetup, as it seems much more convenient.

Change-Id: I56080f0ffa844847ca955cf52ccb07f3b4e4c731
Reviewed-by: hjk <hjk@qt.io>
2023-01-20 09:19:49 +00:00
hjk
015b1ee53c Core: Tr::tr
Change-Id: I0064814b0689f0f65072d2b0f60e26162587fd54
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-17 14:34:16 +00:00