summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2016-11-28 11:19:50 +0100
committerJani Heikkinen <jani.heikkinen@qt.io>2016-12-01 11:15:24 +0000
commit000b58022c9f7b2d7af2d5c6fa8ca1609dc2a5bd (patch)
tree94e7a4df7ee31b0746a853135ab58f59f674a263
parent16e3472de276d5f0d5bab9ef7d9aec1031d68d58 (diff)
Fix build when PDF support is disabled
Wrap unused parameters. Change-Id: Iac550783a55b3fc585db6f7b8241aa2ae89fdf2e Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-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)
}