Commit 24006bb9 authored by Albert Astals Cid's avatar Albert Astals Cid

Merge remote-tracking branch 'origin/Applications/14.12'

Conflicts:
	VERSION
	core/version.h
parents 557b5447 4ad7da97
......@@ -1325,18 +1325,20 @@ bool Part::openFile()
if ( !isstdin && !fileInfo.exists() )
return false;
KMimeType::Ptr pathMime = KMimeType::findByPath( fileNameToOpen );
if ( !arguments().mimeType().isEmpty() )
const QString argMimeType = arguments().mimeType();
if ( !argMimeType.isEmpty() )
{
KMimeType::Ptr argMime = KMimeType::mimeType( arguments().mimeType() );
KMimeType::Ptr argMime = KMimeType::mimeType( argMimeType );
// Select the "childmost" mimetype, if none of them
// inherits the other trust more what pathMime says
// but still do a second try if that one fails
if ( argMime->is( pathMime->name() ) )
if ( argMime && argMime->is( pathMime->name() ) )
{
mimes << argMime;
}
else if ( pathMime->is( argMime->name() ) )
else if ( !argMime || pathMime->is( argMime->name() ) )
{
mimes << pathMime;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment