Skip to content
Commit e6bf0d7c authored by Stefano Crocco's avatar Stefano Crocco
Browse files

Make plugins using the KParts::SelectorInterface work with WebEnginePart

The plugins affected by this merge request are:
- Akregator plugin
- KGet plugin
- OpenSearch plugin

They stopped working because `WebEnginePart` doesn't really support the `KParts::SelectorInterface` interface, which is required by these plugins to work (it did derive from `KParts::SelectorInterface`, but it always claimed it couldn't find any element).

The problem is that `KParts::SelectorInterface` has a synchronous API, but `QWebEnginePage` only provides asynchronous access to the page contents (using javascript). To make the plugins work, a new interface, `AsyncSelectorInterface`, has been introduced: it mimics the API from `KParts::SelectorInterface` but it's asynchronous: `WebEnginePart` derives from it and doesn't derive from `KParts::SelectorInterface` anymore. 

Currently, the plugins have been changed to support both interfaces; support from `KParts::SelectorInterface` may be removed after switching to KF6, where the parts implementing it won't exist anymore.
parent 15b1be43
Pipeline #425204 passed with stage
in 8 minutes and 26 seconds
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