Commit Graph

68765 Commits

Author SHA1 Message Date
Eike Ziller
c83047abb9 CtfVisualizer: Allow strings for process and thread id
While the format document only uses numbers for these in its examples,
the data type is not really specified there and chrome://tracing itself
handles strings for them without complaint. On trace-generating side
std::thread::id can't easily be serialized as a number, and strings can
easily be supported in the viewer.

Change-Id: I36c8497049d4933058b9f72a28f24e1d1cf0d5bb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-12 14:21:27 +00:00
Marcus Tillmanns
67aab38873 Utils: Add undo/redo to BoolAspect
Change-Id: Ie80e81c2ceef232278e2815ffa56bcbaef903eb2
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 13:30:40 +00:00
Miikka Heikkinen
336912cf2f QmlDesigner: Fix crash when taking 2D view screenshot
If 2D view was hidden, taking screenshot crashed.

Fixes: QDS-10657
Change-Id: I96fe7a37793a902d517ad891fd7fe1914e681c30
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-12 13:28:41 +00:00
Christian Stenger
797e6d55a6 Minor fixes to compile for building with Qt6.2
Change-Id: I15ab9b92d19491bb0aca3d2389a589411e1fec8d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 13:09:01 +00:00
hjk
ba20b249c9 Utils: Some microoptimization in the persistentsettings writing
In some cases the exact type of a tag is not needed.

Change-Id: I0e46d12c5dde34734e7e711dd940b9aa570d23f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-12 13:00:59 +00:00
Artem Sokolovskii
19672406b4 DAP: Add terminal output for installing debugpy
Change-Id: I2136b966b37f2a652053d6c30b16f05defaed756
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-12 12:59:05 +00:00
Jarek Kobus
c5555035f1 ProcessHelper: Fix setChildProcessModifier()
The original change that introduced the usage of
QProcess::UnixProcessFlag introduced also a regression.
Since ProcessHelper::setLowPriority() and setUnixTerminalDisabled()
are part of public API, we can't use m_lowPriority and
m_unixTerminalDisabled inside c'tor for early return before setting the
setChildProcessModifier(), because these values may be changed later,
before starting the process.

Amends e8ca1877de

Fixes: QTCREATORBUG-29457
Change-Id: Ief360c123f6284c7df105ef530c4602555b5b069
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-12 12:32:17 +00:00
Cristian Adam
74640c6d5b CMakePM: Fix crash
Amends 6528bd3eed

Fixes: QTCREATORBUG-29587
Change-Id: I62e469a461dd730858e05d0309151dba4e9fe93c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-12 11:56:28 +00:00
hjk
6916358497 ProjectExplorer: Add missing 'override'
Amends 50c9c9aa86.

Change-Id: I48dc3767f8ec750b463b8dfe5d9735eaaa481c8e
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
2023-09-12 11:39:03 +00:00
Artem Sokolovskii
7605f5c934 DAP: Add different log category for different dap engines
Change-Id: Ia21926b860f8fee7399c40ad382ff31f360f73ce
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 10:52:32 +00:00
Artem Sokolovskii
578e4c13fd DAP: Add attach function to gdb dap engine
Change-Id: Id1c886cf3bbdbf85d4eed39f288107fc71317496
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 10:52:21 +00:00
Cristian Adam
3a3bf41eef CMakePM: Add support for cmake-format config files
Fixes: QTCREATORBUG-28969
Change-Id: I0bb31993e4d2ffd8affcc67dee5fd70654e2c1d3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-12 10:49:22 +00:00
Henning Gruendl
ed6f870a81 QmlDesigner: Add operators to expression builder
* Show operator fills when cursor is placed at position where operator
  is required
* Convert operators from real syntax to text version

Task-number: QDS-10630
Task-number: QDS-10638
Change-Id: Iffceb24024b7cde9a93c2acd0033fedd54e2ee32
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-12 10:45:39 +00:00
Christian Kandeler
2906c7bedf Debugger: Enable sorting in the settings page
As for the other tabs in the Kits category.

Change-Id: Ibaed64336ed2ef57c463fe43ed5ca3e78aa673b2
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 09:49:36 +00:00
Marcus Tillmanns
77cc79b7b0 CMake: Cache CMakeTool capabilities
Change-Id: Ie81347a7864abeeb64aa2af6dee3f9def241fed8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-09-12 09:29:50 +00:00
Marcus Tillmanns
0c157b4ba6 Docker: Use FileListAspect for mounts
Change-Id: I6392c8bb8ebdfb0984f56ebda23567ef8b42bb6a
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 08:51:39 +00:00
Marcus Tillmanns
f6205d6cc7 Docker: Switch to aspect settings
Change-Id: Id04c48caf2ddd33e176ee424273690b80c77232b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 08:51:31 +00:00
Marcus Tillmanns
ed0935733e Utils: Add FilePathListAspect
Change-Id: Iec89581e5818139bcc48ed807935c10421b7b664
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 08:51:20 +00:00
Tim Jenßen
59ecf10f06 qml2puppet: fix QT_VERSION_MAJOR is empty in single builds
Task-number: QDS-10640
Change-Id: I02d384337218070b2f934de0bd85bc93e7cb85ca
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-12 08:04:43 +00:00
David Schulz
7bb8f59587 Merge remote-tracking branch 'origin/11.0' into HEAD
Change-Id: I3b6a4bd860c11324d989818d9010f07faaac677a
2023-09-12 09:47:01 +02:00
Eike Ziller
dab19c4a8c Use Nanotrace to generate startup performance report
Add various trace points to the code, including the plugin
initialization methods (centrally in plugin manager), code that is
scheduled on the event loop with QTimer::singleShot or
QMetaObject::invokeMethod during initialization, and code that is
triggered from ICore::coreOpened

