QMimeData: Fix hasText() for text/plain;charset=utf-8

text() looks up `text/plain;charset=utf-8` but the hasText() function
has no matching check.

Pick-to: 6.7
Change-Id: Id309cd3bd11003813057704338beb36c65974f4a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 014fb179d81456577c745418017e333faeb1f08e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Vlad Zahorodnii 2024-08-13 21:20:03 +03:00 committed by Qt Cherry-pick Bot
parent a77987e600
commit 2e6b237b03

View File

@ -411,7 +411,7 @@ void QMimeData::setText(const QString &text)
*/
bool QMimeData::hasText() const
{
return hasFormat(textPlainLiteral()) || hasUrls();
return hasFormat(textPlainLiteral()) || hasFormat(textPlainUtf8Literal()) || hasUrls();
}
/*!