Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
6.2.4, 6.3.0
-
None
Description
On Linux (Ubuntu), WebEngine fails to load an html page that uses a qrc: scheme. This works in 5.15.
Included in this bug report is a qmake project demonstrating the bug and a workaround.
The project installs two custom scheme handlers as well:
p4qrc: This scheme handler returns the contents using QFile a QMimeDatabase
p4qrc2: This scheme handler is the same, but doesn't use QMimeDatabase for resources with .html as their extension and instead always returns text/html.
The project runs 5 tests:
- Try to load the index page using a resource path and QFile
- Try to load the index page using QNetworkRequest an QUrl (with a qrc: scheme)
- Try to load the index page using a qrc: scheme
- Try to load the index page using a p4qrc: scheme
- Try to load the index page using a p4qrc2: scheme
On Linux with Qt6, loading a qrc: scheme fails. Loading a p4qrc: scheme also fails because the returned mime-type application/x-extension-html isn't accepted by WebEnigne. Loading a p4qrc2: scheme finally passes because it passes a the mime-type that WebEngine recognizes.
It's possible that the underlying problem isn't a WebEngine problem at all, but rather a QMimeDatabase problem.