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

Error handling in main

parent 80228398
...@@ -49,10 +49,12 @@ int main(int ac, char *av[]) { ...@@ -49,10 +49,12 @@ int main(int ac, char *av[]) {
view->setSource(QUrl::fromLocalFile(inputQml)); view->setSource(QUrl::fromLocalFile(inputQml));
QmlPrinter printer; QmlPrinter printer;
printer.printPdf(outputPdfDir.absolutePath(), view->rootObject()); if (!printer.printPdf(outputPdfDir.absolutePath(), view->rootObject())) {
qInfo() <<"No PDF output was produced!");
qInfo() <<"Writing PDF to %1").arg(outputPdfDir.absolutePath()); qInfo() <<"Writing PDF to %1").arg(outputPdfDir.absolutePath());
if (showPres) { if (showPres) {
view->rootObject()->setProperty("currentSlide", 0); view->rootObject()->setProperty("currentSlide", 0);
view->show(); view->show();
Supports Markdown
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