Commit Graph

72811 Commits

Author SHA1 Message Date
Orgad Shaneh
6471572135 Utils: Create a reusable AnsiEscapeCodeHandler::setTextInEditor
Change-Id: Ic8ebe57287b08870e36e0a5cadbf3d322d14b2fe
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-08-06 06:51:30 +00:00
Orgad Shaneh
35df237df2 Git: Minor cleanup
Change-Id: I577be16b310566700f5d70d0f372e90094ff835e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2024-08-06 06:10:48 +00:00
Marcus Tillmanns
9dab376f40 Core: Fix handling remote path watches
Change-Id: I1b2609729cfcc27ba30c3bfb9ab6842ca0450b5d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-08-06 03:39:00 +00:00
Marco Bubke
fbca17f7bc QmlDesigner: Remove unneeded reset
Close is already deleting the instance.

Fixes: QDS-13268
Change-Id: I95998d6c11f6824386d109ae1f622d022a59ce7f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-08-05 16:18:06 +00:00
Christian Kandeler
020883c47f ProjectExplorer: Stop pretending that C and C++ compilers are unrelated
Motivation:
  a) It was ridiculous that when users wanted to manually
     add a new toolchain, they had to do the entire setup twice.
  b) It was equally weird that users had to take care to choose
     matching toolchains when setting up a kit, or indeed that it was
     even possible to mix random toolchains in the first place.

User-visible changes:
  - The "C" and "C++" categories in the toolchain settings page have
    been merged into a single "C/C++" category.
  - When adding a new toolchain, the "C" and "C++" sub-menus are gone.
    Instead, the toolchain config widget offers two path choosers if
    the respective toolchain type supports C and C++ compilers.
  - By default, the C++ compiler file path is derived from the C
    compiler file path automatically, so the user usually has
    to enter only the former.
  - In the kit settings page, the "C" and "C++" toolchain combo boxes
    have been replaced by a single "C/C++" combo box, relieving the user
    of the responsibility to choose two matching toolchains.

Implementation:
The notion that a Toolchain object corresponds to a single compiler is so
deeply engrained in the code that it cannot realistically be changed in
the short term. We therefore introduce the concept of a "toolchain
bundle" as an additional layer that groups matching C and C++ toolchains
together. This way, most code dealing with toolchains stays unchanged,
and only the presentation layer (i.e. the toolchain and kit settings
pages) needed to be rewritten. Once set up in a bundle, toolchains stay
implicitly linked together so the matching only needs to be done once.

In follow-up patches, we will make use of toolchain bundles in all the
places where kits are auto-created, eliminating the risk of mixing
incompatible toolchains in a kit.

Change-Id: Ie6c5add9963e7c1096268dd77acd624671b2674f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2024-08-05 15:35:48 +00:00
hjk
08d6b86162 ProjectExplorer: Use FilePathAspect for IDevice::debugServerPath
... and IDevice::qmlRunCommand, currently for storage only.

Leave the GUI side as-is for now, as this synchronizes the widget
content with the local copy of the device data to allow the
device tester to be run with the visible data.

Change-Id: Ie8fb967c9a7f8246eec71d52c9b714ca3b3f5acd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-08-05 15:08:13 +00:00
Andre Hartmann
6b2ff42f0d GitPlugin: Add color to diff description text
Change-Id: I19d8bbaf77d0b6070b8300ca9fc0868579cab4e8
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2024-08-05 14:21:28 +00:00
Jarek Kobus
364beabcf1 DiffEditorController: Add an option to set a syntax highlighter
Change-Id: I66fc252e7ccc168fd32ed7100cc9af7f940dc3e0
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2024-08-05 13:40:24 +00:00
Mahmoud Badri
5d8e795ebf QmlDesigner: Add light/camera icons when exporting a bundle
Fixes: QDS-13310
Change-Id: I6d15f91fa664eb7b861ed2acfba916e35900ae90
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Shrief Gabr <shrief.gabr@qt.io>
2024-08-05 12:57:05 +00:00
Christian Stenger
fca63b75bc CMakePM: Silence soft assert
Amends 04b9c08153.

