diff options
| author | Michal Klocek <michal.klocek@qt.io> | 2025-11-20 10:54:00 +0100 |
|---|---|---|
| committer | Michal Klocek <michal.klocek@qt.io> | 2025-11-27 09:57:13 +0100 |
| commit | 95a53e2467029e917d6d421a357c13d51aaa44db (patch) | |
| tree | 6aafb348744ab0238eb0bcfbf8fc00057a01fd86 /src/plugins/windows | |
| parent | ddb86461871086d3ea5f9b6d58838a2dca427a0c (diff) | |
Pass the pointer to QWebView for private counterpart
QAbstarctWebView is going to be base class of pimpl
for QWebView.
Change-Id: I58636bc5017092e1b9360d05109a305d49899043
Reviewed-by: Kaloyan Chehlarski <kaloyan.chehlarski@qt.io>
Reviewed-by: Moss Heim <moss.heim@qt.io>
Diffstat (limited to 'src/plugins/windows')
| -rw-r--r-- | src/plugins/windows/qwebview2webview.cpp | 4 | ||||
| -rw-r--r-- | src/plugins/windows/qwebview2webview_p.h | 2 | ||||
| -rw-r--r-- | src/plugins/windows/qwebview2webviewplugin.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/windows/qwebview2webview.cpp b/src/plugins/windows/qwebview2webview.cpp index 0741261..6e71267 100644 --- a/src/plugins/windows/qwebview2webview.cpp +++ b/src/plugins/windows/qwebview2webview.cpp @@ -105,8 +105,8 @@ void QWebview2WebViewSettingsPrivate::setAllowFileAccess(bool enabled) m_allowFileAccess = enabled; } -QWebView2WebViewPrivate::QWebView2WebViewPrivate(QObject *parent) - : QAbstractWebView(parent), +QWebView2WebViewPrivate::QWebView2WebViewPrivate(QWebView *view) + : QAbstractWebView(view), m_settings(new QWebview2WebViewSettingsPrivate(this)), m_window(new QWindow), m_isLoading(false) diff --git a/src/plugins/windows/qwebview2webview_p.h b/src/plugins/windows/qwebview2webview_p.h index 44abc7f..2aa07d4 100644 --- a/src/plugins/windows/qwebview2webview_p.h +++ b/src/plugins/windows/qwebview2webview_p.h @@ -62,7 +62,7 @@ class QWebView2WebViewPrivate : public QAbstractWebView { Q_OBJECT public: - explicit QWebView2WebViewPrivate(QObject *parent = nullptr); + explicit QWebView2WebViewPrivate(QWebView *view); ~QWebView2WebViewPrivate() override; QString httpUserAgent() const override; diff --git a/src/plugins/windows/qwebview2webviewplugin.cpp b/src/plugins/windows/qwebview2webviewplugin.cpp index c674df3..e8a0432 100644 --- a/src/plugins/windows/qwebview2webviewplugin.cpp +++ b/src/plugins/windows/qwebview2webviewplugin.cpp @@ -13,9 +13,9 @@ class QWebView2WebViewPlugin : public QWebViewPlugin Q_PLUGIN_METADATA(IID QWebViewPluginInterface_iid FILE "windows.json") public: - QAbstractWebView *create(const QString &key) const override + QAbstractWebView *create(const QString &key, QWebView *view) const override { - return (key == QLatin1String("webview")) ? new QWebView2WebViewPrivate() : nullptr; + return (key == QLatin1String("webview")) ? new QWebView2WebViewPrivate(view) : nullptr; } }; |
