summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.h
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2018-08-31 10:29:07 +0200
committerMichal Klocek <michal.klocek@qt.io>2018-09-12 10:22:28 +0000
commita5e680c2ef404693870aedfb10f22ffc83cd38e7 (patch)
treedcaf1c152848cb5cc0b710e241661b87e83bafa1 /src/core/web_contents_adapter.h
parent5b5b7d9a5f922ef5fa99cfac41da348e23970032 (diff)
Fix issues with qml bindings accessing non-existing adapter
We have currently two levels of initialization for WebEngineView: the profile initialization and the adapter initialization. The adapter initialization is delayed to first navigation request to pick the right initial site instance and avoid creating dummy/blank WebContents, which in turn would start unnecessary render process. Profile initialization is delayed to make sure we avoid unnecessary default profile creations. Created profiles use filestorage. Unfortunately qml will call QQuickItem::componentComplete() only when the root element is completed and the bindings can be already in use by that time. Profile initialization has to take place before adapter initialization. Construct adapter together with WebEngineView, but create and initialize profile before adapter initialization. Go through WebEngineView and fix emitting signals based on adapter initialization. Most of the signals are emitted on initializationFinished(). Task-number: QTBUG-70248 Change-Id: I2acd8bff761c692a360733cbf537de53e1295695 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_contents_adapter.h')
-rw-r--r--src/core/web_contents_adapter.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h
index 99114546d..fcdac94b8 100644
--- a/src/core/web_contents_adapter.h
+++ b/src/core/web_contents_adapter.h
@@ -187,7 +187,7 @@ public:
void grantMouseLockPermission(bool granted);
void dpiScaleChanged();
- void backgroundColorChanged();
+ void setBackgroundColor(const QColor &color);
QAccessibleInterface *browserAccessible();
ProfileQt* profile();
ProfileAdapter* profileAdapter();