Change-Id: I7de369307a68ed2f243ccf40ab8ffa435f808aca
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-08-05 12:00:39 +00:00
hjk
6473e636d3 ProjectExplorer: Remove IDevicePrivate::debugDumperPath
Forgotten to remove in de546ff3ec.

Change-Id: I56233545ba5ed8f302091fc2d874f327ab7a4896
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-08-05 11:46:24 +00:00
Christian Stenger
2a4c8af193 Axivion: Add highlight marks to toolbar
Make it more easy to toggle between showing inline
markers or not.
This also makes the reaction more direct. Before this
change markers were kept or not added until the file
got re-opened the next time.

Change-Id: I3ad56444648967db9565176e5b60ac6df8c32ff1
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-08-05 08:45:38 +00:00
Christian Stenger
1b23330ec3 Axivion: Parameterize recipe for re-use
The recipe which fetches the issue properties works
in general equally to the one needed to fetch source
code for a given analysis version.
This patch provides this function but does not make
any use of it yet.

Change-Id: I5bd63eb470e9cb7038aaae5e4c79fa2d570d45db
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-08-05 08:45:23 +00:00
Christian Stenger
dd1125e7af Axivion: Use version for issue details
Change-Id: I911a7a689e6c608795b6e0eda00216705847f345
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-08-05 08:14:35 +00:00
Christian Stenger
db6763ba30 Axivion: Take version into account for line markers
Line markers for issues were fixed to the latest analysis
version.
Explicitly make use of the analysis version the user selected
as end version.

Change-Id: I39e95693d4aa7d370447a2bb2b35fb28543a031d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-08-05 08:14:24 +00:00
Marcus Tillmanns
016eb7a9d2 Core: Remove unused functions
Change-Id: I4c9123818c8818550574a8bbd86376d38c51b9a6
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-08-05 06:47:45 +00:00
hjk
b54a4ed744 RemoteLinux: Use a BoolAspect for the disconnected state
Change-Id: I8e5848167954ffa6ba3bd50e4e929c3885393238
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-08-02 15:05:18 +00:00
hjk
52561971a7 Boot2Qt: Remove unused VmState enum
Change-Id: Ib0cfee745530a8484cd9a5abf5eb85b0387074fd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-08-02 14:37:55 +00:00
hjk
00daa669ad ProjectExplorer: Fix assert
The build key is legitimately empty for CustomExecutableRunConfig.

Amends 07df45cdeb.

Change-Id: Iadc992b772913599e5af0d5ea5104188707fad45
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-08-02 14:29:36 +00:00
hjk
2a7bf0fdaf Project: Base IDevice on AspectContainer
This is effectively the same approach as taken with ProjectConfiguration.

Having the settings separate leads to quite some boilerplate and in the
end to parallel IDevice and DeviceSettings hierarchies.

The unusual registration of the docker aspects are due to the multiple
inheritance, we need to "dynamic" downcast.

Change-Id: I50864e2009f4e525d635decf1c9beaad5e6a5f1f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-08-02 13:30:01 +00:00
Mahmoud Badri
08199c5dfd QmlDesigner: Show an override dialog when adding an exisitng user asset
Fixes: QDS-13212
Change-Id: If25da684797867be041e6a539b1a518a8f0a8343
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-08-02 11:07:55 +00:00
hjk
e78da3dfee LSP: Drop use of QVector
One unneeded #include, and a case where a plain array suffices and
is faster and smaller.

Change-Id: I49269f645b8239019baa817e137da27a767f640b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-08-02 10:57:01 +00:00
hjk
05fb9b82b0 Debugger: Remove an unnecessary #include
... and sprinkle some 'final'.

Change-Id: I11abcd647bff9ac2bab235216f1da5cc1c1b34ab
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-08-02 10:53:43 +00:00
Christian Stenger
9ffc7c57a0 Lua: Fix qbs build
Amends 9eb29fd87e.

Change-Id: I6c0e52fbeee47af2bf51281c9966d194ef1f5606
Reviewed-by: hjk <hjk@qt.io>
2024-08-02 10:48:46 +00:00
Marcus Tillmanns
9eb29fd87e Lua: Cleanup qt types bindings
Change-Id: Iba58eab8ef5c7439e1db0e27461671cf6d8e5b3e
Reviewed-by: hjk <hjk@qt.io>
2024-08-02 10:06:55 +00:00
Christian Kandeler
908da97d2d CppEditor: Fix highlighting non-plain character literals
Only string literals were considered so far. Properly consider character
literals as well.

