Commit a5e680c2 authored by Michal Klocek's avatar Michal Klocek
Browse files

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: default avatarAllan Sandfeld Jensen <allan.jensen@qt.io>
parent 5b5b7d9a
Showing with 181 additions and 83 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment