Commit Graph

7307 Commits

Author SHA1 Message Date
Jarek Kobus
dc8da57e64 tst_QtcProcess: Use snprintf instead of sprintf
This fixes the following warning:

warning: 'sprintf' is deprecated: This function is provided for
compatibility reasons only.  Due to security concerns inherent in
the design of sprintf(3), it is highly recommended that you use
snprintf(3) instead.

Change-Id: Ic8eac91b02cb60122f603506e083dbdf9eca8712
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-03-06 12:37:41 +00:00
Eike Ziller
36d9341397 Merge remote-tracking branch 'origin/10.0'
Change-Id: Idf151b6cfe87957cf905e67aab6b1275b9f0506a
2023-03-06 08:24:18 +01:00
Christian Stenger
735417c859 Tests: Enhance offset test
Change-Id: I58bc51c4552ab58e303de0fdf3f89cd28b9ff62a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-03-06 07:10:46 +00:00
Christian Kandeler
47d375bbb4 CPlusPlus: Support requires clause in parser
Change-Id: Ice6a7a287453516a1cfc296e2c9f16160b3ea130
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-03-03 11:10:54 +00:00
hjk
3e5d14b020 Utils: Replace Environment::find iterator use
Task-number: QTCREATORBUG-28357
Change-Id: I2723ffd6b7842f88009701eccea9aacac8cbf516
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-03-02 16:02:41 +00:00
Eike Ziller
87ede95b5c Merge remote-tracking branch 'origin/10.0'
Change-Id: I7bd186df0bfae7906e980e9c2c811f8dcf29750d
2023-03-02 10:17:58 +01:00
hjk
bcfaddb473 Debugger: Remove 'UndefinedStaticMember' test
Compilers are getting increasingly better in optimizing this stuff
out, it's difficult and rather unnecessary to keep track of all
variations.

Change-Id: I9e05d5afadc4d875dc3b61e61364cf085a825239
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-03-02 07:08:44 +00:00
David Schulz
1424111734 Debugger: add QPointer Dumper tests for inherited classes
Change-Id: I6a25059d4c3fcd995088f90f7b11cf87a56a9a16
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-01 12:28:42 +00:00
Christian Stenger
ca030b5a9a Squish: Fix windows toolchain for VS15
Similar to what has been done for fixing VS2017. But VS2015 also needs
to add a matching Windows Kit tools path.
This magically happens if the kit is set up manually, but as we
provide a stripped version of toolchains and kits we need to adjust the
kit environment manually.

Change-Id: I9a88e7424acf2768774f5ef580ef6d1fa73bcb5a
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-03-01 12:08:33 +00:00
Jarek Kobus
00938bd7bf TaskTree manual test: Use QPromise for async calls
Change-Id: I532520af644b431441d74c0e06eff4d06d0b3924
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-03-01 12:01:04 +00:00
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