Commit Graph

3413 Commits

Author SHA1 Message Date
Jarek Kobus
490410e18d TaskTree: Introduce a bit of logic (AND and OR)
Introduce operator&& and operator|| taking ExecutableItem
as a second arg.

Both tasks (first and second) execute in sequence.

AND:
- If the 1st task finishes with Error, the 2nd task is skipped
  and the returned item reports Error.
- Otherwise, the 2nd task is executed
  and the returned item reports the 2nd task's result.

OR:
- If the 1st task finishes with Success, the 2nd task is skipped
  and the returned item reports Success.
- Otherwise, the 2nd task is executed
  and the returned item reports the 2nd task's result.

Change-Id: Ib7874a82bd86eeb57fa5d3691b4a9e63a158772f
Reviewed-by: hjk <hjk@qt.io>
2024-07-02 14:50:27 +00:00
Jarek Kobus
0f5882f13c TaskTree: Introduce a bit of logic (NOT)
Introduce ExecutableItem operator!(const ExecutableItem &item).

This operator returns a copy of this executable item
with DoneResult tweaked by negation.

If this item reports DoneResult::Success, the returned item reports
DoneResult::Error.
If this item reports DoneResult::Error, the returned item reports
DoneResult::Success.

Change-Id: Ie609938e92bbc38ddcc66f5bc3244f864e3e59c7
Reviewed-by: hjk <hjk@qt.io>
2024-07-02 14:50:18 +00:00
Eike Ziller
0283b81392 Merge remote-tracking branch 'origin/14.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs

Change-Id: If39fe80197537c489361810e91ee221c6c52ea01
2024-07-01 12:01:27 +02:00
hjk
68adb2c086 Debugger: Enable another dumper test for LLDB
Passes nowadays.

Change-Id: I616f989c23b16a1a89d24461480dd676ce62bccd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-28 07:12:16 +00:00
Eike Ziller
8dccc9c59e Merge remote-tracking branch 'origin/14.0'
Conflicts:
	src/plugins/qmljseditor/qmljseditorsettings.cpp

Change-Id: I443424afdfe48cdfc3d083d8e91335e937fcfdb6
2024-06-27 11:41:54 +02:00
hjk
c1b8320ca2 Debugger: Execute all inheritance tests also for LLDB
LLDB 3.8/360.x was not working with multiple inheritance even on
the command line, but looks ok nowadays at least in this simple case.

This does not fix the linked task.

Task-number: QTCREATORBUG-31042
Change-Id: Ibc52c9aaf31513af05487657a229fc4945d7e08f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-26 06:55:27 +00:00
Eike Ziller
afde8fd1a7 Merge remote-tracking branch 'origin/14.0'
Change-Id: I5e5ffe1b986fd8b4e5d60c9a5864541747ef890c
2024-06-19 11:30:02 +02:00
Jarek Kobus
33eb5f509c TaskTree: Make it possible to pass DoneResult as a done handler
This patch addresses the 38th point in the bugreport below.

Add tests for it.

Adapt docs and warning messages accordingly.

Task-number: QTCREATORBUG-28741
Change-Id: I276d2d4c3a514147f67252dc5073d79fed94b9ff
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-19 08:32:27 +00:00
Jarek Kobus
34044757ef TaskTree: Fix tweaking done result in group done handler
If the onGroupDone() handler returned DoneResult,
this result was ignored by the running task tree.

Fix it so that the optional DoneResult takes
priority over group's workflow policy.

Add tests for it.

Change-Id: I7ffdef2af08337d7214f2c3d4b68153cddaad425
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-19 07:41:38 +00:00
Eike Ziller
8bbc72a017 Merge remote-tracking branch 'origin/14.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs

Change-Id: I325f21db9bac247a02cb14452f190b378147f581
2024-06-17 13:54:25 +02:00
hjk
625fd895ce Fix more metatype related deprecation warnings
QT_DEPRECATED_VERSION_6_0
static int type(const QT_PREPEND_NAMESPACE(QByteArray) &typeName)

