summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-06-19 16:04:54 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-06-23 06:29:31 +0000
commit0a6707ac82b9a8bd3a810035ecd8db2269352b59 (patch)
treed0dc60e643d83e53adfef35acb41f38cd15ab1a1 /src/core
parentd5de0e97e6318bf17a3dac027c299b7f202f2e58 (diff)
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 <alexandru.croitor@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/web_contents_adapter.cpp1
-rw-r--r--src/core/web_contents_adapter_client.h2
2 files changed, 1 insertions, 2 deletions
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<AuthenticationDialogController>) = 0;
virtual void runGeolocationPermissionRequest(const QUrl &securityOrigin) = 0;