Skip to content

Fix KWallet integration when opening pages in a new tab by using WebEnginePart::createWindow

Previously, when a new WebEnginePart was created from WebEnginePage::createWindow, the associated page wouldn't work with KWallet because the required javascript scripts wouldn't have been injected in it. This happened because the scripts were injected from the part constructor, but the page was later changed (from NewWindowPage::acceptNavigationRequest) and the original page was discarded. This meant that only the discarded page would end up with the scripts, while the real page wouldn't have them.

To avoid this, the code to inject scripts has been moved to a separate function which is called both by the part's constructor and from NewWindowPage::acceptNavigationRequest.

While fixing this issue, I also moved the Wallet instance from the page to the part.

Merge request reports