mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-24 18:35:37 +00:00
KMimeType::mimeType can return null
This commit is contained in:
parent
9a18084840
commit
449861c118
15
part.cpp
15
part.cpp
|
@ -219,12 +219,15 @@ static QString compressedMimeFor( const QString& mime_to_check )
|
|||
return it.value();
|
||||
|
||||
KMimeType::Ptr mime = KMimeType::mimeType( mime_to_check );
|
||||
if ( mime->is( app_gzip ) )
|
||||
return app_gzip;
|
||||
else if ( supportBzip && mime->is( app_bzip ) )
|
||||
return app_bzip;
|
||||
else if ( supportXz && mime->is( app_xz ) )
|
||||
return app_xz;
|
||||
if ( mime )
|
||||
{
|
||||
if ( mime->is( app_gzip ) )
|
||||
return app_gzip;
|
||||
else if ( supportBzip && mime->is( app_bzip ) )
|
||||
return app_bzip;
|
||||
else if ( supportXz && mime->is( app_xz ) )
|
||||
return app_xz;
|
||||
}
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue