Bug 416539 - Partially load extensions before any QWebEngine class is created
Summary: Partially load extensions before any QWebEngine class is created
Status: RESOLVED INTENTIONAL
Alias: None
Product: Falkon
Classification: Applications
Component: extensions (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-21 15:32 UTC by Juraj
Modified: 2023-04-04 07:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juraj 2020-01-21 15:32:57 UTC
SUMMARY
Plugins which wants to install their own schemes (KDE integration with KIO) needs to be preloaded before any QWebEngine class is created.
See docs for more details:
https://doc.qt.io/qt-5/qwebengineurlscheme.html#details


STEPS TO REPRODUCE
1. Start Falkon with KDE integration plugin enabled or enable this plugin later
2. Check the console output

OBSERVED RESULT
QWebEngineUrlScheme::registerScheme() before installing the custom scheme handler.
Please register the custom scheme '<name>' via QWebEngineUrlScheme::registerScheme() before installing the custom scheme handler.

EXPECTED RESULT
Schemes are registered and works, no more warning messages.

SUGGESTION:
I would add new variable into .desktop (basic plugin information) file called "needPreload" or something similar.
Cut the loading code of plugins into more parts which will be called separately.
One to load and run preload() before almost anything is ready and second after things are ready (at current position).

The last option is to register all possible schemes which is a waste.
Also we can consider adding a field to .desktop file in which we would specify the schemes, but this is not cumbersome and would require a lot of work especially when it come to KIO schemed which can be anything.

SOFTWARE/OS VERSIONS
Qt Version: 5.14

ADDITIONAL INFORMATION
Also some internal parts needs to be modified.
Plugins loaded while Falkon is running will not be able to register custom scheme.
Comment 1 Juraj 2023-04-04 07:41:09 UTC
OK, came up with other method to solve the scheme issue.