Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Winkelmann
QmlSlidePrinter
Commits
2a82bd02
Commit
2a82bd02
authored
Nov 02, 2018
by
Michael Winkelmann
Browse files
Error handling in main
parent
80228398
Changes
1
Hide whitespace changes
Inline
Side-by-side
main.cpp
View file @
2a82bd02
...
...
@@ -49,10 +49,12 @@ int main(int ac, char *av[]) {
view
->
setSource
(
QUrl
::
fromLocalFile
(
inputQml
));
QmlPrinter
printer
;
printer
.
printPdf
(
outputPdfDir
.
absolutePath
(),
view
->
rootObject
());
if
(
!
printer
.
printPdf
(
outputPdfDir
.
absolutePath
(),
view
->
rootObject
()))
{
qInfo
()
<<
app
.
tr
(
"No PDF output was produced!"
);
return
EXIT_FAILURE
;
}
qInfo
()
<<
app
.
tr
(
"Writing PDF to %1"
).
arg
(
outputPdfDir
.
absolutePath
());
if
(
showPres
)
{
view
->
rootObject
()
->
setProperty
(
"currentSlide"
,
0
);
view
->
show
();
...
...
Write
Preview
Supports
Markdown
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