Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Joao Oliveira
Okular
Commits
24006bb9
Commit
24006bb9
authored
Jan 29, 2015
by
Albert Astals Cid
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/Applications/14.12'
Conflicts: VERSION core/version.h
parents
557b5447
4ad7da97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
part.cpp
part.cpp
+6
-4
No files found.
part.cpp
View file @
24006bb9
...
@@ -1325,18 +1325,20 @@ bool Part::openFile()
...
@@ -1325,18 +1325,20 @@ bool Part::openFile()
if
(
!
isstdin
&&
!
fileInfo
.
exists
()
)
if
(
!
isstdin
&&
!
fileInfo
.
exists
()
)
return
false
;
return
false
;
KMimeType
::
Ptr
pathMime
=
KMimeType
::
findByPath
(
fileNameToOpen
);
KMimeType
::
Ptr
pathMime
=
KMimeType
::
findByPath
(
fileNameToOpen
);
if
(
!
arguments
().
mimeType
().
isEmpty
()
)
const
QString
argMimeType
=
arguments
().
mimeType
();
if
(
!
argMimeType
.
isEmpty
()
)
{
{
KMimeType
::
Ptr
argMime
=
KMimeType
::
mimeType
(
arg
uments
().
m
imeType
()
);
KMimeType
::
Ptr
argMime
=
KMimeType
::
mimeType
(
arg
M
imeType
);
// Select the "childmost" mimetype, if none of them
// Select the "childmost" mimetype, if none of them
// inherits the other trust more what pathMime says
// inherits the other trust more what pathMime says
// but still do a second try if that one fails
// but still do a second try if that one fails
if
(
argMime
->
is
(
pathMime
->
name
()
)
)
if
(
argMime
&&
argMime
->
is
(
pathMime
->
name
()
)
)
{
{
mimes
<<
argMime
;
mimes
<<
argMime
;
}
}
else
if
(
pathMime
->
is
(
argMime
->
name
()
)
)
else
if
(
!
argMime
||
pathMime
->
is
(
argMime
->
name
()
)
)
{
{
mimes
<<
pathMime
;
mimes
<<
pathMime
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment