the features introduced in upstream ,to expose minimum api is already implemented in webchannel
so all the implementation in the upstream has been ignored.
https://doc.qt.io/archives/qt-5.5/qtwebkit-bridge.html#internet-security
Qt WebKit Bridge documentation recommends:
When exposing native objects to an open web environment, it is
important to understand the security implications. Think whether the
exposed object enables the web environment access things that
shouldn't be open, and whether the web content loaded by that web page
comes from a trusted source.
The author of Qt WebChannel has said the following in a talk that
introduced this Qt module (WebKit Bridge replacement for Qt WebEngine):
My suggestion here is to write dedicated QObjects with a slim, minimal
API that only have the signals and methods that you deem safe to be
used from the outside.
- see a comment under https://redirect.invidious.io/watch?v=KnvnTi6XafA
The default qmake build output is overly verbose. Adding the "silent"
switch to CONFIG makes it much more concise, comparable to default CMake
output. This way warnings and errors are much easier to find.
Adding CONFIG-=silent to the qmake command line doesn't restore the
verbosity because it is applied before the "CONFIG += silent" line in
goldendict.pro. Add a new CONFIG switch "verbose_build_output" to allow
increasing build log verbosity without editing goldendict.pro.
MainWindow::showTranslationFor() overloads disable the "Pronounce Word"
action, then call ArticleView::showDefinition(). And then immediately
update pronounce availability, Found in Dictionaries list, Back and
Forward buttons. Since ArticleView::showDefinition() loads the requested
page asynchronously, the previous page is still current. Therefore the
"Pronounce Word" action is immediately re-enabled (if the still-current
article has sounds), the other state updates have no effect whatsoever.
Once the new page is loaded, the state is updated again in
MainWindow::pageLoaded() - this time with the desired effect.
So the only effect of the state updates in
MainWindow::showTranslationFor() is to revert the intentional disabling
of the "Pronounce Word" action. Plus waste some CPU time. The
pronunciation-disabling behavior looks better to me and is consistent
with the scan popup's behavior (which immediately hides the
"Pronounce Word" button).