Can be turned on by configuring with `BUILD_LIBRARY_NANOTRACE=ON`
Run with `-trace <file>` to write trace file. If Nanotrace is not built,
the added code expands to nothing.

Changes in Nanotrace:
- turned generated data to microseconds instead of nanoseconds, because
  that is what Chrome tracing expects
- fixed serialization of duration (needs to be an item of the event, not
  in a "arg" subitem)
- fixed shutdown() to reset the initEvent

Change-Id: I994de82023b820d771e1be0a859ebd8da0b73d4d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-12 07:32:07 +00:00
Marcus Tillmanns
66c8eda943 Utils: Add Undo facilities for aspects
Change-Id: I2a8acfa23b3a4303414be21af224b08c13561666
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 07:12:45 +00:00
Marcus Tillmanns
8bcec807d9 Utils: Fix AspectContainer::setAutoApply
Removes duplicate m_autoApply from AspectContainerPrivate.
Fixes issue when calling BaseAspect::setAutoApply()
on an AspectContainer.

Change-Id: I5f56d8d3c6d52d32c9365faf3d0e22facb757f03
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 07:11:26 +00:00
hjk
2494ba4bf8 TextEditor: Access some settings more directly
Change-Id: Idc65001efde36de011db3ca528af761d2b8344e8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-12 06:54:16 +00:00
hjk
d6dba7dc9f Utils: Merge settingsutils.h into Store setup
Change-Id: I4f87400d3ff50869798a363f0d15aa77af0edf5c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-12 06:53:46 +00:00
Christian Stenger
7268f036de Valgrind: Add missing error type
Fixes: QTCREATORBUG-29600
Change-Id: Ia6b6549865f9940f2e93fbe998788d201a3550fa
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 06:36:23 +00:00
Aleksei German
97a312aad3 QmlDesigner: Fix crash on NodeProperty Reparenting
Task-number: QDS-10645
Change-Id: I67a0fd5618ad020bd83d2e62e9e1f278bd1696f1
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-11 19:01:40 +00:00
Alessandro Portale
38690bc7d0 ScreenRecorder: Make dialog less cluttered and non-resizable
The "Trim and Crop..." button now jas a static text and shows crop and
trim details via tooltip.

The confusing resizability of the dialog is prevented.

Change-Id: If967d8014a0751f7d2360bf7b239bf22f070024c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-11 16:59:25 +00:00
Alessandro Portale
0701145c55 ScreenRecorder: Block dialog UI and show spinner while exporting
...instead of just disabling the "Export..." button.

Change-Id: I3d2b414233492b400e02a39c89677dedce475100
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-11 16:59:07 +00:00
Eike Ziller
6de236351b EditorManager: Do not instantiate MimeTypes during startup
Which would trigger reading the MIME database, which is not needed at
that point in time. We persist the map of MIME type to custom default
factories via the MIME type names anyway, so just stay with that.

Change-Id: I7570432573b16700e00811fe409d43a2db6c5347
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-11 14:26:46 +00:00
Thomas Hartmann
a94ab799f9 QmlDesigner: Add line endings to source
The line-endings have to be correct, because
the rewriter only fixes the indentation.

Change-Id: If08f3b1bff8f35d63ee51521e6b07c7017fa3cf0
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-11 13:53:05 +00:00
Thomas Hartmann
74222a76f4 QmlDesigner: Add QML_COMPAT_RESOLVE_URLS_ON_ASSIGNMENT in qml2puppet
Task-number: QDS-10255
Change-Id: I6d9698a77c1dfae9345d70a1edb40210d17c4ba7
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-11 13:13:16 +00:00
Marco Bubke
6c17805ddc Utils: Improve union layout
It is undefined behavior to access a uninitialized part of a union but
in this case it is not because both member have the same start member.
ControlBlock is in both at the address with the same layout and so it is
allowed by the C++ standard.

