Commit 2a82bd02 authored by Michael Winkelmann's avatar Michael Winkelmann

Error handling in main

parent 80228398
......@@ -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();
......
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