Commit Graph

3427 Commits

Author SHA1 Message Date
The Qt Project
7c7c6123d6 Merge "Merge remote-tracking branch 'origin/qds/dev'" 2024-08-07 12:55:01 +00:00
Christian Kandeler
9926de01c1 CPlusPlus: Add parser support for declarations of user-defined literals
... without a space before the identifier.

Change-Id: I977ffae82eb86f5ae6ea594cba17cc486e63bf6c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-08-07 10:55:43 +00:00
Tim Jenssen
b4061e223e Merge remote-tracking branch 'origin/qds/dev'
Change-Id: I907e067abba640d27313ce03bc41326d3ed750f0
2024-08-06 19:04:41 +02:00
hjk
f49523029a Remove #include <utils/fileutils.h> from most header files
It has some platform specific warts, filepath.h is somewhat
cheaper and less ugly overall.

Partially clean up surroundings

Change-Id: Ida1fd470ec020f69c446109427f92a08e879789f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-07-26 10:41:16 +00:00
Jarek Kobus
c343e9b8f7 TaskTree: Fix For loop with empty body
Ensure the For loop iterates even when the loop's body is empty.
Simplify internals a bit.

Change-Id: I4a269d61fa324a9c36109e95e74a992e915a72b0
Reviewed-by: hjk <hjk@qt.io>
2024-07-17 14:48:03 +00:00
hjk
94a562fd8c Aggregation: Add a convenience function to create simple aggregates
Change-Id: I03300f1fcc20314d392012fd288ef0fc2501d403
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-15 14:29:18 +00:00
Tim Jenßen
93588dbee2 Merge remote-tracking branch 'origin/14.0' into qds/dev
Conflicts:
	doc/qtdesignstudio/src/how-to/qtdesignstudio-live-preview-desktop.qdoc
	qt_attributions.json
	src/libs/sqlite/CMakeLists.txt
	src/plugins/qmldesigner/CMakeLists.txt
	src/plugins/qmldesignerbase/QmlDesignerBase.json.in
	src/plugins/qmlprojectmanager/CMakeLists.txt
	src/tools/qml2puppet/qml2puppet/instances/qt5import3dnodeinstanceserver.cpp
	src/tools/qml2puppet/qml2puppet/instances/qt5import3dnodeinstanceserver.h

Change-Id: If33e41d8951a49acaba0a74c3e5848eef52bb945
2024-07-10 18:11:28 +02:00
Jarek Kobus
779390829c TaskTree: Introduce For element
Improve code readability by requiring iteratable Group
to be named For.

The For's c'tor requires an iterator element as a first arg.

The For's c'tor allows for passing exactly one iterator element.

It's not possible to place iterators inside Group element anymore.

Change-Id: I9dfe2c0da058abac161f66c4e336da2417c383f1
Reviewed-by: hjk <hjk@qt.io>
2024-07-10 13:39:40 +00:00
Marco Bubke
ae50f706bf QmlDesigner: Move unrelated files out of model
Move them to their own sub directories.

Change-Id: I643cf18a862cdbea868e25070e3015ed7e739d46
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-07-09 19:49:16 +00:00
Jarek Kobus
ff1125319a TaskTree: Introduce successItem and errorItem
They are useful in conditional statements to influence
the workflow of a group.

Add tests for nullItem, successItem and errorItem.

Fix some comments in tests.

Change-Id: If0faa579e256d5a943d22cf66fe5208d60a63e0d
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 14:02:48 +00:00
Jarek Kobus
e5ccfeaae0 TaskTree: Add more tests for conditional API
Change-Id: I9e381d48d1ccfc86cb041e61100da6c0533c15e3
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 14:02:41 +00:00
Jarek Kobus
ef71c022de TaskTree: Introduce conditional API
Change-Id: I002ea7636d12719cb1e27a4666e3869ea2254114
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 14:02:34 +00:00
Jarek Kobus
0b19c83bed TaskTree: Make it possible to return bool from done handlers
Alternatively to returning DoneResult, for convenience.

Change-Id: Id845190a2a0587048ddb3a6c33019feca8cd0de7
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 14:00:08 +00:00
Jarek Kobus
da218493c7 TaskTree: Introduce a bit more logic (AND and OR against DoneResult)
Introduce AND and OR operators for ExecutableItem
taking DoneResult.

The "task || DoneResult::Success" is an eqivalent to
tweaking the task's done result into success unconditionally.
The "task && DoneResult::Error" is an eqivalent to
tweaking the task's done result into error unconditionally.

Change-Id: Ib9213a786697c1434c37e99e726641baab550523
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 06:53:46 +00:00
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