From 2e6b237b03a51379e8680c0c07fefc2023fe7c97 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 13 Aug 2024 21:20:03 +0300 Subject: [PATCH] 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 (cherry picked from commit 014fb179d81456577c745418017e333faeb1f08e) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/kernel/qmimedata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qmimedata.cpp b/src/corelib/kernel/qmimedata.cpp index afbd2adcfed..4237efc8f81 100644 --- a/src/corelib/kernel/qmimedata.cpp +++ b/src/corelib/kernel/qmimedata.cpp @@ -411,7 +411,7 @@ void QMimeData::setText(const QString &text) */ bool QMimeData::hasText() const { - return hasFormat(textPlainLiteral()) || hasUrls(); + return hasFormat(textPlainLiteral()) || hasFormat(textPlainUtf8Literal()) || hasUrls(); } /*!