Commit Graph

73 Commits

Author SHA1 Message Date
Christian Stenger
0f1f5435ea Terminal: Fix build before Qt6.4
Change-Id: Idc1138289516eb2cdeffc310cec4b9ba019d1b16
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-03-07 05:54:58 +00:00
Marcus Tillmanns
f95f815e98 Terminal: Add support for Cursor shape and blink
Change-Id: I7f71578a714d375bcd4ef8ae431f4127cbc57a55
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-06 22:55:50 +00:00
Marcus Tillmanns
098c76832a Terminal: Rewrite rendering
The rendering has been rewritten to use cached GlyphRuns instead
of text layouts. The VTerm specific code was moved into
TerminalSurface.

Change-Id: I10caa3db4ee932414987c9ddae2dcb777dc1f6e7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-06 15:41:29 +00:00
Marcus Tillmanns
74f15c99ce Terminal: Fix Ctrl+[A-Z] and '|'
Change-Id: Id245a015d6092236c20634c47af682bcf073d982
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-03 20:00:02 +00:00
Marcus Tillmanns
7fc674b566 Terminal: Fix "nano" titlebar
QTextLayout ignores trailing spaces, and does not draw their
background color. Converting them to Nbsp fixes this.

Change-Id: I19a363bcb4792c613eb9c59f7caaa40fa631b937
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-03 19:59:30 +00:00
Marcus Tillmanns
dc4ec494b3 Terminal: Fix mouse selection
Previously m_selection was not correctly ordered such that start < end.
This patch fixes that and also adds optional debug visualizations to aid
in debugging / validating the selection.

Change-Id: I9b0d2fcd917f39eeb5082bc374796fed91521c7c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-03 19:55:05 +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
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
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
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
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
Marcus Tillmanns
ea64bb9d36 Terminal: Fix scroll behavior
Change-Id: I357a5d04baab881cf89c57fdf3336bd1e0077976
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-02-27 12:46:29 +00:00
Marcus Tillmanns
1381bd0963 Terminal: Fix \ on German mac keyboard
Change-Id: I87d4299c1e41f4a553b5ecc9690b2fd332b7b3e8
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-02-27 10:19:56 +00:00
Marcus Tillmanns
d3b4159b23 Terminal: Fix preedit area position
Change-Id: I8667a84e12154ca34517af25648a0983f918fc48
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-27 10:03:50 +00:00
Marcus Tillmanns
a21a5249de Terminal: Fix Background painting
Change-Id: I62d9e10b8e7e79985dc7a9b68d6a05db1e743261
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-27 10:03:39 +00:00
Marcus Tillmanns
558e9f4b16 Terminal: Add selection color setting
Change-Id: I66f94c3bd729975046ea72aca3bc23bb5024ced0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-02-27 10:03:15 +00:00
Marcus Tillmanns
c6dc54b343 Terminal: Add Shell option menu
Change-Id: I08ea3c52ed28ab65f2dc902051bab9e6975e6a7e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-02-24 13:37:14 +00:00
Marcus Tillmanns
682ef157d8 Terminal: Add Terminal plugin
Adds a new Terminal plugin that provides a Terminal pane inside
Qt Creator.

Fixes: QTCREATORBUG-8511
Change-Id: I7eacb3efa2463d7df9f383ae3fc33254fb9019a9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-02-24 10:19:33 +00:00