Change-Id: I6a085c6d370b6d65193dc09d4318765de81a8ce3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-14 11:00:32 +00:00
Eike Ziller
a2a5cab07c Merge remote-tracking branch 'origin/14.0'
Change-Id: I240ecca23ec82e54699fcf11ba1d801d0a8c09f0
2024-06-14 11:27:59 +02:00
Christian Kandeler
ccae4fc93c CppEditor: Consider #pragma once when inserting includes
Fixes: QTCREATORBUG-30808
Change-Id: Ib9f2ed1e428abfaa608b9dc42bc09dd2d403ee56
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-13 13:03:08 +00:00
Marcus Tillmanns
20a6a5cd78 Extensionsystem: Allow pluginspecs to customize how they want to check dependencies
Change-Id: I84f3a56160588e4842301f4577f7bfdad96463ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-13 12:52:08 +00:00
Jarek Kobus
e331329e4f TaskTree: Detect a misconfigured recipe of a nested task tree
Change-Id: I6652336023ac111cde5334e655f5dd972977b07f
Reviewed-by: hjk <hjk@qt.io>
2024-06-13 09:17:24 +00:00
Eike Ziller
caa5c3947f iOS: Fix slow debugging with recent Xcode and iOS < 17
When starting the debugger, we need to pass it the location of the
downloaded device symbols, or otherwise debugger startup is very slow.

Xcode changes the location where it saves this information once in a
while, and it must have again. The location with Xcode 15.2 at least is
in the style "iPhone8,1 15.7.3 (19H307)", i.e. it starts with the
"product type" now.

Retrieve the product type of the device and add another candidate
directory for device symbols.

Fixes: QTCREATORBUG-31044
Change-Id: I1a65305fc84c1af8cd48c4ebb249167e1dbe6ae1
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-13 06:09:47 +00:00
Christian Stenger
9a4cae42c0 Tests: Make environment test less verbose
Only print out additional information if the environment
does not match the expected one.

Change-Id: I9be1a90400a180a4cbd0381f54eea79409c007c7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-05 11:46:04 +00:00
Christian Stenger
5b93e34c00 Utils: Allow comments in environment items
This patch allows commenting environment changes or adding
comments to the batch edit widget.
To mark a line as comment prefix it with '##'.

Modifying the environment by using the batch edit mode
allows using '#' to disable variables.
Mis-using this to disable statements of the environment
items widget is tempting and other tools explicitly allow
it this way. But when doing so, the environment may get
some unforeseen modifications.
So, explicitly provide a mechanism for comments and be
more clear about this inside the documentation.

Change-Id: I6a58d0d00e996a3f886ec30e826cade324321818
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-05 10:48:24 +00:00
Eike Ziller
3d828123be Merge remote-tracking branch 'origin/13.0' into 14.0
Conflicts:
	tests/auto/debugger/tst_dumpers.cpp

Change-Id: I71bfee426a3e25ab7c7cd276ffe1e7d8fe550ffe
2024-06-03 12:23:06 +02:00
David Schulz
a1727a9d6d Debugger: fix compiling dumper tests
Change-Id: Ic06483bfeee376e9cc3e7beb516b9bde9cb5b46d
Reviewed-by: hjk <hjk@qt.io>
2024-05-31 12:16:15 +00:00
David Schulz
1c2fbaa846 Debugger: track variable fetch time in dumper tests for cdb
Change-Id: I85073edc2e3660e2bfaff32f53e4a2f98f03c514
Reviewed-by: hjk <hjk@qt.io>
2024-05-31 09:22:59 +00:00
Tim Jenssen
4515fba526 Merge remote-tracking branch 'origin/qds/dev'
Conflicts: src/plugins/qmldesigner/CMakeLists.txt

Change-Id: I250c8e5284ddb0f335c440999b8920762419c89b
2024-05-28 19:06:18 +02:00
hjk
f30d369b99 Fix QMetaType::type() related deprecation warnings
Not in sdktool, which still builds with Qt 5.15

Change-Id: I6e6f4331127b821e471e2840e7959cd65e6419e9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-23 13:04:22 +00:00
Jarek Kobus
53de9701f4 CommandLine: Use more 1-arg c'tor
Change-Id: If52c4094f94859d51e31862d913b1756e333e512
Reviewed-by: hjk <hjk@qt.io>
2024-05-16 12:45:42 +00:00
Jarek Kobus
34f4ec11bd CommandLine: Add a constructor test
Change-Id: I5d5bf8e7f31017f16663103f560e598e2a003d50
Reviewed-by: hjk <hjk@qt.io>
2024-05-16 12:43:11 +00:00
hjk
6aab6f61b5 Debugger: Provider Qt version externally to bridges
Extracting within the bridges is expensive.

