Commit 1bc86552 authored by Laurent Montel's avatar Laurent Montel 😁

We can't use print with qt < 5.8

parent 1f4b8047
...@@ -99,6 +99,7 @@ void WebEnginePage::javaScriptConsoleMessage(QWebEnginePage::JavaScriptConsoleMe ...@@ -99,6 +99,7 @@ void WebEnginePage::javaScriptConsoleMessage(QWebEnginePage::JavaScriptConsoleMe
bool WebEnginePage::execPrintPreviewPage(QPrinter *printer, int timeout) bool WebEnginePage::execPrintPreviewPage(QPrinter *printer, int timeout)
{ {
#ifndef WEBENGINEVIEWER_PRINT_SUPPORT
QPointer<QEventLoop> loop = new QEventLoop; QPointer<QEventLoop> loop = new QEventLoop;
bool result = false; bool result = false;
QTimer::singleShot(timeout, loop.data(), &QEventLoop::quit); QTimer::singleShot(timeout, loop.data(), &QEventLoop::quit);
...@@ -114,4 +115,7 @@ bool WebEnginePage::execPrintPreviewPage(QPrinter *printer, int timeout) ...@@ -114,4 +115,7 @@ bool WebEnginePage::execPrintPreviewPage(QPrinter *printer, int timeout)
delete loop; delete loop;
return result; return result;
#else
return false;
#endif
} }
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