Commit Graph

8097 Commits

Author SHA1 Message Date
David Schulz
fb8182ca7c Debugger: fix QJSValue dumper for Qt >= 6.5
and disable the QV4::Value dumper for that version.

Change-Id: I31a0ddba2bdab3b196e4fc5298fd8e7c10f9dc92
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-01 09:51:07 +00:00
Marcus Tillmanns
d14834ad45 Utils: Fix handling of multi slash in fsengine
Change-Id: Iaf525423f5ea0933b202f23042173c51edb3d4b0
Reviewed-by: hjk <hjk@qt.io>
2023-03-01 08:26:08 +00:00
Marco Bubke
130453fe15 QmlDesigner: Add image for broken preview
Task-number: QDS-9048
Change-Id: Ic2ce8bf4d51f72c3ddae588709820728fc7c76b5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-28 14:01:03 +00:00
Marco Bubke
c2915c6963 QmlDesigner: Fix test for project updater
Some tests got broken by the directory support.

Change-Id: I2a0de46a7f7f84328440ee785329d915049cb7f3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-28 14:00:50 +00:00
Marcus Tillmanns
b6f2ff8705 Utils: Fix handling of "/somedir/.." in FSEngine
The change 249d613a60aa6a1347ebc1c29902049247b93324 in qtbase
makes it so that QFileInfo::fileName() actually calls the
underlying FSEngine now.

Paths which resolve to "Root" like "/somedir/.." would
return "" as their filename since they were immediately cleaned
and therefore converted to "/" which does not have a filename.

The same issue did exists for paths such as "/__qtc_devices__/ssh/.."
and "/__qtc_devices__/ssh/devicename/.."

This patch makes it so that the incoming filename is kept "unclean"
until it is actually used.

Change-Id: Id5b7d1105e2d59d776aa1df5bbf6273a9fcb5d27
Reviewed-by: hjk <hjk@qt.io>
2023-02-28 11:06:01 +00:00
Marco Bubke
921157f646 QmlDesigner: Don't inline what method
This works around the type_info::hash_code macOS bug and leads to
smaller code size because the RTTI will be not anymore injected in all
TUs.

Task-number: QDS-9266
Change-Id: I3defe3dc11b4b76f5c60b08c103a3a39ee92f367
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-02-28 10:10:10 +00:00
Jarek Kobus
29f634a8ca TaskTree: Introduce WaitFor, Condition and ConditionActivator
WaitFor(condition) Group element enables postponing Group's
children execution until the condition is met. Use
ConditionActivator::activate() method to signal that the condition
is met. A call to ConditionActivator::activate() schedules a request
to the TaskTree instructing it to resume execution of awaiting
condition.

The Group containing the WaitFor element is started itself,
and its setup handler is being called. If setup handler
returned TaskAction::Continue, the children execution is being
postponed. Otherwise, when StopWithDone or StopWithError is
returned, the Group finishes and WaitFor element is no-op in
this context.

This functionality is going to be used when some part of the
task tree may continue only after some data has been collected,
and data collection took place not from inside start or done
handlers. The example is running debugger for already started
process - the debugger may run after the process already started,
delivered its PID and it's still running. In this way
we may start a debugger process in parallel in right point of time.

This patch implements the 5th point inside QTCREATORBUG-28741.

Task-number: QTCREATORBUG-28741
Change-Id: I4afaedb0b34fe0383c16a6d1f74bf07f74cc088a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-28 10:00:26 +00:00
Marco Bubke
cc507063bc Sqlite: Inject RTTI into TU
We had problems on macOS with the catching of exceptions because the has
type_info::hash_code was different. This is probably a bug because RTTI
code is injected for an inline class.

To work around that problem we implemented the virtual what method for
every exception.

Task-number: QDS-9266
Change-Id: I79052c8b70adead412d1940b17195151fb19ebb9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2023-02-28 09:48:30 +00:00
Christian Kandeler
61de69ea90 CPlusPlus: Handle C++20 concepts in parser
Change-Id: I8c6b8b1ba3f36b83cd1d667bec9830271147b1ac
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-28 08:32:40 +00:00
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
Christian Stenger
55c2a55a60 Tests: Fix shootout test
Broke with 435a4e9dd4 long time ago.

Change-Id: I1f3c88f63f6a3141c65ee0e2fdc5d8b102283618
Reviewed-by: hjk <hjk@qt.io>
2023-02-27 05:30:16 +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
Christian Stenger
5c4cf2d018 SquishTests: More adaption to changed wizard template
Change-Id: Ib073a8eae3ee87dc46699083799a8316da66b32d
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-23 12:51:08 +00:00
Christian Stenger
0604027834 SquishTests: Fix path handling for pre-installed Qts
There is now a Qt6 and a new possible location.