Fixes: QTCREATORBUG-31342
Change-Id: I880546c1384f48ba9f81a6c6716e50fb7781cc11
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-08-02 09:09:14 +00:00
Lukasz Papierkowski
bad36c744d AI Assistant: Settings UI
Change-Id: Icb98ac9869d01295d9e64737766d37e51ba86a76
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-08-02 08:48:36 +00:00
Christian Stenger
1977d1fa19 Valgrind: Update error kinds
Update the error kind enum to cover all known error
types.

Fixes: QTCREATORBUG-31376
Change-Id: Icae72edfa941c7f1e8cfc1bdd039d01ff44dc28d
Reviewed-by: hjk <hjk@qt.io>
2024-08-02 07:47:12 +00:00
hjk
4f976ee9b6 Boot2Qt: Remove unuser QdbDevice::m_serialNumber
Change-Id: I8b716df9061a1f5aaba1622acd00b9cb4ea3efb7
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
2024-08-02 07:46:14 +00:00
Tim Jenssen
db7d72e7b2 qml2puppet: restore the puppet output feature
Change-Id: I9cbd8cd5256c9471e2a20369064a22f1997a4c02
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-08-01 16:23:30 +00:00
Tim Jenssen
42570752ea qml2puppet: remove annoying debug output
Change-Id: I8fcc073cfd326d78bfe59be3724d36f62484f467
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-08-01 16:23:09 +00:00
hjk
b6eff1b9cf ProjectExplorer: Change IDevice::toMap signature
From  Store toMap()  to  toMap(Store).

More symmetric code on the user side and better in line with
ProjectConfiguration/AspectContainer at the price of a few
more lines in the base.

Change-Id: I6069c96c250c1846e870879bcb52c58fdd806478
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-08-01 14:54:43 +00:00
Marcus Tillmanns
54333873f4 Main: Move option into options
Change-Id: Ibcba302ce959347588c1f1d0d4d9fcff8f99ec25
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-08-01 14:08:30 +00:00
hjk
523b4045cc Debugger: Fix opening new memory views from within a memory view
Change-Id: I2e1c1fac968a38e1c68c8055d9946238facb2c0b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2024-08-01 13:47:06 +00:00
Mehdi Salem
22ab5f8be7 Axivion: fix crash when creating issue table column links
Some column data used for links may be optional and thus requires a null
check before contructing the link to prevent QtCreator from crashing.

Change-Id: I53f78d1335f5688cc4655838453fddaa61f9ffab
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2024-08-01 12:53:25 +00:00
hjk
b73e53d221 BinEditor: Drop the widget() from the EditorInterface
It's accessible via editor(), which we now have also for the
detached memory views.

Change-Id: Ibce6a0e3b753b3beb5c5a8eac67b11b352dcc250
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-08-01 12:50:25 +00:00
hjk
fb7133658a BinEditor: Fix crash on debugger restart
... when views have been closed manually before.

Change-Id: Ib589d525b00b5a349d6ed60bdf0e703baafb9871
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-08-01 12:46:27 +00:00
Christian Kandeler
ab09e2dc3c ProjectExplorer: Sort initial list of toolchain executables
This makes things more deterministic and ensures we consistently prefer
the version-less variant from a set of file paths pointing to the same
compiler executable.
Example on my machine:
  /usr/bin/aarch64-linux-gnu-gcc
  /usr/bin/aarch64-linux-gnu-gcc-14.1.0
  /usr/bin/aarch64-linux-gnu-++ (no versioned variant present!)
Before this patch, QtC preferred /usr/bin/aarch64-linux-gnu-gcc-14.1.0
to /usr/bin/aarch64-linux-gnu-gcc, because it was found first when
iterating the directory, and then discarded /usr/bin/aarch64-linux-gnu-
gcc as a duplicate, which resulted in an ugly asymmetry between the C
and C++ toolchains.

