Skip to content
Commit c13410b0 authored by Igor Kushnir's avatar Igor Kushnir
Browse files

Register "qthelp" Web Engine URL scheme

From the documentation for QWebEngineUrlScheme::registerScheme():
  It is recommended that all custom URL schemes are first registered
  with this function at application startup, even if the default options
  are to be used.
  Warning: This function must be called early at application startup,
  before creating any WebEngine classes. Late calls will be ignored.
=> register the scheme early at KDevelop's start to ensure it is not
ignored. DocumentationController's constructor is called once and before
plugins (which may create WebEngine classes) are loaded.

This gets rid of the following warning in KDevelop's output:
  Please register the custom scheme 'qthelp' via
  QWebEngineUrlScheme::registerScheme() before installing the custom
  scheme handler.

Don't set the scheme syntax or flags. I have tried to set syntax to Host
and flags to LocalScheme|LocalAccessAllowed, but haven't noticed any
effect. In particular, the following type of warning in KDevelop's
output wasn't eliminated by such tentative changes:
  js: Not allowed to load local resource: file:///tmp/kdevelop.qWHueg

!108 first
tried to register this scheme more than two years ago, but the
registering was reverted as unrelated to the topic of the merge request.
Note that the comment "Needs some ifqtversion>=5.12, same for #include"
from that merge request is no longer relevant as KDevelop requires
Qt 5.15.0 or later.
parent 9bd579b2
Pipeline #192611 passed with stage
in 18 minutes and 23 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