From 0a6707ac82b9a8bd3a810035ecd8db2269352b59 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 19 Jun 2017 16:04:54 +0200 Subject: Fix crash when accessibility is disabled With the no-accessibility feature moved to qtgui-config, we don't always include it where web_content_apapter_client.h is included, which gives it an inconsistent binary layout. Solve it by making the optional method always defined as it doesn't rely on anything from accessibility. Task-number: QTBUG-61200 Change-Id: I65f34ab2b6763f3166b945e700994bd8d019a835 Reviewed-by: Alexandru Croitor --- src/core/web_contents_adapter.cpp | 1 + src/core/web_contents_adapter_client.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 8430ff710..93e8674bd 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -403,6 +403,7 @@ void WebContentsAdapter::initialize(WebContentsAdapterClient *adapterClient) // We keep a reference to browserContextAdapter to keep it alive as long as we use it. // This is needed in case the QML WebEngineProfile is garbage collected before the WebEnginePage. d->browserContextAdapter = adapterClient->browserContextAdapter(); + Q_ASSERT(d->browserContextAdapter); // Create our own if a WebContents wasn't provided at construction. if (!d->webContents) diff --git a/src/core/web_contents_adapter_client.h b/src/core/web_contents_adapter_client.h index 055cefa6f..e1fb3dc4c 100644 --- a/src/core/web_contents_adapter_client.h +++ b/src/core/web_contents_adapter_client.h @@ -350,9 +350,7 @@ public: virtual void passOnFocus(bool reverse) = 0; // returns the last QObject (QWidget/QQuickItem) based object in the accessibility // hierarchy before going into the BrowserAccessibility tree -#ifndef QT_NO_ACCESSIBILITY virtual QObject *accessibilityParentObject() = 0; -#endif // QT_NO_ACCESSIBILITY virtual void javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString& message, int lineNumber, const QString& sourceID) = 0; virtual void authenticationRequired(QSharedPointer) = 0; virtual void runGeolocationPermissionRequest(const QUrl &securityOrigin) = 0; -- cgit v1.2.3