Fixes: QTCREATORBUG-31132
Change-Id: I2da252beda1b565e66906f10fa1e8a9d36ad852c
Reviewed-by: hjk <hjk@qt.io>
2024-08-01 12:03:25 +00:00
Christian Stenger
e47dd1d765 FakeVim: Restrict tabstop size
The default minimum of QSpinBox is 0 which is not allowed
for vim's tabstop in general.
It has to be some positive integer.
Beside disallowing the unsupported value it also fixes
some crash which could happen if using the zero as
tabstop width. (div by zero)

Fixes: QTCREATORBUG-28082
Change-Id: I8913b1c28b8ec239ecdf2306fe8861669ccb9d56
Reviewed-by: hjk <hjk@qt.io>
2024-08-01 10:57:51 +00:00
Christian Stenger
a8f74a011f Debugger: Fix potential crash
When triggering context menu on locals, receiving an update for
locals (e.g. still running fetch of locals finishes, expanding
children,..) and triggering an action referring to a former
now no more existing item.
Close the menu on updates to avoid this scenario.

Change-Id: I273bb85d497dfbaa257f267a866ea014a7e3b209
Reviewed-by: hjk <hjk@qt.io>
2024-08-01 10:56:29 +00:00
Marcus Tillmanns
c7aae25b94 RemoteLinux: Fix crash
When adding a Docker device via the Add Device Wizard,
while the docker executable is running on a remote linux device,
a crash would happen because the linux device is destroyed
due to a call to "saveSettings".

This patch adds a lock to the device shell mutex during destruction
to try and keep the device alive while a LinuxDevicePrivate::runInShell
call is still ongoing.

Fixes: QTCREATORBUG-31364
Change-Id: Ia154b527bb8344fc41fa91a56a7ef3305bfef0fa
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-08-01 10:47:28 +00:00
hjk
d83b2a80d3 Core: Merge newdialogwidget.* into newdialog.*
Change-Id: I55ef3ea280cbc397216e453f10dd6f2b54a9d2b1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-08-01 09:53:11 +00:00
Marco Bubke
3fd89a31bc QmlDesigner: Use C++ 20 designated initializer for update
It makes it easier to add new arguments without breaking the tests.

Change-Id: Id03053ac17e4da26a2abf2a23e6cc20848ed9af5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-08-01 09:24:33 +00:00
Marco Bubke
e3a062837d QmlDesigner: qml document parser traits
A file component is always of the reference kind. Sets the file
component trait too.

Task-number: QDS-12665
Change-Id: I800b32a4d204fb016c1274d05c08695b01581ae4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-08-01 09:24:26 +00:00
hjk
3c78954d5a ProjectExplorer: Simplify AppOutput context menu creation code path
Change-Id: I7ce938e87b7b714bcfad60ef8e0932544d3cb15e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-08-01 08:35:44 +00:00
Marcus Tillmanns
3cb03be0fd Docker: Fix cmdbridge init when docker is remote
If the user has specified a remote path for the "docker" executable
it is not possible to simply bind the cmdbridge as its on a different device.

We fall back to copying the cmdbridge in this case.

Task-number: QTCREATORBUG-31364
Change-Id: I03b5594c1c942fe6539a45a32d2a31e24f2a493b
Reviewed-by: hjk <hjk@qt.io>
2024-08-01 07:09:33 +00:00
hjk
86b130f7c0 BinEditor: Simplify editor setup
Make BinEditorImpl also the EditorService implementation.

Change-Id: I6a741f678c93f96e80947c041f9d55c9f8190148
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-08-01 07:07:52 +00:00
hjk
363a7ab127 BinEditor: Support duplication
Fixes: QTCREATORBUG-13209
Change-Id: I0aafdb2bf87d94f8e86cf392445577dc355e556a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-08-01 07:05:08 +00:00
hjk
667188c242 BinEditor: Also create IEditors, but don't show them for memory views
To simplify the different code paths, still on the way to allow
duplication of editors.

Change-Id: I09f8e9faee4b5b6c8179f56341997024daa8681a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-08-01 07:03:58 +00:00
hjk
255e63bebb ProjectExplorer: Remove indirections when accessing AppOutputPane
This intentionally keeps the lifetime (almost) identical.

Change-Id: Ic420d8c5f89eaad33e38160bb8ee26965830047f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-07-31 16:17:03 +00:00