Commit Graph

68765 Commits

Author SHA1 Message Date
Miikka Heikkinen
8e8cb6aa3d QmlDesigner: Fix shader asset icon in assets view
Fixes: QDS-9297
Change-Id: Ib81e1e12476b436dbb04984bf6f6567a88a44f63
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-03-03 12:02:33 +00:00
hjk
08bacd3f19 Avoid a few double lookups when expanding environment values
Change-Id: Ie84caee89a48d8006e6324c5a82901d01a5fac6c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-03 11:37:05 +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
Friedemann Kleint
7214d79420 Start debugger dialog: Enable clear button for command line arguments
Change-Id: Ia8d1a9a39ad61df37fd18a81e18d7e3e2ccad674
Reviewed-by: hjk <hjk@qt.io>
2023-03-03 10:20:07 +00:00
Jarek Kobus
30760747a3 FileStreamer: Optimize transfer on the same device
Run just "cp" on device instead of transferring the content of the
source into local and sending it back again to remote.

Change-Id: I703ad1181d77d470ae145691979c34fc75b59a97
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-03-03 10:10:24 +00:00
Jarek Kobus
c1b1842c48 Utils: Introduce FileStreamerManager
To be used for FilePath::async[Copy/Read/Write]() methods.

Change-Id: Ie34e600f8d65eae10b41893e15685afe19ce2a46
Reviewed-by: hjk <hjk@qt.io>
2023-03-03 09:57:28 +00:00
Jarek Kobus
22b9826e22 Utils: Introduce FileStreamer
The class is responsible for asynchronous read / write
of file contents. The file may be local or remote.
It's also able to do an asynchronous copy of files
between different devices.

Change-Id: I65e4325b6b7f98bfc17286c9a72b0018db472a16
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-03-03 08:49:31 +00:00
Marcus Tillmanns
240686b7ea Terminal: Start with disabled copy action
The copy action should only be enabled once a selection exists.
In the beginning no selection can exist, therefore the copy action
is disabled.

Previously this lead to a bug where only the second "Enter" keypress
was passed on to the terminal.

Change-Id: Iac01c273f70a50a4fc131bd6a2bbb1507705b853
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-03 08:24:31 +00:00
Marcus Tillmanns
6d70a27965 UnixPtyProcess: Fix read loop
Previously a value of "-1" from ::read would result in an endless loop.
This could easily be reproduced by "cat /dev/random | base64"

The buffer usage was also much more complicated than needed.
A static readBuffer now keeps the amount of allocations lower.

