summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2022-09-28 09:35:51 +0000
committerKai Koehne <kai.koehne@qt.io>2022-09-28 14:13:51 +0000
commita51e7876b8adee2d6ddb721de9b4525cd1025ad7 (patch)
tree25d65445b57fe1ca508d797130c9c893043bac84
parente8892e83d3619a1b16b7000c58305b4f4585fcd8 (diff)
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 &nbsp; 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 <volker.hilsheimer@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp2
1 files changed, 1 insertions, 1 deletions
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();
}