Commit bfff8055 authored by Laurent Montel's avatar Laurent Montel
Browse files

Connect before calling code

parent d6c60a78
Pipeline #46653 passed with stage
in 28 minutes and 18 seconds
......@@ -2372,8 +2372,8 @@ void ViewerPrivate::slotPrintMessage()
return;
}
if (dialog->printer()->outputFormat() == QPrinter::PdfFormat) {
mViewer->page()->printToPdf(dialog->printer()->outputFileName(), dialog->printer()->pageLayout());
connect(mViewer->page(), &QWebEnginePage::pdfPrintingFinished, this, &ViewerPrivate::slotPdfPrintingFinished);
mViewer->page()->printToPdf(dialog->printer()->outputFileName(), dialog->printer()->pageLayout());
} else {
mViewer->page()->print(mCurrentPrinter, invoke(this, &ViewerPrivate::slotHandlePagePrinted));
}
......
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