Skip to content

Commit

Permalink
Fixed mediaelement supported mime regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed May 8, 2024
1 parent 6c283f7 commit acae242
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/xmpp/xmpp-im/xmpp_xdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit acae242

Please sign in to comment.