Change-Id: Icf69db4b112230cc23e331abc0b3eb0de1323f46
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-16 10:03:08 +00:00
Jarek Kobus
7af6722c07 Android: Simplify listVirtualDevices()
Introduce ParsedAvdList struct and return it from the parseAvdList().
This eliminates passing the errorPaths result by reference.
Simplify listVirtualDevices() implementation by removing some local
variables.
Adapt the tst_AvdManagerOutputParser test accordingly.

Change-Id: If4670bcc81ce36416c1fe35e8ee57e822f82516f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-16 09:33:41 +00:00
Ali Kianian
924019e8c2 QmlDesigner: Use GeneratedComponentsUtils in Model Editor
Change-Id: I567c746eb098c0c64d590ea7fed71f17de5adc76
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-05-13 13:49:22 +00:00
Alessandro Portale
6663f7c9bd ExtensionSystem: Introduce alias PluginSpecs
Change-Id: Ic7b87246cf91328c4291bbce5760a45dfa0b14e5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-13 13:46:53 +00:00
Marcus Tillmanns
657ce51467 ExtensionSystem: FilePath'ify
Change IPlugin::fileName() and IPlugin::location to use
FilePath instead of QString.

Change-Id: If473ab1e258951735f93221cbd62c505f0727eb2
Reviewed-by: hjk <hjk@qt.io>
2024-05-08 10:29:59 +00:00
Michael Weghorn
23b7ac84a9 Debugger: Use integer from native GDB value for typedef
Extend the solution from

    commit d86cf5e235
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Sep 24 12:02:06 2020 +0200

        Debugger: Retrieve and remember int from native GDB value

to also retrieve the int representation for numeric values
from the corresponding native gdb.Value if a typedef to
an integer or bool type is used, not only when an integer
type is used directly.

This makes expressions for bifield members in the
debugger's expression view show the correct value
when the type of those bitfield members is a typedef
to an integer type.

Extend the "Bitfields" dumper test accordingly.

One real world example where incorrect values were
previously shown is GtkWidgetPrivate from the
GTK library [1].

[1] ebc84a6185/gtk/gtkwidgetprivate.h (L39-76)

Change-Id: Ib39e00ebbfc8d7d9ab10dc89af61f37ec41fb4ee
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-05-08 06:29:35 +00:00
hjk
67072d3f5b Debugger: Re-work bridges
The type cache has been split into smaller caches for individual
aspects. Type ids are now integral, not strings.

In addition, there is new supporting code for logging, timing and
profiling

Change-Id: I6db72a149650d42aecf8b899869c542b1303d43b
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-05-07 10:15:34 +00:00
Marcus Tillmanns
ef8455f270 ExtensionSystem: Rename PluginSpecImpl to CppPluginSpec
Since we now have multiple classes inheriting from PluginSpec it makes sense
to rename PluginSpecImpl to the more accurate CppPluginSpec as it deals with
compiled plugins only.

Amends b39b192518

Change-Id: Icae9daed2be5a258a9918731a881c72cbe4f0fa4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-04-19 11:26:03 +00:00
Marcus Tillmanns
7cf2e4352c ExtensionSystem: Fix compile without WITH_TESTS
PluginSpecImpl::read is used outside of tests, but PluginSpecImpl itself
is only exported when WITH_TESTS is on. So compilation without
WITH_TESTS would fail. To circumvent this the ::read functions are moved
outside of the PluginSpecImpl and friend'd to it.

Amends b39b192518

Change-Id: I4bd8ce087267ab4e059cff2470ff882c7db6fd78
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-04-19 10:39:17 +00:00
Jarek Kobus
56c388000a Async: Re-enable onResultReady tests
Enable them conditionally, since the fix went into Qt 6.6.

Task-number: QTBUG-119169
Change-Id: I6b9f1a9da6a5b6337384f37d940195f09bd28bd4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-04-12 09:15:55 +00:00
Jarek Kobus
698488fc05 TaskTree: Add a test showing the parallel disorder
In parallel mode the done handlers may be invoked in a
different order than the corresponding setup handlers.