Change-Id: I3a165f67030d6726d2cb0cfbcbfb2622bcf7dcc4
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-09-11 12:40:03 +00:00
Thomas Hartmann
6744c8e081 QmlDesigner: Move update to extra function
Change-Id: I66cfef4ecbc1276b816fcd8397a67e8a99039813
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-09-11 12:28:48 +00:00
Thomas Hartmann
6ec68ca98a QmlDesigner: Properly handle empty source
Change-Id: I46550e4210b966db26e719f6eec10d0eb3243d91
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-09-11 12:28:37 +00:00
Thomas Hartmann
803bb23bdb QmlDesigner: Add missing emit
Change-Id: I81bb36f586dd596c03bfe0fe8fefa543d6333397
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-11 12:14:21 +00:00
Thomas Hartmann
dc05298696 QmlDesigner: Fix superfluous '.' in condition editor
Change-Id: Iaad4ead4bd170adc9b00c215ba93e01cfb7bf03b
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-09-11 12:14:02 +00:00
Christian Kandeler
61b6ab8468 ProjectExplorer: Fix KitModel
We must not call layoutChanged() without having called
layoutAboutToBeChanged().

Change-Id: Ic64dc2a9b46fa1ec64f01fb416e78d3821df0e73
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-11 12:04:53 +00:00
Marcus Tillmanns
116ad3ed4f ProjectExplorer: Remove IDevice::setDisplayName
also removes IDevice::setDefaultDisplayName

Change-Id: Ie8ac3d95ba1991a20720342de3bf6e97c6414ffa
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-11 11:25:34 +00:00
Thomas Hartmann
17da102695 QmlDesigner: Fix crash on exit
Change-Id: If02837c0af08b037a10e0f91172eafb757e0c81f
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-09-11 11:05:48 +00:00
Thomas Hartmann
a1f773bb66 QmlDesigner: Only show valid kits with valid Qt version
Task-number: QDS-10137
Change-Id: I582d714b2f4b670ca42b2d6e734489efe0efbf75
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-11 11:05:19 +00:00
Henning Gruendl
171e11b4c7 QmlDesigner: Fix Expression Editor
* Fix cursor placement after submit
* Remove pill indicator for wrong ordering
* Fix PropertyTreeModel root child count and parent name

Change-Id: I169396cf3cc62890fafe0bfe75d736be3ca8d47f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-11 10:45:47 +00:00
Miikka Heikkinen
06878ee9cb QmlDesigner: Fix grid color not loading properly on model attach
Fixes: QDS-10594
Change-Id: I61fbce411776b14078078d6137c8963e22c0fc11
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-11 10:35:44 +00:00
David Schulz
96c21b0e36 CppEditor: optimize CppModelManager projectPartForFile
Calling FilePath::canonicalPath is expensive on Windows, so only call it
if we cannot find the filePath in the cache and save the result to the
cache again. This reduces the time to parse the auto test for the Qt
Creator repository from 10s to 2s here. It also improves the performance
of various quickfixes and follow symbol of the built-in code model by a
similar factor.

Change-Id: I7025828e1b91f492825b10753e3b97e1c917fbfd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-11 10:19:12 +00:00
Marcus Tillmanns
7f15f720ac ProjectExplorer: Directly use DeviceSettings
Change-Id: I2c7d0395bbc59238a23c30b1f233e7bf922e0be4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-11 10:12:28 +00:00
Knud Dollereder
2dda34f781 Extend bindingmodel and minor fixes
- Include singletons in the list of sources (former sourceModelNodes)
- Do not suggest sources on bindings that are initialized without a
  source node. Prevent constructs like
  "property string p: button.qsTr("STREXPR3")".
- Allow changing the name of the target property and update the
  delegate properly when doing so.
- Remove superfluous emitCurrentIndex emission from the
  dynamicpropertiesmodel.
- Add missing qml imports.

Note that it is still possible to create illegal constructs if the user
wants to.

Change-Id: I084978f2f8d451df076d1b556db15764e17e31fb
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-11 09:15:31 +00:00
Marco Bubke
1d884898be QmlDesigner: Fix build
Yes, it is possible to set a unsigend integer to -1. It is defined that
a unsigned integer is underflowing and then you get the largest integer.
With https://en.wikipedia.org/wiki/Two%27s_complement it exactly the
same bit pattern as a -1 signed integer too.

But many compiler like the mix of signed and unsigned because it can
lead to bugs. So just use the unsigned interId() data type and set the
special value to the maximal integer.

Change-Id: Ie2ee1b5e2b476ec12abb5a48eee3eae2ae8cd14b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-11 09:04:22 +00:00
hjk
50c9c9aa86 ProjectExplorer: Start merging "unix" toolchains
They are similar with quite a bit of overlap, with the odd "base"
GccToolChain and discovery scanning mostly by scanning the same
directories for each "sub type".

This here aims at one class (currently still the mis-named GccToolChain,
later to be re-named to UnixCToolChain or similar)

Change-Id: Ia721932d4125d3673250ae727731acc7acd48def
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-11 08:36:54 +00:00
Marcus Tillmanns
00b5856754 Terminal: Fix sendKey
Fixes: QTCREATORBUG-29593
Change-Id: I4db2dc88ce56ec3b5b0ad1acd02ed5c48da51a06
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-09-11 07:32:38 +00:00
Marcus Tillmanns
9b85b1087f ProjectExplorer: Add Aspect Settings to devices
Change-Id: I4a69945dbb862a2741998a3bbbb0512e5fb829c9
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-11 07:29:10 +00:00