diff options
author | Tor Arne Vestbø <[email protected]> | 2024-08-09 11:15:53 +0200 |
---|---|---|
committer | Tor Arne Vestbø <[email protected]> | 2025-05-19 19:42:30 +0200 |
commit | 2a9444920bcd2f5d1832971bd6275ebdc5515546 (patch) | |
tree | d0af17d1b64206b00c6ffa79dcebf7660d87a9cf /src/gui/kernel/qevent.cpp | |
parent | 5c82db79d98d456a9299314fab2e7576db227fd0 (diff) |
macOS: Make NSServicesMenuRequestor implementation rich-text aware
The protocol is used by services that interact with content in the
application on behalf of the user.
So far we have only been able to deal with plain text content,
which resulted in wiping any formatting if the user tried to
use a service to rewrite text in a rich text document.
We now support rich text, by teaching our IM protocol how to
deal with rich text for both reporting of the current text
selection, as well as text insertion (commit).
Unfortunately this doesn't help us for Writing Tools, as in
15.2 it no longer uses the NSServicesMenuRequestor protocol
for insertion if we also implement NSTextInputClient. As
a result we get insertions via insertText:replacementRange:,
which is not prepared for rich text yet.
[ChangeLog][macOS] Text services via the Services menu now
support rich text extraction and insertion.
Task-number: QTBUG-126238
Change-Id: I3d2933d766af8fe29e4f17636f703a257bf389fd
Reviewed-by: Richard Moe Gustavsen <[email protected]>
Diffstat (limited to 'src/gui/kernel/qevent.cpp')
-rw-r--r-- | src/gui/kernel/qevent.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 762522daa0f..af3ad64689d 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -2250,6 +2250,11 @@ QContextMenuEvent::QContextMenuEvent(Reason reason, const QPoint &pos) variable can be used to set a selection starting from that point. The value is unused. + \value MimeData + If set, the variant contains a QMimeData object representing the + committed text. The commitString() still provides the plain text + representation of the committed text. + \sa Attribute */ |