Commit Graph

86 Commits

Author SHA1 Message Date
Eike Ziller
ad7d559028 Tr: More small fixes
Change-Id: I5d9324d3f64eaa522fa1d435efa39fa43d84798a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-10-18 12:10:45 +00:00
Marcus Tillmanns
1fabd72514 DeviceSupport: Add more error output
Previously most errors when opening shells were completely
opaque to the user. This patch adds error output either via
QMessageBox if there is another modal dialog, or as flashing
disrupting messages.

Change-Id: I54be7a90295b61c23c739294c2d1d37c288ad273
Reviewed-by: hjk <hjk@qt.io>
2023-10-06 08:26:15 +00:00
Christian Kandeler
bdded29b33 qbs build: Improve some base items
Clean-up, simplification and modernization.
Also fix the bugs uncovered by this.

Change-Id: Ia3a77557f10faf9a901540a55fd6c07a2e986bf5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-18 11:50:09 +00:00
Marcus Tillmanns
e17866e283 Terminal: Show key when input is hidden
Change-Id: I5fca6a8c4f43ea2b95bad4df247b5df0abad521c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-05 13:18:36 +00:00
Marcus Tillmanns
616a0c0f77 Terminal: Support Ctrl+C/V on Windows
When a selection is present, let Ctrl+C work as copy
on Windows.

Remove sending ESC key in clearSelection as it interfered
with a Paste after copy.

Change-Id: I92db7f263e1eb433bca8aa5500fcecb637a23f90
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-08-31 10:58:36 +00:00
David Schulz
5122d8addc Merge remote-tracking branch 'origin/11.0'
Change-Id: Idbf5f641aa9db7574cf2a4bd09adb8bcd03da894
2023-08-22 08:10:48 +02:00
Marcus Tillmanns
64b852e186 Terminal: Fix default environment vars
Fixes: QTCREATORBUG-29515
Change-Id: I1d14f228f946a64a8d3cdb17f57ae9058db549ff
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-08-21 06:43:01 +00:00
Marcus Tillmanns
92355bf40d Terminal: Lazily open remote terminals
Move the burden of finding the shell of a device from the shell menu
to the TerminalWidget, so that opening the shell menu does not block
the ui.

Change-Id: I7f2e5a891f20faa53a1e3eec879866219f9bee0b
Reviewed-by: hjk <hjk@qt.io>
2023-08-17 07:09:48 +00:00
Marcus Tillmanns
385ff37f88 Terminal: Fix selection
A missing call to the base class meant that when starting to search with
a selection set, the selected text was not copied into the search field.

Change-Id: I1f2f1054a687d8b33b6733cc2a96e85ffa7f7816
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-07-31 11:23:47 +00:00
Orgad Shaneh
4ad3925da4 Merge remote-tracking branch 'origin/11.0'
Change-Id: I5cdff1f5db3fae89beef3d27316b21440541bb1c
2023-07-30 16:24:15 +03:00
Marcus Tillmanns
80b23292b1 Core: Add searchable terminal
Change-Id: Id058fb1a97c967fc253b08edf3910f019e708b50
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-07-27 13:13:06 +00:00
Marcus Tillmanns
42ed82973c Terminal: Create Terminal solution
Change-Id: If271fd23a84c49bbc25fcc3b9bc0939c7237d095
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-07-27 12:03:17 +00:00
Marcus Tillmanns
79e839b29f Terminal: Add mouse support
Change-Id: Ibeb8e13b5f8f75f16ec86f64536235587c844ffc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-07-26 14:06:38 +00:00
Marcus Tillmanns
def291f260 Terminal: Improve paste performance
Pasting large amounts of data on macos would block the App indefinitely.

The issue was a blocking call to ::write. The first fix for that was to
set O_NONBLOCK on the tty stdout fd. The second fix was to pass the
actual result of the write back to the caller so they can react to it.

In the TerminalSurface we now check if the write was successful and
if not we buffer the data and try again later.

Change-Id: Ibc92cce57fad88b5e9aa325197b42e17bec5e746
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-26 09:48:17 +00:00
hjk
b14b7b1a5f Replace a few more Aspect::value() calls with operator() uses
Change-Id: I9343e74bfb51af41df02a411976b82b9260be2fb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-07-20 09:31:09 +00:00
hjk
bedab22e63 Replace a few aspect.value() calls with operatpor()
Change-Id: Icaada671fe8dbe59d4f596da49476b3ec2137c25
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-07-19 05:14:13 +00:00
hjk
dbb1e04c77 Terminal: Use new settings creation pattern
Does not delay much yet, as settings() is accessed in
Plugin::extensionInitialized()

