Qt5,Qt6: allow paste text if mime type contains charset attribute

(cherry picked from commit 9f0c74432d)

Co-authored-by: zeljan1 <zeljko@holobit.hr>
This commit is contained in:
Željan Rikalo 2024-09-11 13:57:20 +00:00 committed by Željan Rikalo
parent 3634889ada
commit 7ec936059f
2 changed files with 2 additions and 2 deletions

View File

@ -4120,7 +4120,7 @@ begin
if (MimeType = 'text/plain') then // do not translate
begin
QGuiApplication_platformName(@WStr);
if CompareText(Copy(UTF16ToUTF8(WStr), 1, 7),'wayland') = 0 then // do not translate
if (WStr = 'xcb') or (CompareText(Copy(UTF16ToUTF8(WStr), 1, 7),'wayland') = 0) then // do not translate
begin
AFormats := QStringList_Create;
QMimeData_formats(QtMimeData, AFormats);

View File

@ -4281,7 +4281,7 @@ begin
if (MimeType = 'text/plain') then // do not translate
begin
QGuiApplication_platformName(@WStr);
if CompareText(Copy(UTF16ToUTF8(WStr), 1, 7),'wayland') = 0 then // do not translate
if (WStr = 'xcb') or (CompareText(Copy(UTF16ToUTF8(WStr), 1, 7),'wayland') = 0) then // do not translate
begin
AFormats := QStringList_Create;
QMimeData_formats(QtMimeData, AFormats);