QMimeData/Docs: include the fact that some functions may convert

QMimeDataPrivate::retrieveTypedData() converts if the target MIME type
is text/plain or if the target meta type is QByteArray.

Fixes: QTBUG-127296
Pick-to: 6.8
Change-Id: I4878533dcb2d4b3e8efefffd17e49ade9fbb32f8
Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
Thiago Macieira 2024-07-22 11:00:38 -07:00
parent 03a7be3780
commit 05aaf2a684

View File

@ -374,8 +374,9 @@ bool QMimeData::hasUrls() const
/*!
Returns a plain text (MIME type \c text/plain) representation of
the data.
Returns the plain text (MIME type \c text/plain) representation of
the data if this object contains plain text. If it contains some other
content, this function makes a best effort to convert it to plain text.
\sa hasText(), html(), data()
*/
@ -541,7 +542,11 @@ bool QMimeData::hasColor() const
/*!
Returns the data stored in the object in the format described by
the MIME type specified by \a mimeType.
the MIME type specified by \a mimeType. If this object does not contain
data for the \a mimeType MIME type (see hasFormat()), this function may
perform a best effort conversion to it.
\sa hasFormat(), setData()
*/
QByteArray QMimeData::data(const QString &mimeType) const
{