Commit Graph

8032 Commits

Author SHA1 Message Date
Cristian Adam
4d82246ab5 auto-setup: Add support for conan 2.0
Fixes: QTCREATORBUG-28865
Change-Id: Ifb801a458b4b18de218dee6604f0555cab13ec75
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-03-17 16:25:19 +00:00
Jarek Kobus
81bd8e3bd8 FilePath: Remove overloads for async tasks that don't take context
Passing mandatory context object clearly suggests a special
care should be taken for assuring the passed function
may still run when the task finishes in the future.

Fix FileStreamManager so that it deletes the streamer
even when context object was deleted in meantime.

Fix 2 usages of asyncCopy so that we pass a context object now.

Side note: passing nullptr as a context object is still
possible and should work, but it's not recommended.

Change-Id: I464438db42ed9292c2f89ecb9d5dde7c78f77640
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-03-17 14:30:59 +00:00
Christian Stenger
13bf47c875 Tests: Add another environment test
Test appending and prepending PATH.

Change-Id: If2ff84b24a8f961af0a3bb64ed77aaf37fe247fd
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-03-17 14:21:24 +00:00
Eike Ziller
0d8d4322b4 Merge remote-tracking branch 'origin/10.0'
Change-Id: Ie591b7130b33a042509e56701384f8ff4d9cb7f8
2023-03-16 11:57:01 +01:00
Marco Bubke
157b5039c1 Sqlite: Improve database opening
Change-Id: I9074cda4d9da12a061f094ca72fa156d89ca0f87
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-03-15 11:34:50 +00:00
Marco Bubke
68bceb92cf QmlDesigner: Improve readabilty of tests for project storage updater
Task-number: QDS-9382
Change-Id: I9aac10b7e7782847bae23b09e64fbe569ce2c40a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-03-15 09:37:57 +00:00
Cristian Adam
15e1a64764 CMakePM: Add include presets support
Fixes: QTCREATORBUG-28894
Change-Id: I9359cb85c230f2db02f08427af9832f168a32c41
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-03-14 14:47:28 +00:00
Marcus Tillmanns
8f1cbd2e52 Utils: Improve and test CommandLine::fromUserInput
Change-Id: Ia18f5b01d91200e6ad65735496395215c6393533
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-03-14 14:40:35 +00:00
Jarek Kobus
0bec769b69 QmlJS: Use QtConcurrent invocation for async run
Add ModelManagerInterface::importScan() overload to avoid
instantiating dummy QPromise arg on caller side.

Change-Id: Idf836d30b2167d8840cc4e7ac6f95377c9d5622a
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-14 08:47:26 +00:00
Eike Ziller
9eb218aee7 Examples: Use "install" path as fallback
If neither relative nor install path of the example files exist.
This makes the error message that the file is not found more sensible.

Change-Id: I1a7d2acdb4017cdaac97af35d9d35b70c06323a6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-03-14 08:22:21 +00:00
Marcus Tillmanns
9f1afb0318 Utils: Add stringutils splitAtFirst
Change-Id: I221d6c6086f53ec5f94c1157ea533d862db38d52
Reviewed-by: hjk <hjk@qt.io>
2023-03-13 13:58:05 +00:00
Robert Löhning
32c74bfe2b Debugger: Fix manual plugin test
The location of the dll doesn't depend on the application's current
directory but its binary's location. This caused the manual test to turn
false positive when running from Creator, because on Windows, the
binaries are placed in a subdirectory named "debug" or "release",
respectively.

Change-Id: Ie5115fbacd30ad0ef85bc258d405ae3ac42f8ece
Reviewed-by: hjk <hjk@qt.io>
2023-03-13 13:20:34 +00:00
Eike Ziller
c7e94d80c7 Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/shared/qbs

Change-Id: I33e13270c8c15a51b4ce4eaa6b4584041ed124e0
2023-03-13 12:30:04 +01:00
Jarek Kobus
0c4dff7c10 FileListIterator: Minor fixes
Add a reference to c'tor's encodings arg.
Make c'tor's args default.
Make m_items field const.

Change-Id: I74bb1829f3ba0ea8a61106bddadeb935b6405f77
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-03-13 10:57:24 +00:00
Christian Kandeler
81dcfd907b CPlusPlus: Add parser support for generic lambdas
Change-Id: Id17975a4296925c10b1b43f963412eea61ccfa5d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-13 10:21:32 +00:00
Eike Ziller
e060f82fa5 Examples: Read meta data, which includes categories
Task-number: QTCREATORBUG-28546
Change-Id: I11505d4f8b8eaef3f525185cd45757b6f41012ec
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-13 07:21:44 +00:00
Eike Ziller
87b5176fd2 Add test for examples parsing
Change-Id: Id2ec8afcdbdff97e12b32b836c955552589081c4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-13 07:21:18 +00:00
Jarek Kobus
dc2f6b2345 DeviceShell tests: Use QtConcurrent instead of Utils::mapped()
Fix some const correctness and style.

Change-Id: Id284f14530ff454e92e3c77b33e0844fcb429daf
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-12 19:35:38 +00:00
Marco Bubke
c4a51f168e QmlDesigner: Update directories without qmldir to project storage
There are qml directories without a qmldir. To identify them we use the
directory source id instead of the qmldir source id.

Task-number: QDS-9345
Change-Id: I1356ad332c091b64cbdad389a3ac505133716634
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-03-09 13:22:53 +00:00
Marco Bubke
f0fde39b0b QmlDesigner: Use directory source id for project data
There are qml directories without a qmldir. To identify them we use the
directory source id instead of the qmldir source id.

Task-number: QDS-9345
Change-Id: I4ed4596a21576e6bbd18c5117753669ef8a68a28
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-03-09 13:22:46 +00:00
Marco Bubke
583bb87c6a QmlDsigner: Add entries to path watcher for initial run
If there are no cached data all importatnt files should be now being
watched.

Task-number: QDS-9178
Change-Id: I0c9093e41e6a2d4f3a5aa3d62aba1fd41e047da4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-03-09 13:22:32 +00:00
Jarek Kobus
cca7c2a12b AsyncTask: add asyncRun() wrappers around QtConcurrent::run()
These wrappers accept the additional QThread::Priority argument.

Change-Id: I05a692d13bb539622146e3267f8a918431af06ac
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-03-09 08:32:03 +00:00
Jarek Kobus
69fa8f3f3c FilePath: Integrate FileStreamerManager for async i-face
Change-Id: I3371471e3c23b86a62b5e4056b343941ab46e191
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-03-07 12:22:40 +00:00
Robert Löhning
0476212e68 SquishTests: Simplify readme file
Change-Id: I0e66960a3d681362addafcce3ca845019061d0fe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-07 11:55:11 +00:00
Christian Kandeler
755d9769d8 CPlusPlus: Add support for coroutines
Also fix some concept-related bugs uncovered by the test case.

Change-Id: Ia67c971026bcd85d9cc252f46cd4f56c2865d432
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-06 13:20:04 +00:00
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