From a51e7876b8adee2d6ddb721de9b4525cd1025ad7 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 28 Sep 2022 09:35:51 +0000 Subject: Revert "Keep original text for text/plain mime data" This also affects things like line breaks, effectively preventing the paste of copied text to non-Qt applications. This reverts commit 17eb0f2d8a84eb54e6e4fbfa981ca3bae8c7e919. [ChangeLog][QtGui][Drag&Drop] The fix to preserve special characters like   the text/plain part of the clipboard when copied from a QTextEdit or QLineEdit had to be reverted (QTBUG-107004). Pick-to: 6.4 Fixes: QTBUG-107004 Change-Id: Ia226f38f31a368c381910e1d43b6422395a5744f Reviewed-by: Volker Hilsheimer Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/widgets/widgets/qwidgettextcontrol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/widgets') diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp index cec18dbe69..e9702e8977 100644 --- a/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/src/widgets/widgets/qwidgettextcontrol.cpp @@ -3477,7 +3477,7 @@ void QTextEditMimeData::setup() const that->setData("application/vnd.oasis.opendocument.text"_L1, buffer.data()); } #endif - that->setText(fragment.toRawText()); + that->setText(fragment.toPlainText()); fragment = QTextDocumentFragment(); } -- cgit v1.2.3