Change-Id: Ib3df668491054501d250fef9c499d127fe98626d
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-04-11 12:19:02 +00:00
Jarek Kobus
a583436365 TaskTree: Zero-initialize the Storage
Change-Id: I9d5ee11285b377abafe21d472481c941f49a5ae1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-04-11 07:59:56 +00:00
Tim Jenssen
8a18423175 Merge remote-tracking branch 'origin/13.0' into qds/dev
Change-Id: I28e2e8cacf9a20c8b2f5073f4a492862d814fb99
2024-03-26 15:59:34 +01:00
David Schulz
d4e775ebc6 TextEditor: handle syntax highlight in batches
Use an elapsed timer in the syntax highlighter to periodically return
from the highlight and push a continue highlight to the end of the event
loop.
This allows the user to interact with the editor in between those
batches. If the user modifies the document in between highlighting
batches, the area that still needs a rehighlight is increased if needed.

This also reverts 62ea85ee6a and the
related changes.

Task-number: QTCREATORBUG-28727
Change-Id: I7c394dbdff658330bb72f3b68b9928980947db75
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-03-25 08:57:37 +00:00
Eike Ziller
8500dd03bf Merge remote-tracking branch 'origin/13.0'
Conflicts:
	doc/qtcreator/src/overview/creator-only/creator-keyboard-shortcuts.qdoc

Change-Id: I2db85da9f4a0593217951313020d71d430986961
2024-03-22 15:13:34 +01:00
Christian Stenger
c0a02ecd4e Tests: Adapt expectation for lldb
Amends 74a17e4521.

Change-Id: Ib144c15af7e8d83f110752e9898fef0d7466a812
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-03-22 05:37:26 +00:00
Eike Ziller
90e1d96019 Merge remote-tracking branch 'origin/13.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	doc/qtcreator/src/overview/creator-only/creator-keyboard-shortcuts.qdoc
	qbs/modules/qtc/qtc.qbs
	src/plugins/remotelinux/linuxdevicetester.cpp

Change-Id: I8434e41dcfbb50f6ed032a3e0af1591eb19b79eb
2024-03-20 15:05:58 +01:00
Christian Stenger
74a17e4521 Tests: Fix expected values
Amends 87ca7882c1.

Change-Id: I922b1afd3b62584717a913a3fcc5c1c2d2223cc8
Reviewed-by: hjk <hjk@qt.io>
2024-03-20 10:06:33 +00:00
hjk
87ca7882c1 Debugger: Fix QPair dumping
Task-number: QTCREATORBUG-30538
Change-Id: Iee17aec458d9ab69cd4349bedb26b1a2270ca41c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-03-19 16:00:23 +00:00
Christian Kandeler
812326eadc CppEditor: Support try/catch in built-in indenter
Fixes: QTCREATORBUG-29452
Change-Id: Icf3d86a6080aeb741436800ae77af7c8bec3155c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-03-15 14:18:30 +00:00
Tim Jenssen
9ce7aaccc5 Merge remote-tracking branch 'origin/qds/dev' into HEAD
Change-Id: I9d13aa050b1c7fb0954e2b63d13da2922d8f7218
2024-03-14 16:13:25 +01:00
hjk
b7b78df8be Require C++20
Prevent introducing C++20 problems for the master merge.

Change-Id: Id6581a4c32ec6411195edb51339f017e4ddb51ff
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
(cherry picked from commit e678da9934)
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-03-11 12:09:37 +00:00
Eike Ziller
3dbdad20dc Utils: Fix build with MSVC with C++20
Rename process.h back to qtcprocess.h

MSVC's "threads" standard header includes <process.h>, and that ends up
including our process.h from Utils.

There already was a hacky workaround in place for a similar issue with
MINGW, but that doesn't work with MSVC because that doesn't have

Simply use a name that doesn't conflict.

Change-Id: I1159cd2096b4f2dbc4a1728d0131dd6edd30ebd3
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>
(cherry picked from commit 5af531cd39)
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-03-11 12:08:33 +00:00
Marco Bubke
8b7762621b QmlDesigner: Change model creation to new code model
The model needs the project store, the path cache, the imports and the
file path. So we now use a method in the model to copy them over to the
new model.

Task-number: QDS-12102
Change-Id: I80f911d55c5a5fdf9d1a87c1f4888e498086374b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-03-11 11:23:33 +00:00
Marco Bubke
6ebb7923b2 QmlDesigner: Deprecate optionally old node meta info API
If the project storage is activated the old API will be deprecated.
Hepefully people now stop to use the old API. You can still use it but
you have to write an implementation for the new one too.

Task-number: QDS-12102
Change-Id: Iac23da1648ff44e27a2ee7840e0d3eeb1fb8caf9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-03-11 11:23:27 +00:00