Change-Id: I4feac6da2756bde77e98ce08f945ddefec7e2fb4
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-23 12:51:02 +00:00
Christian Stenger
3a7ab3ce8e SquishTests: Rename helper class
Change-Id: I39890cbd98b7e6ebcc0fdf4722d0311eb6650397
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-23 12:50:56 +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
Jarek Kobus
d44126c300 Unittest: Drop unneeded dependencies to coreplugin files
Amends baa83725f6

Change-Id: I82b472585dc30b0466eace15897f5d96fc7e9fd9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-02-23 09:35:38 +00:00
Marco Bubke
e675fecb9e UnitTests: Make test fore robust
Change-Id: I6e92f242f759a89a11c77d862b5158c86b2b7a5a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-23 09:05:54 +00:00
Marco Bubke
e78837a27a UnitTests: Disable warning for self assign overloaded
We want to test it so we cannot fix the code.

Change-Id: Ieb0517e539ae60c275069b790ca32380d39a59f0
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-02-23 09:05:24 +00:00
Marco Bubke
20c366aa48 UnitTests: Disable self move warnings
We want to test self move, so we cannot avoid the warning.

Change-Id: Id785690d40cfc5299e65c9f0e69abe6e336ba9ff
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-02-23 09:04:55 +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
Marco Bubke
18157d0b24 Sqlite: Add pathExists function
The 'pathExists' function can be registered to the database connection
and is then callable in Sql.

Task-number: QDS-9217
Change-Id: I21afc5cd38765854daa0b1058cc5e8946b551924
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2023-02-22 10:48:05 +00:00
Marco Bubke
b4ab1e173b Sqlite: Add progress handler
Sqlite::ProgressHandler handler{
  [] { return Sqlite::Progress::Continue; },
  1000,
  database};

is setting up a progress handler for this scope. If the handler is
destructed it will automatically reset the handler on the database. The
handler is active for the whole database connection.

Task-number: QDS-9216
Change-Id: I59831f40d32c062eefdfb0c4dfbf3045058e1fd2
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2023-02-22 10:47:55 +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
Vikas Pachdha
0e7a603568 UnitTests: Disable warnings as errors
Change-Id: Ib58799510258973638f25ec4d52ce62710c26f54
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2023-02-21 15:55:35 +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
Christian Stenger
2d79718ad4 SquishTests: Adapt to changed wizard template
Change-Id: I7e487481ede88d186fb868d595eb96f25afc2fc5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-21 06:23:43 +00:00
Christian Stenger
4525d7baf9 SquishTests: Adapt to changed wizard template
Change-Id: Id50e16a790e63f7c99fbbe5213d9e25d20aaf29b
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-21 06:23:27 +00:00
Christian Stenger
5c7eb717ed SquishTests: Adapt to changed wizard
Change-Id: I07d3b468e6b5ec4055fa57efcddaa0cdb678966b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-21 06:23:14 +00:00
Christian Stenger
507e5f76fa SquishTests: Fix expectation for profiling
Wizard template has changed and we use Qt6.2 nowadays.

Change-Id: I63d0103ac324bcf83f0b07802f57a171589a2fb1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-21 06:22:51 +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
Marco Bubke
ba6c1344b6 QmlDesigner: Integrate ProjectStoragePathWatcher
Task-number: QDS-9170
Change-Id: Iedbb07e41232beeb73cd12c89f892eec7968d084
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2023-02-20 14:12:43 +00:00
Marco Bubke
44d61b3e66 UnitTests: Fail on warnings
Task-number: QDS-9135
Change-Id: I798b1143c68e68bcd53144f5e6d01864ae0ce73b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-02-20 14:12:37 +00:00
Marco Bubke
9b43e0caea Googletests: Bump to 1.13
Change-Id: I8b54611e404e5313269fc3436ce995bf0d09d35d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-02-20 14:03:58 +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
Christian Stenger
bc38ad8c59 SquishTests: Adapt to changed project template
Change-Id: I9aa98f194a7ab4fa1390b106e398b12546a7addd
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-16 14:07:57 +00:00
Christian Stenger
7a26b76ce3 SquishTests: Tweak preparation of toolchains
Prepare toolchains for usage. Basically parameterize function
to be used with more than one version and make use of it.

Change-Id: I30ee198302de54d933fa7c436e701273d497cc07
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-16 14:07:51 +00:00
Christian Stenger
15ca3268ad SquishTests: Provide Qt6.2 for testing
Long overdue. Adapt Qt Quick related stuff as this nowadays
is requiring Qt6.2 as a minimum.

Change-Id: Id1e727813034044edb4584c6d5f73a56310293d2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-16 14:07:44 +00:00
Marco Bubke
cbd02325a8 QmlDesigner: Add extension support in qmltypesparser
Task-number: QDS-7384
Change-Id: I3f84f361360bd085d0ee78f32d808151e32a2436
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-02-16 12:26:32 +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