[konsole] [Bug 431100] [Wayland] Copy paste from konsole to eclipse and from eclipse to konsole does not work

Oded Arbel bugzilla_noreply at kde.org
Fri Oct 21 14:07:56 BST 2022


https://bugs.kde.org/show_bug.cgi?id=431100

--- Comment #9 from Oded Arbel <oded at geek.co.il> ---
Did more research - the problem is likely originates in Qt, where applications
I reviewed are basically doing

QApplication::clipboard()->mimeData(QClipboard::Clipboard)->text()

which, as can be seen here
[https://codebrowser.dev/qt5/qtbase/src/corelib/kernel/qmimedata.cpp.html#406]
is implemented by finding either a `text/plain` or `text/plain;charset=utf-8`
mime type and returning its content, otherwise - returning empty text.

>From what I've been able to understand the `STRING`, `TEXT` and `UTF8_STRING`
types are holdovers from X11 (e.g. X11 6.4 ICCCM p2.7.1) and should not be
expected to be applicable to Wayland. One might say that this puts the ball
back in Eclipse's court - as it only offers RTF options for Wayland specified
mime types - except that pasting from Eclipse does work in GTK apps.

Assuming GTK apps do allow pasting from Eclipse on Wayland by implementing
"backwards compatible" X11-typed clipboard handling (I haven't checked, but
gedit - for example - definitely does not support RTF types for pasting, so it
can only use the STRING types) - should we:

1. Work to implement such backward compatibility support for Qt-based apps -
this will required adding workaround code to each application that uses
QClipboard and QMimeData
or
2. Petition Eclipse to be a more upstanding Wayland citizen

I would definitely prefer the later, but as Eclipse devs are horribly averse to
external work items (I've tried many times in the past), I think we should come
up with an alternative.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list