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.