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

Add Qt 6 support #209

Merged
merged 12 commits into from
Nov 1, 2024
Merged

Conversation

Orochimarufan
Copy link

Here is a quick attempt to allow building against Qt 6. Qt 5.15 is still supported using conditional compilation. Very light testing was done on 6.8 and 5.15.

This only makes the minimum amount of changes necessary. Renamed classes are #included and aliased to their old name where possible and deprecated things are left alone if they are still included in 6.8 and the replacement was introduced after 5.15.

I've split up the changes into commits by what Qt6 change they address. I can squash them down if wanted.

Relevant componets were moved to webenginecore
QWebEngineDownloadItem was renamed to QWebEngineDownloadRequest and the downloadProgress signal was split into receivedBytesChanged and totalBytesChanged signals
QWebEnginePage was moved to the webenginecore module in Qt6. As such, it cannot reference QWidget from the widgets module. QWebEnginePage::view() was replaced by QWebEngineView::forPage() from the webenginewidgets module.
QWebEnginePage::certificateError() was changed from an overridable method to a signal in Qt6. The response actions are now methods on the QWebEngineCertificateError object. For some reason, said object is passed as const reference and must be const_cast before applying a resolution.
QWebEngineContextMenuData was renamed to QWebEngineContextMenuRequest in Qt6. The related methods were moved from QWebEnginePage (which moved to the webenginecore module) to QWebEngineView.
QWebEngineSettings::defaultSettings() was removed in Qt6, use QWebEngineProfile::defaultProfile()->settings() insteadd.
QStandardPaths::DataLocation was already deprecated in Qt5 and removed in Qt6. It was an alias for QStandardPaths::AppLocalDataLocation.
QDesktopWidget (and QApplication::desktop()) was removed in Qt6
QTextCodec was removed (movec to core5compat) in Qt6.
The QGeoPositionInfoSource::updateTimeout signal was removed in Qt6, with it's functionality taken over by the QGeoPositionInfoSource::errorOccured signal.
QDateTime::toTime_t() was already deprecated and replaced with QDateTime::toSecsSinceEpoch() in Qt5. It was removed in Qt6.
@keshavbhatt keshavbhatt changed the base branch from main to Orochimarufan-qt6 November 1, 2024 16:44
@keshavbhatt
Copy link
Owner

Hi @Orochimarufan Thanks for this PR.

My plan is to merge this PR in Orochimarufan-qt6 branch. In coming days before we merge these changes to main branch,
my aim is to ensure the following things:

  • snapcraft build with qt6
  • flathub build with qt6
  • test the build by making the build available to testers (snapcraft edge channel)

feel free to open any improvement PRs against the qt6 branch in this repo. To avoid conflicts we can track each issue we want to fix by opening github issue on the repo.

@keshavbhatt keshavbhatt merged commit 2370015 into keshavbhatt:Orochimarufan-qt6 Nov 1, 2024
@Orochimarufan
Copy link
Author

Very good. Is there a Flatpak beta branch as well?

@Nowa-Ammerlaan
Copy link

Possible regression: #230

Not 100% sure it's related but it happend a couple of days after rebuilding with this patch.

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.

3 participants