Skip to content

PR: Improve code and UX concerning Qt WebEngine#25733

Open
rear1019 wants to merge 1 commit intospyder-ide:masterfrom
procitec:improve_webengine_handling
Open

PR: Improve code and UX concerning Qt WebEngine#25733
rear1019 wants to merge 1 commit intospyder-ide:masterfrom
procitec:improve_webengine_handling

Conversation

@rear1019
Copy link
Copy Markdown
Contributor

Description of Changes

This PR aims to improve code and UX concerning Qt WebEngine. The initial version of the PR implements a fall back to plain text in the Help plugin when Qt WebEngine is not available. If accepted, some clean-up changes will be added.

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct:

rear1019

Comment thread spyder/app/mainwindow.py
# https://github.com/spyder-ide/spyder/pull/
# 22196#issuecomment-2189377043
if PluginClass.REQUIRE_WEB_WIDGETS and (
not WEBENGINE or
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qtpy.QtWebEngineWidgets.WEBENGINE and its usage in Spyder is confusing: qtpy used to define it to differentiate between Qt WebEngine and Qt WebKit. This is also the way it is used in most places in Spyder. With WebKit gone/not used by Spyder, the differentiation between WebEngine/WebKit can be removed. I can do this as part of this PR (when the PR is accepted).

Concerning the usage in the sense "is WebEngine available", see the new spyder.app.utils.HAVE_WEBENGINE.

Comment thread spyder/app/mainwindow.py
if PluginClass.REQUIRE_WEB_WIDGETS and (
not WEBENGINE or
not HAVE_WEBENGINE or
self._cli_options.no_web_widgets
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the fallback to plaintext implemented by this PR, the command line argument --no-web-widgets can be removed, deprecated or made an no-operation.

LOG_PATH = get_conf_path(CONF_SECTION)
DISABLE_ACTIONS_WHEN_HIDDEN = False
REQUIRE_WEB_WIDGETS = True
REQUIRE_WEB_WIDGETS = False
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR implements a fallback to plain text when Qt WebEngine is not available.

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.

1 participant