Change-Id: I5bb1a3c84b107ff8c2d3801bca8c6ae9a709cdb3
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-03 08:12:38 +00:00
hjk
b26e3a4501 Utils: Remove unused Environment functions
Change-Id: Idea6b1a126b1d4fe82b597e96ce447da9f546396
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-03 08:07:00 +00:00
Cristian Adam
9673dc7cd4 Terminal: New terminal and switch between terminals shortcuts
On macOS:
  * new terminal Ctrl+T
  * next terminal Ctrl+Shift+]
  * prev terminal Ctrl+Shift+[

On Windows / Linux
  * new terminal Ctrl+Shift+T
  * next terminal Ctrl+PgUp
  * prev terminal Ctrl+PgDown

Change-Id: I5626816cd18fd7a6d2b1cea5eea835a40b0c1029
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-03 07:44:01 +00:00
Marcus Tillmanns
9b7b0d4f02 Terminal: Switch to std::chrono
QDateTime's interface various between supported Qt Versions,
so we use std::chrono instead

Change-Id: I5af5ae9950e61c2ed38ff15dc0580f0dc2aa1f57
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-03 07:35:05 +00:00
Jarek Kobus
13a202564b TerminalProcess: Add Pty into switch statement
Amends 1da18a4b62

Change-Id: I1cef188a28f19eea3885a17e983b4cf7a4815498
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-03 07:30:35 +00:00
David Schulz
1124a75948 Debugger: Fix highlighting values and members in memory view
Fixes: QTCREATORBUG-23681
Change-Id: I1420385d0c923be0ae4dd7ef2662263b88623333
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-03 07:04:18 +00:00
Cristian Adam
d387802a3e Terminal: use shell name as terminal tab name
This way cmd, bash, powershell are more descriptive than "Terminal"

Change-Id: I19310f423cd4188ecc48580a30ed414833a15aee
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-02 16:54:59 +00:00
Cristian Adam
0a0827da41 Terminal: Improve keyboard shortcuts and mouse copy/paste
Change-Id: I7e032a48cc55143dd8fb038d74eb71c4ad8badac
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-02 16:54:53 +00:00
Marcus Tillmanns
78b1407adf Docker: Don't swallow output when startup fails
Previously error output occurring while the PID marker was
not parsed yet was not passed on to the parent QtcProcess.

Change-Id: Id6cbaa13a7d6c62d7a8612e118092eb2be6e790c
Reviewed-by: hjk <hjk@qt.io>
2023-03-02 16:32:57 +00:00
hjk
5e3af5b0f5 Qnx: Avoid use of Environment iterators
Change-Id: I2a1be67c1d21a731de1ada3d58099896fb676ffa
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-03-02 16:16:33 +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
hjk
21de068c14 RemoteLinux: Avoid some explicit uses of environment iterators
Task-number: QTCREATORBUG-28357
Change-Id: Ic8eb7592853749a7d511acc9a528059765c4ed75
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-03-02 16:02:33 +00:00
hjk
3d45683edf QMake: Avoid some explicit use of environment iterators
Task-number: QTCREATORBUG-28357
Change-Id: I80eae26eb1e7c7202654acdd3eb9380934bb7347
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-03-02 16:02:20 +00:00
hjk
ef0b958c74 Qbs: Avoid explicit use of Environmnet iterators
Task-number: QTCREATORBUG-28357
Change-Id: Ib703941bf50053df5481945e0714dd831191b625
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-03-02 15:33:49 +00:00
Christian Kandeler
928bef59ef Fix qbs build
Change-Id: Iddc8bdc08367cb596b16c22494c9289ea7eb4c86
Reviewed-by: hjk <hjk@qt.io>
2023-03-02 15:31:14 +00:00
Marcus Tillmanns
d8dc1c7f0f Terminal: Improve performance while selecting
Change-Id: I4f0a7a937f6e600430d8c89e51d1ea2d1ab8687f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-02 14:20:01 +00:00
Marcus Tillmanns
76b55fd6e6 Terminal: Implement selection via double click
Change-Id: I7665df5f37836331f202f168828bb1b1636bf5de
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-02 14:19:56 +00:00
Marcus Tillmanns
46ccaa642f Terminal: Improve performance for cat /dev/random
Change-Id: Ibc7e09dd9388fd6f06f0bed3ade4e83d05f03c28
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-02 14:19:47 +00:00
Marcus Tillmanns
86da87d306 ProjectExplorer: Remove IDevice::terminalCommand
Since Terminals can now be started for device file paths, there
is no need anymore for IDevice::terminalCommand.

Change-Id: I01c831ea7ee29d53efa6880631e8c6d54a4316aa
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-02 14:13:19 +00:00
David Schulz
517400e7f6 Copilot: do not activate the editor when requesting completions
This has unwanted side effects like closing the completion and switching
the current editor.

Change-Id: Ic0e150f2377a731910e409b9edc959fda670cd99
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-03-02 14:12:07 +00:00
Marcus Tillmanns
1da18a4b62 Utils: Integrate ptyqt into qtcprocess
Integrating PtyQt directly into QtcProcess allows us to
start Pseudo terminal processes using the existing QtcProcess
functionality such as starting remote process on e.g. docker
or remote linux devices.

This is needed for the new Terminal plugin.

Change-Id: Iaeed5ff9b341ba4646d955b2ed9577a18cd7100f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-02 14:10:11 +00:00
Jarek Kobus
8b09ad8898 QtcProcess: Introduce PtyData
That's going to be used by PtyProcessImpl.

Change-Id: Ifc1a7886ceed73272c9e415414db49452175a334
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-02 14:10:06 +00:00
hjk
81748fa00b Docker: Avoid explicit environment iteration
Task-number: QTCREATORBUG-28357
Change-Id: I0addc68309ab532d5a710916c7d017eccee1f348
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-02 13:43:58 +00:00
hjk
4b93f47565 Utils: Iterate environment via callback
Iterators expose the underlying datastructure and get
in the way of moving towards "env as stack of changes"

Task-number: QTCREATORBUG-28357
Change-Id: I69e3b53e62ed4c9ab394779e97afbc6fd1986838
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-02 13:28:46 +00:00
Thomas Hartmann
6e9c9e584d QmlDesigner: Do not clear component cache
We share the engine now with other views.

Change-Id: Icfb1b5bc11e3f2c05f7813ef487348478352f387
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-03-02 12:56:15 +00:00
Thomas Hartmann
b2ba31f996 QmlDesigner: Add registerPropertyMap to StudioWelcome
This allows to easily register a singleton similar to
context properties.

Change-Id: I0c391165473a949e7fd09d907e3a0752c23ba62d
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-03-02 12:50:19 +00:00
David Schulz
fef8bc4bc4 ClangCodeModel: request symbol update in clangd locator filter
Change-Id: I60dfb4cfe8af9abf3bd40c2359c4414ac729cd65
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-03-02 12:49:51 +00:00
Miikka Heikkinen
67e5246be2 ProjectExplorer: Hide Manage Kits button if Kit options are hidden
Fixes: QDS-9231
Change-Id: I185a3f038ebd67fdc9aff60b860980d3c0f3cadb
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-03-02 12:43:25 +00:00
Tim Jenssen
cc6c9e4b5e FilePath: fix documentation
Change-Id: Icd2ea0842279ac5ca9225b760aa7634b8db3e06d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-03-02 11:28:26 +00:00
David Schulz
18364db94a Editor: ensure block is layouted when painting it
The painting of an editor assumes the block is layouted properly. This
was done implicitly when calculating the block bounding rect previously.
With the option to replace the block layout with another document this
is not the case anymore, so we need to explicitly make sure that a block
was layouted before painting.

Change-Id: If6947a3a5c13a03310e0cab0f6fcbd4ff8078b1b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-02 11:08:01 +00:00
Cristian Adam
007c47a2d4 Terminal: Use QWinEventNotifier for shell process termination
Change-Id: I59ddcaa76714a0b15987b9e0912f4701a2951648
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-02 09:40:19 +00:00
Marcus Tillmanns
3287e14dd1 Utils: Add QTC_USE_WINPTY environment variable
Change-Id: I769bfe8bd92529f672694da38d04914e0a51ed1b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-02 09:39:59 +00:00
Eike Ziller
87ede95b5c Merge remote-tracking branch 'origin/10.0'
Change-Id: I7bd186df0bfae7906e980e9c2c811f8dcf29750d
2023-03-02 10:17:58 +01:00
David Schulz
6dc4160a40 Debugger: Add warning if cdb prevents loading of cdbext
This happens from time to time, but I do not have a way to reproduce it
safely. In order to present the user a somewhat usable state after this
error cancel the debug run and show a message box with potential fixes.

Fixes: QTCREATORBUG-24323
Change-Id: I7e557001bd5dfb3b0abb19fa635bf2d20bb3b16c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-02 08:49:44 +00:00
Tasuku Suzuki
0020129afe PluginDialog: set initial focus to filter
Qt Creator provides numbers of plugins.
Setting focus to the filter control helps to find a plugin.

Change-Id: Iac34ff04b97311a8c7890a3cbafdde22b2242dcd
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-03-02 08:14:11 +00:00
Christian Stenger
5a5776400a AutoTest: Fix missing includes
Change-Id: Ieb34092c8c78068ae1630cfaa0f18a45f7d43c0c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-03-02 07:51:28 +00:00
Ali Kianian
003ae4db87 QmlDesigner: Show the material name in the property editor
The material name for the property editor's material field
is presented in the following format:
MaterialName [MaterialId]

Task-number: QDS-8663
Change-Id: I59fdfcb52ecb2ce9a1079ae20b7e2d748bbc1d61
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-03-01 16:50:04 +00:00
Cristian Adam
00502c4630 Core: Use "patch" from git on Windows
On my system where I have strawberry perl installed, the "patch.exe"
from strawberry perl is picked.

This patch.exe has issues while reverting chunks, where as git's
patch.exe works perfectly.

Change-Id: I7e8c8f91f0f841c128ff8538dba68bee161a5f7b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-03-01 15:01:39 +00:00
Christian Kandeler
628babb5cb CppEditor: Adapt to new LLVM directory layout
Since https://reviews.llvm.org/D125860, the path contains only the major
version. We try both variants anyway, as we cannot be sure all Linux
distributions will adopt this scheme.

Change-Id: I0bc7b0cf38d7cb4af61342477a6a1f0679095d30
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-01 14:00:05 +00:00
Marcus Tillmanns
6451538d39 Docker: Don't try to mount existing directories
Change-Id: I1df4e1bf8689edf08c539d71529e4149909502d7
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:55:02 +00:00
Christian Stenger
369753acbc AutoTest: Redo results filtering
Instead of performing costly computations keep
track of the currently present types in the
respective branch of the subtree.
This also makes the filter invalidation on
newly added items obsolete.

Fixes: QTCREATORBUG-28831
Change-Id: I12cd31dc95b4c310a04ced2c98de3d509032482c
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-03-01 12:08:59 +00:00
Marco Bubke
6ccef0cc29 QmlDesigner: Fix path
Task-number: QDS-9048
Change-Id: I3ecceb041514e50fdc30accd2e82c6aed24166c5
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-03-01 11:23:08 +00:00