summaryrefslogtreecommitdiff
path: root/extensions/source/propctrlr
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2025-02-14 10:38:13 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2025-02-14 16:42:52 +0100
commitec95d529b51e95b074adaafb9f113904fed636c7 (patch)
tree354327ff03196c0e2a4d7dbe4f0d05d7c067db97 /extensions/source/propctrlr
parent38bad260039a6d3ec6a4ce39859ab13dfe8d9c4c (diff)
tdf#165238 qt: Rely on Qt for "text/plain" and UTF-8 clipboard text
QMimeData::text implements handling for the "text/plain;charset=utf-8" and "text/plain" MIME types (see [1]). Rely on that instead of implementing our own handling for these MIME types. This fixes copying Greek characters from Firefox as plain text into Writer with qt6 on Wayland (tdf#165238). This approach was already mentioned as an idea in commit 5b3227fac58dcbd588e2389e205679cd77842bac Author: Michael Weghorn <m.weghorn@posteo.de> Date: Wed Apr 6 13:51:59 2022 +0200 tdf#147285 qt: Prefer "text/plain;charset=utf-8" over "text/plain" > (An alternative solution to adding our own handling for > "text/plain;charset=utf-8" and making assumptions for the > encoding of "text/plain" data would be to let Qt handle > this and just call `QMimeData::text()` for the > `m_bProvideUTF16FromOtherEncoding=true` case > in `QtTransferable::getTransferData`. > Since qtbase commit 589a01ff6b1eacf81e74a5fc4801572135214f43 > ("QMimeData: Prefer UTF-8 when multiple charsets are available", > contained in Qt >= 5.13), that one handles MIME type > "text/plain;charset=utf-8" in addition to "text/plain".) [1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qmimedata.cpp?id=6c61d7b0f804ae5c048af95abef4d41ecc8862df#n383 Change-Id: Iee695f62e836f3a8776b719ca95afb8fbddea82f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181660 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'extensions/source/propctrlr')
0 files changed, 0 insertions, 0 deletions