Task-number: QTCREATORBUG-29167
Change-Id: I8f7c7fbef78c4ce0f92302e57a81f6216456c27b
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-07-07 11:38:11 +00:00
Marcus Tillmanns
f02d0354c4 Terminal: Dont show process exit code
Show it as a "flashing" message instead

Fixes: QTCREATORBUG-29373
Change-Id: Ib9e7280a1b80cc52835aecb954f80e9daa80f7ca
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-07-05 15:39:29 +00:00
Orgad Shaneh
9a7f45cc46 Terminal: Allow the underlying application to set title
Change-Id: I3530d645f16047df2546902d900e5e2fee8d071c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-07-05 08:26:39 +00:00
hjk
d0d1e1af1f A few more direct FilePathAspect value accesses
Task-number: QTCREATORBUG-29167
Change-Id: I8eba582303c16dddbdb5cea5bce43f048bac06b7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-04 13:08:00 +00:00
Marcus Tillmanns
6e64a75cb7 Terminal: Fix base Environment
Change-Id: I509333df419f88b922dd69a4ee6484f2c809c31d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2023-06-14 10:15:03 +00:00
hjk
362772442a All: Fix some more Qt 6.7 induced deprecation warnings
Change-Id: I4f3fc9c34ff664ab153d4a9a641ec84a11e555a9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-06-08 11:40:23 +00:00
Marcus Tillmanns
8c381c719b Terminal: Fix painting multi char preedit
Preedits on linux can often contain more than one character.

Also changes the painting from white on black to painting with
just an underline.

Change-Id: I6769217ca80cf131aa3fb96b20e23b717f591467
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-06-08 11:14:19 +00:00
Marcus Tillmanns
f83fb72af8 Terminal: Fix assert
ShortCutMap::addShortCut did assert if the keysequence was empty.

Changed Q_ASSERT to QTC_ASSERT to not crash.

Change-Id: Ib03e21bb00ab989e00d5c3de68b52b84c6eb2360
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-06-08 06:24:33 +00:00
Marcus Tillmanns
217b03c1ac Terminal: lock/unlock keyboard
We copied QShortCutMap into Qtc to allow us tight control over which shortcuts
are "enabled" while the focus is inside a terminal, and the keyboard is "locked"
to the Terminal. Locked here means that except for a select few, all key presses
are send directly to the terminal and cannot be used to activate other actions.

Change-Id: I96cddf753033c0f4e7d806b20085bb4755853117
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-07 10:29:47 +00:00
Marcus Tillmanns
886ca55b5a Terminal: Fix warnings about re-registered action
Especially on Linux the pointer value of the Terminal might be reused,
leading to warnings about actions being registered for the same context.

Cleaning up the registration fixes this.

Change-Id: Ie1d53bf79581e9f98576e7a4e70420ec63da0f86
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-07 07:25:13 +00:00
Orgad Shaneh
e92a131644 Terminal: Fix MSVC warning
warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data

Change-Id: I5d57843eba79f0eb023ea7e3c4149aa515430189
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-06-05 07:33:46 +00:00
Marcus Tillmanns
9f1a2c4f8f Terminal: Rework commands
This rework fixes the way commands are registered in Qt Creator.

Change-Id: I401f3ac7d9194dad8fceb507360ddc3633106eb4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-31 13:17:49 +00:00
Marcus Tillmanns
3416ccd7ec Terminal: Fix selection
When moving the mouse left or right out of the viewport
the selection would grow into the previous/next line
without the bounding.

Change-Id: Ica38eac3b306338ef24aa4abace66f110edb2aef
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-05-16 11:50:18 +00:00
Alessandro Portale
f2213db913 Terminal: Fix warning
warning: dereferencing type-punned pointer will break strict-aliasing
rules [-Wstrict-aliasing]

Change-Id: Ib66cbde9ff48f31d1a5ca97c8bafb0efd419dc2e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-12 06:34:49 +00:00
Marcus Tillmanns
734f559b76 Terminal: Fix cursor/viewport updates
Under some font sizes the cursor size and cell size were not correctly
aligned on the pixel grid, leaving behind artifacts of prior draws.

Change-Id: I25e6efdc44102f24672912e1e56c31be0c686b89
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-05-09 11:20:42 +00:00
Marcus Tillmanns
f4abb1ec4a Terminal: Remove unnecessary destructor
Calling Aggregate::remove is not necessary and led to a warning message.

