Skip to content

Commit

Permalink
Update src/core/network/qgsnetworkcontentfetcherregistry.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 24, 2023
1 parent f7be036 commit 8487eeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/network/qgsnetworkcontentfetcherregistry.cpp
Expand Up @@ -180,12 +180,12 @@ void QgsFetchedContent::taskCompleted()
const QString contentType = reply->header( QNetworkRequest::ContentTypeHeader ).toString();
if ( extension.isEmpty() && !contentType.isEmpty() )
{
QList<QMimeType> mimeTypes = QMimeDatabase().allMimeTypes();
const QList<QMimeType> mimeTypes = QMimeDatabase().allMimeTypes();
auto it = std::find_if( mimeTypes.constBegin(), mimeTypes.constEnd(), [ = ]( QMimeType mimeType )
{
return mimeType.name() == contentType;
} );
if ( it != mimeTypes.end() )
if ( it != mimeTypes.constEnd() )
{
extension = ( *it ).preferredSuffix();
}
Expand Down

0 comments on commit 8487eeb

Please sign in to comment.