qt6-bb10/src/platformsupport
Richard Moe Gustavsen 4e19615907 qmacmime: convert UTF-16 using QTextCodec
The current implementation of QMacPasteboardMimeUnicodeText
didn't contain any logic to handle unicode text with a byte
order mark (BOM). According to the
docs (*), 'public.utf16-plain-text' can have an optional BOM.
Because of that, Qt would fail encoding UTF-16 text from the
pasteboard if it had a BOM.

Additionally, perhaps because of a bug in iOS 10, UTF-16 text
placed on the pasteboard by Qt ends up being encoded wrong by
native apps, unless the text has a BOM.

Rather than hard-coding UTF-16 encoding/decoding in qmacmime, we
now leave it to QTextCodec. QTextCodec will add a BOM by
default, and can handle decoding of UTF-16 both with, and
without, a BOM.

*: https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html

Task-number: QTBUG-56229
Change-Id: I3a08deb0262350c67e5622cf23eb3c3a4907ec39
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2016-10-26 12:14:23 +00:00
..
accessibility Fix missing "We mean it" in qtbase private headers 2015-10-01 21:09:05 +00:00
cglconvenience Cocoa: Add support for triple-buffered GL contexts 2016-08-29 10:11:52 +00:00
clipboard qmacmime: convert UTF-16 using QTextCodec 2016-10-26 12:14:23 +00:00
dbusmenu dbustray: Support replacing menu on QDBusTrayIcon 2016-10-07 14:24:38 +00:00
dbustray dbustray: Support replacing menu on QDBusTrayIcon 2016-10-07 14:24:38 +00:00
devicediscovery Remove linux only-dependency from devicediscovery 2016-05-19 10:15:32 +00:00
eglconvenience Compile Fix: unused variable in q_refreshRateFromFb() on non-linux 2016-05-25 11:45:10 +00:00
eventdispatchers Windows: Move GUI event dispatcher to QtPlatformSupport. 2015-11-14 18:22:01 +00:00
fbconvenience embedded: Make signal handlers optional 2016-07-27 05:17:49 +00:00
fontdatabases Fix Myanmar text with some fonts 2016-09-23 10:05:30 +00:00
glxconvenience Update copyright headers 2015-02-11 06:49:51 +00:00
input QEvdevKeyboardHandler: use RAII in create()/ctor 2016-09-18 10:55:27 +00:00
linuxaccessibility AtSpiAdaptor: fix 'defined' field in GetAttributeValue 2016-08-11 04:34:09 +00:00
platformcompositor Fix clipRect interpretation in composited backingstores 2016-02-01 08:49:26 +00:00
services QtPlatformSupport: Remove virtual from declarations with override. 2016-01-21 07:17:18 +00:00
themes QtPlatformSupport: Remove virtual from declarations with override. 2016-01-21 07:17:18 +00:00
platformsupport.pro Platformsupport: Don't include dbus on darwin. 2016-06-01 02:30:27 +00:00