From acae2426f3d1f3b00b1954703af828ecf6390b90 Mon Sep 17 00:00:00 2001 From: Sergei Ilinykh Date: Wed, 8 May 2024 23:30:19 +0300 Subject: [PATCH] Fixed mediaelement supported mime regexp --- src/xmpp/xmpp-im/xmpp_xdata.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/xmpp/xmpp-im/xmpp_xdata.cpp b/src/xmpp/xmpp-im/xmpp_xdata.cpp index 219d0f48..0932e4cc 100644 --- a/src/xmpp/xmpp-im/xmpp_xdata.cpp +++ b/src/xmpp/xmpp-im/xmpp_xdata.cpp @@ -305,9 +305,7 @@ bool XData::Field::MediaElement::checkSupport(const QStringList &wildcards) #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) if (QRegExp(wildcard, Qt::CaseSensitive, QRegExp::Wildcard).exactMatch(uri.mimeType)) { #else - if (QRegularExpression::fromWildcard(QLatin1Char('^') + wildcard + QLatin1Char('$'), Qt::CaseSensitive) - .match(uri.mimeType) - .hasMatch()) { + if (QRegularExpression::fromWildcard(wildcard, Qt::CaseSensitive).match(uri.mimeType).hasMatch()) { #endif return true; }