Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for Qt WebEngine support - part 1 #1552

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

vedgy
Copy link
Member

@vedgy vedgy commented Sep 14, 2022

This pull request contains the first 4 commits of #1542. I hope that Qt WebEngine support can be reviewed and merged into master by degrees, starting with this PR.

See the commit messages for details.

c2cdf9b added `_=0;` at the end of
several evaluateJavaScript() scripts. I suppose this dummy statement
could have improved performance or even prevented crashes in case the
last JavaScript statement returned a large result, e.g.
`%1=window.getSelection().getRangeAt(0);`. But the return value of
Selection.removeAllRanges() is None (undefined), so `_=0;` is probably
not useful here.
Without this call QNetworkReply::isFinished() returns false even after
the finished() signal is emitted. Depending on Qt WebKit implementation,
the wrong isFinished() return value could cause a bug. For example, code
that uses a network reply may call isFinished(); connect to the
finished() signal if it returns false; use and deleteLater() the reply
immediately otherwise. If the finished() signal has been emitted
earlier, the using code would wait for it forever.
Without the QNetworkReply::setUrl() call, the reply's url() remains
empty, in which case Qt WebEngine glue code would require a workaround
to use the request's url() instead. And the workaround would not even
work in the case of BlockedNetworkReply, which does not call
QNetworkReply::setRequest().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant