Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Tusooa Zhu
Krita
Commits
9d6097e2
Commit
9d6097e2
authored
Jun 24, 2019
by
Halla Rempt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return booleans, not ints, so the --export option returns 0 on success
BUG:409133
parent
9a929e16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
libs/ui/KisApplication.cpp
libs/ui/KisApplication.cpp
+6
-6
No files found.
libs/ui/KisApplication.cpp
View file @
9d6097e2
...
...
@@ -534,7 +534,7 @@ bool KisApplication::start(const KisApplicationArguments &args)
QString
outputMimetype
=
KisMimeDatabase
::
mimeTypeForFile
(
exportFileName
,
false
);
if
(
outputMimetype
==
"application/octetstream"
)
{
dbgKrita
<<
i18n
(
"Mimetype not found, try using the -mimetype option"
)
<<
endl
;
return
1
;
return
false
;
}
KisDocument
*
doc
=
kisPart
->
createDocument
();
...
...
@@ -544,13 +544,13 @@ bool KisApplication::start(const KisApplicationArguments &args)
if
(
!
result
)
{
errKrita
<<
"Could not load "
<<
fileName
<<
":"
<<
doc
->
errorMessage
();
QTimer
::
singleShot
(
0
,
this
,
SLOT
(
quit
()));
return
1
;
return
false
;
}
if
(
exportFileName
.
isEmpty
())
{
errKrita
<<
"Export destination is not specified for"
<<
fileName
<<
"Please specify export destination with --export-filename option"
;
QTimer
::
singleShot
(
0
,
this
,
SLOT
(
quit
()));
return
1
;
return
false
;
}
qApp
->
processEvents
();
// For vector layers to be updated
...
...
@@ -560,7 +560,7 @@ bool KisApplication::start(const KisApplicationArguments &args)
errKrita
<<
"Could not export "
<<
fileName
<<
"to"
<<
exportFileName
<<
":"
<<
doc
->
errorMessage
();
}
QTimer
::
singleShot
(
0
,
this
,
SLOT
(
quit
()));
return
0
;
return
true
;
}
else
if
(
exportSequence
)
{
KisDocument
*
doc
=
kisPart
->
createDocument
();
...
...
@@ -571,7 +571,7 @@ bool KisApplication::start(const KisApplicationArguments &args)
if
(
!
doc
->
image
()
->
animationInterface
()
->
hasAnimation
())
{
errKrita
<<
"This file has no animation."
<<
endl
;
QTimer
::
singleShot
(
0
,
this
,
SLOT
(
quit
()));
return
1
;
return
false
;
}
doc
->
setFileBatchMode
(
true
);
...
...
@@ -589,7 +589,7 @@ bool KisApplication::start(const KisApplicationArguments &args)
errKrita
<<
i18n
(
"Failed to render animation frames!"
)
<<
endl
;
}
QTimer
::
singleShot
(
0
,
this
,
SLOT
(
quit
()));
return
0
;
return
true
;
}
else
if
(
d
->
mainWindow
)
{
if
(
fileName
.
endsWith
(
".bundle"
))
{
...
...
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