Change-Id: I51cdd7bfa9bdda7a3ebedf6a86e48fe54fd8f3ef
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-05 09:21:51 +00:00
Jarek Kobus
470c95c94b Utils: Rename QtcProcess -> Process
Task-number: QTCREATORBUG-29102
Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c
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>
2023-05-04 05:52:16 +00:00
Marcus Tillmanns
aeb2b458d0 Terminal: Allow dropping files
Change-Id: I978ea72d6de7df6c31d1d2d2368e7aadf835279d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-04-26 07:08:08 +00:00
Marcus Tillmanns
d05faf64f4 Terminal: Correctly parse url links with empty path
Previously urls such as http://google.com were appended to the current
dir, as FilePath::isAbsolute would return false since there is no path.

Change-Id: I17546aed322a74f6b8cbcc166d37608fd809fd1e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-04-06 13:06:11 +00:00
Marcus Tillmanns
388e516200 Terminal: Improve link copy
* Show link if control key is pressed (without mouse move)
* Copy link on Control+Shift+Click
* Add Copy Link Action to Right click menu

Change-Id: Ide4ff4e77c03e015117c67f09c9d60dedd14dfcb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-04-06 09:25:36 +00:00
Marcus Tillmanns
b999e5700e Terminal: Fix docker cmd for terminals
* Fix env for terminals

Change-Id: Ie16a74aeca3ad34a76af1dee0c5a01e607aabebb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-04 05:59:35 +00:00
Marcus Tillmanns
94c4800ad8 Terminal: Fix crash when reusing TerminalWidget
Change-Id: I9d30df1abbecabd3909078e0a609fe5ba96769ae
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-03 07:53:23 +00:00
Marcus Tillmanns
5db27d21da Terminal: Add setting to change arguments of default shell
On non windows systems, initialize it with "-l" to start a login shell.

Change-Id: I972f845c3933c6a54752d4c71108a658311a0256
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-28 07:13:00 +00:00
Marcus Tillmanns
4ab5eb5339 Terminal: Fix warning messages
Change-Id: I1ab473c79219cf6e2adefaa1349b4675a2455b2f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-27 09:30:09 +00:00
Marcus Tillmanns
2eb4884742 Terminal: Make audible bell configurable
Change-Id: I6cc02f2f1b873f39352151265fb7ba1fe0f170fc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-27 09:29:54 +00:00
Marcus Tillmanns
af5f702f54 Terminal: Make ESC key behavior configurable
Change-Id: I806870c5dd7edbcd3ac2642849cca82f1939ce01
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-27 09:29:47 +00:00
Marcus Tillmanns
ae94d3b7ea Terminal: Handle bell
Change-Id: I61681166fc8e489ffd0807cf3bcb4a2abc9cf6e1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-24 16:12:05 +00:00
Marcus Tillmanns
9417f8b99e Terminal: Add search
* Adds new search widget to terminal
* Adds new theme color "TerminalFindMatch"
* Fixes ESC key handling in terminal

Fixes: QTCREATORBUG-28946
Change-Id: I7b6057d13902a94a6bcd41dde6cc8ba8418cd585
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-24 16:12:01 +00:00
Marcus Tillmanns
17a482bebe Terminal: Support paste via Middle mouse button
Fixes: QTCREATORBUG-28943
Change-Id: If48c021e509e10fd13e6e5356d0a364e91aae8da
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-24 13:16:23 +00:00
Marcus Tillmanns
7fe4fde886 Terminal: Open directory links in navigation
Fixes: QTCREATORBUG-28938
Change-Id: If49def66501ff29f72d8a92e3971da6be5d93367
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-23 14:07:00 +00:00
Marcus Tillmanns
1c099b2bd2 Terminal: Use current dir for links
Fixes: QTCREATORBUG-28942
Change-Id: I424676d3ef3395eead9c4c0c0e826e1c44500b40
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-23 14:06:52 +00:00
Marcus Tillmanns
e045c643c3 Terminal: Support Alt+Left / Alt+Right cursor move
Fixes: QTCREATORBUG-28941
Change-Id: I7c8e012733f6dcb2851e8e1b840d53317e413cd8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-23 14:04:59 +00:00
Marcus Tillmanns
af809b3a52 Terminal: Add context menu & Settings button
Fixes: QTCREATORBUG-28937
Change-Id: I9dab5da0adccb8cff4d4e824ead0eba3e27eef5c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-23 12:32:07 +00:00
Marcus Tillmanns
a485f18a94 Terminal: Make shortcuts configurable
Fixes: QTCREATORBUG-28940
Change-Id: I1afe114c357243a8fa4f101b5eac80a766dc87b9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-23 12:31:53 +00:00