summaryrefslogtreecommitdiffstats
path: root/src/core/api/qwebengineframe.cpp
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2025-09-08 10:09:43 +0200
committerMichal Klocek <michal.klocek@qt.io>2025-10-28 12:58:28 +0200
commit21ca55da00e7c4f1cf85f96b4e75085032241f56 (patch)
tree529060d86a10ab05d5583ca86c06dcf4e92050d1 /src/core/api/qwebengineframe.cpp
parent1ac574f63caec2d2070eeedc946da310d87f66be (diff)
Introduce QQuickWebEngineFrame
QWebEngineFrame class includes QJsValue in its api, however to make it work it would require instance of Qml engine. In also means that using qwebenigneframe requires Qml module. Move the methods/logic to new class qquickwebengineframe, however keep the already added SMF and default constructor. Deprecate broken usage of functions taking QJsValue. This amends 3ee3548e4c663402848db3b1336bf56e7c6d327e. Task-number: QTBUG-139710 Pick-to: 6.10 Change-Id: Ia45a52e9d8759f6a4641f8a121e8e05cd60c2eaf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Moss Heim <moss.heim@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/core/api/qwebengineframe.cpp')
-rw-r--r--src/core/api/qwebengineframe.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/api/qwebengineframe.cpp b/src/core/api/qwebengineframe.cpp
index 9b85d08d4..6bced5b06 100644
--- a/src/core/api/qwebengineframe.cpp
+++ b/src/core/api/qwebengineframe.cpp
@@ -179,6 +179,7 @@ void QWebEngineFrame::runJavaScript(const QString &script, quint32 worldId)
runJavaScript(script, worldId, std::function<void(const QVariant &)>{});
}
+#if QT_DEPRECATED_SINCE(6, 10)
void QWebEngineFrame::runJavaScript(const QString &script, const QJSValue &callback)
{
runJavaScript(script, QWebEngineScript::MainWorld, callback);
@@ -203,6 +204,7 @@ void QWebEngineFrame::runJavaScript(const QString &script, quint32 worldId,
}
runJavaScript(script, worldId, wrappedCallback);
}
+#endif // QT_DEPRECATED_SINCE(6, 10)
/*!
Renders the current content of the frame into a PDF document and saves it in the location
@@ -248,6 +250,7 @@ void QWebEngineFrame::printToPdf(const std::function<void(const QByteArray &)> &
adapter->adapterClient()->printToPdf(std::move(wrappedCallback), layout, QPageRanges(), m_id);
}
+#if QT_DEPRECATED_SINCE(6, 10)
void QWebEngineFrame::printToPdf(const QJSValue &callback)
{
LOCK_ADAPTER(adapter, );
@@ -267,6 +270,7 @@ void QWebEngineFrame::printToPdf(const QJSValue &callback)
QPageLayout layout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF());
adapter->adapterClient()->printToPdf(std::move(wrappedCallback), layout, QPageRanges(), m_id);
}
+#endif // QT_DEPRECATED_SINCE(6, 10)
/*! \fn bool QWebEngineFrame::operator==(const QWebEngineFrame &left, const QWebEngineFrame &right) noexcept