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 17eb0f2d8a.

[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 <volker.hilsheimer@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
bb10
Kai Koehne 2022-09-28 09:35:51 +00:00
parent e8892e83d3
commit a51e7876b8
1 changed files with 1 additions and 1 deletions

View File

@ -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();
}