summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/webengine/api/qquickwebengineview.cpp7
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp5
2 files changed, 12 insertions, 0 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 3830a3ea..f5350f53 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -1309,6 +1309,10 @@ void QQuickWebEngineView::printToPdf(const QString& filePath, PrintedPageSizeId
QPageLayout pageLayout(layoutSize, layoutOrientation, QMarginsF(0.0, 0.0, 0.0, 0.0));
d->adapter->printToPDF(pageLayout, filePath);
+#else
+ Q_UNUSED(filePath);
+ Q_UNUSED(pageSizeId);
+ Q_UNUSED(orientation);
#endif
}
@@ -1326,6 +1330,9 @@ void QQuickWebEngineView::printToPdf(const QJSValue &callback, PrintedPageSizeId
quint64 requestId = d->adapter->printToPDFCallbackResult(pageLayout);
d->m_callbacks.insert(requestId, callback);
#else
+ Q_UNUSED(pageSizeId);
+ Q_UNUSED(orientation);
+
// Call back with null result.
QJSValueList args;
args.append(QJSValue(QByteArray().data()));
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index f769ea0f..16e9438c 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -1957,6 +1957,9 @@ void QWebEnginePage::printToPdf(const QString &filePath, const QPageLayout &page
}
#endif
d->adapter->printToPDF(pageLayout, filePath);
+#else
+ Q_UNUSED(filePath);
+ Q_UNUSED(pageLayout);
#endif // if defined(ENABLE_PDF)
}
@@ -1990,6 +1993,7 @@ void QWebEnginePage::printToPdf(const QWebEngineCallback<const QByteArray&> &res
quint64 requestId = d->adapter->printToPDFCallbackResult(pageLayout);
d->m_callbacks.registerCallback(requestId, resultCallback);
#else // if defined(ENABLE_PDF)
+ Q_UNUSED(pageLayout);
d->m_callbacks.invokeEmpty(resultCallback);
#endif // if defined(ENABLE_PDF)
}
@@ -2025,6 +2029,7 @@ void QWebEnginePage::print(QPrinter *printer, const QWebEngineCallback<bool> &re
quint64 requestId = d->adapter->printToPDFCallbackResult(printer->pageLayout(), printer->colorMode() == QPrinter::Color);
d->m_callbacks.registerCallback(requestId, resultCallback);
#else // if defined(ENABLE_PDF)
+ Q_UNUSED(printer);
d->m_callbacks.invokeDirectly(resultCallback, false);
#endif // if defined(ENABLE_PDF)
}