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

Port to Qt WebEngine (fixes Windows build) #5

Merged
merged 4 commits into from
Nov 4, 2018
Merged

Port to Qt WebEngine (fixes Windows build) #5

merged 4 commits into from
Nov 4, 2018

Conversation

mvf
Copy link
Owner

@mvf mvf commented Nov 4, 2018

(Relates to #4)

For displaying web pages, qolibri was using the Qt WebKit library, which
was removed years ago with Qt 5.6. These days it's pretty much only
still available on GNU/Linux and the BSDs, where distros maintain it to
keep old apps working for now.

This PR ports to Qt WebKit's Chromium-based successor Qt WebEngine.

Among other things, this fixes Windows builds (only tested with official
prebuilt Qt 5.11.2 on Windows 10 x64 with VS2017 compiler):

qolibri-win

The Qt WebKit Widgets API has both a QWebPage and a QWebView class.
Counterintuitively, WebPage inherits from QWebView. The port to Qt
WebEngine Widgets will require subclassing the counterparts of both
classes, so rename now to avoid more confusion in the future.
WebView had two ctors, one for when the page should be loaded directly
from a URL and one when the URL was to be combined with a search query
first. Both had lots of common code that was clumped together with
loading code that doesn't belong in a ctor.

This change makes it so there's a single ctor and loading has to be
explicitly initiated by calling load(). Still far from pretty, but
removes lots of redundancy.
For displaying web pages, qolibri was using the Qt WebKit library, which
was removed years ago with Qt 5.6. These days it's pretty much only
still available on GNU/Linux and the BSDs, where distros maintain it to
keep old apps working for now.

This change ports to Qt WebKit's Chromium-based successor Qt WebEngine.

Among other things, this fixes Windows builds (only tested with official
prebuilt Qt 5.11.2 on Windows 10 x64 with VS2017 compiler).
@ivan
Copy link
Contributor

ivan commented Nov 4, 2018

Thanks so much for fixing this and sending the PR. I didn't see any regressions on Debian, so I am going to push a commit with this merged shortly.

@ivan ivan merged commit 1a99a7d into mvf:prime Nov 4, 2018
@mvf mvf deleted the pr/webengine branch November 5, 2018 07:09
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.

2 participants