Skip to content

Qt5 migration#14

Merged
magist3r merged 24 commits into
masterfrom
qt5-migration
Jul 3, 2026
Merged

Qt5 migration#14
magist3r merged 24 commits into
masterfrom
qt5-migration

Conversation

@magist3r

Copy link
Copy Markdown
Owner
  • Migrates the static toolchain from Qt 5.5.1 to Qt 5.15.17 with standalone QtWebKit snapshot build support.
  • Refactors Docker build entrypoints and shared toolchain defaults.
  • Adds QtWebKit smoke build support, Docker-backed analysis, and GitHub Actions CI stages for Qt, QtWebKit, and QtWeb.
  • Updates browser source for Qt5 compatibility and low-risk clang-tidy/GCC cleanup.
  • Adds release packaging for built static Qt/QtWebKit toolchain artifacts.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5883cfc12b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

local webkit_module_pri="${INSTALL_DIR}/mkspecs/modules/qt_lib_webkit.pri"
local webkitwidgets_module_pri="${INSTALL_DIR}/mkspecs/modules/qt_lib_webkitwidgets.pri"
local install_lib_expr='$$QT_MODULE_LIB_BASE'
local webkit_private_libs="-L${install_lib_expr} -lWebCore -lPAL -lJavaScriptCore -lWTF ${SYSTEM_LIB_DIR}/libxml2.a ${SYSTEM_LIB_DIR}/liblzma.a ${SYSTEM_LIB_DIR}/libicui18n.a ${SYSTEM_LIB_DIR}/libicuuc.a ${SYSTEM_LIB_DIR}/libicudata.a ${SYSTEM_LIB_DIR}/libsqlite3.a -lz -lbmalloc ${SYSTEM_LIB_DIR}/libhyphen.a -lharfbuzz-icu -latomic"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep WebKit metadata pointing at bundled ICU

When the generated qt_lib_webkit.pri is consumed by build-browser-docker.sh/published toolchain users, this rewrite makes qmake link against absolute system ICU archives from /usr/lib/x86_64-linux-gnu instead of the icu-static tree that was built and packaged with the Qt toolchain. This works only in the exact Docker image with matching libicu-dev; unpacking the release artifact elsewhere, or changing the image ICU version, leaves consumers with missing or mismatched ICU libraries despite the bundled ICU archives being present.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

👍

Comment thread .github/workflows/qt5-static.yml Outdated
artifacts/qt5-static-${{ env.QT_VERSION }}-${{ env.BUILD_TYPE }}/icu-static
artifacts/qt5-static-${{ env.QT_VERSION }}-${{ env.BUILD_TYPE }}/logs
artifacts/qt5-static-${{ env.QT_VERSION }}-${{ env.BUILD_TYPE }}/build-manifest.txt
key: qt5-static-${{ runner.os }}-${{ env.BUILD_TYPE }}-${{ hashFiles('toolchains/qt5-static/sources-qt.lock', 'toolchains/qt5-static/patches/qt/*.patch') }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include build scripts in toolchain cache keys

These cache keys are based only on source locks and patches, so changes to the Dockerfile or the entrypoint scripts that alter configure flags, dependency versions, or metadata rewrites will still restore an old toolchain and skip the rebuild in CI. In particular, the tag publishing jobs restore the same cache keys, so a release after changing qt5-static-build-entrypoint.sh or Dockerfile can upload stale artifacts rather than artifacts produced by the current build logic.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

👍

@magist3r
magist3r force-pushed the qt5-migration branch 5 times, most recently from 44e8d24 to 16f870b Compare May 18, 2026 14:22
@magist3r

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9b55620dc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/tabwidget.cpp Outdated
QFile file(QLatin1String(":/Welcome.html"));
bool isOpened = file.open(QIODevice::ReadOnly | QIODevice::Text);
Q_ASSERT(isOpened);
Q_ASSERT(file.open(QIODevice::ReadOnly | QIODevice::Text));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Open welcome-page resource outside debug-only assert

Q_ASSERT is compiled out in release builds (QT_NO_DEBUG), so file.open(...) is never executed when the "new tab action" is the welcome page. That leaves file.readAll() reading from a closed file, so the welcome page content becomes empty in normal release binaries. Open the file in a regular statement and assert/check the result separately.

Useful? React with 👍 / 👎.

@magist3r
magist3r force-pushed the qt5-migration branch 5 times, most recently from 19e9687 to e6847c4 Compare June 1, 2026 13:30
magist3r and others added 15 commits July 3, 2026 21:22
Add clang-tidy support to the Docker browser build, capture compiler warnings into a separate report, and document the static analysis approach.

Co-authored-by: Codex <codex@openai.com>
Clear the remaining browser-source GCC warnings by removing unused locals and parameters, fixing constructor initialization order, and cleaning up small warning-triggering code patterns.

The only warning left after validation comes from the bundled libqjp2 static library in the Qt toolchain, not from QtWeb sources.

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Ignore the local .codex marker and add the repository VS Code watcher/search excludes.

Co-authored-by: Codex <codex@openai.com>
Retarget the Docker-based Qt5 static build to Qt 5.15.17 and build QtWebKit 5.212 separately against the installed prefix.

This also updates the browser and smoke helper script names plus the supporting docs to match the new flow.

Co-authored-by: Codex <codex@openai.com>
Cap QtWebKit Ninja jobs at 16 while leaving the general build job count unchanged for the rest of the static toolchain.

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Switch the QtWebKit source lock to the 2022-09-07 snapshot and add the static-build patch set.

Disable dependency-heavy QtWebKit features for the static build, including WebKit2, Web Crypto, XSLT, WOFF2, video/media paths, and Qt Quick/WebChannel integration.

Adjust Docker dependencies and installed qmake metadata for the resulting static link.

Remove QtWeb's obsolete NPAPI plug-in UI, settings, and dead WebPage plug-in hook now that the updated QtWebKit build no longer exposes QWebSettings::PluginsEnabled.

Co-authored-by: Codex <codex@openai.com>
Keep the Qt and QtWebKit source checksums in separate lock files so cache keys can track each build stage independently.

Co-authored-by: Codex <codex@openai.com>
Use the Docker image ICU headers and static archives instead of downloading and building a locked ICU source archive.

Drop the icu-static artifact from CI caches and release packages, and record ICU as a system-package input in the build manifest.

Co-authored-by: Codex <codex@openai.com>
Add --check mode to the smoke and browser runner scripts so CI and local validation can use the same xvfb-backed host-side flow. Document the smoke and browser check commands as the only runtime-check path for agents.

Co-authored-by: Codex <codex@openai.com>
Replace the migration planning docs with a concise migration status and
implementation plan split. Document the policy for moving completed work
from the plan into migration status.

Clean up the stale qt5-static-poc image tag name.

Co-authored-by: Codex <codex@openai.com>
magist3r and others added 8 commits July 3, 2026 21:22
Build Qt5, QtWebKit, and QtWeb in separate GitHub Actions jobs with cache keys based on the static toolchain inputs. Publish Qt5 and QtWebKit toolchain release assets for tag builds.

Keep CI smoke runtime checks disabled while preserving the build and shared dependency checks.

Co-authored-by: Codex <codex@openai.com>
Upload Qt5 and QtWebKit toolchain tarballs as workflow artifacts on non-tag builds while keeping release uploads tag-only.

Co-authored-by: Codex <codex@openai.com>
Remove the app-level qmake static CONFIG flag from the browser project.
The Qt installation used by the Docker toolchain is already static, and
its module metadata records ICU and harfbuzz-icu dependencies as absolute
static archive paths.

Leaving CONFIG+=static on the application caused qmake to rewrite some of
those archive paths into generic -l flags in the generated browser link
line. With the linker back in dynamic mode at that point, those names
resolved to shared ICU and harfbuzz-icu libraries, adding runtime
DT_NEEDED entries that the dependency checker correctly rejected.

Let the static Qt module metadata drive the link line instead, matching
the smoke test project and preserving the intended static ICU linkage.

Co-authored-by: Codex <codex@openai.com>
Make --check run only shared dependency validation so CI can use it
without requiring Xvfb. Keep the old Xvfb-backed launch path available
behind --runtime-check.

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Add a dedicated .agents build runner for long static Qt 5 debug builds so the
main agent can delegate monitored build execution without touching unrelated
state.

Document when to use that runner, record the expected local validation scope,
and keep the .agents build runner configuration tracked despite the build-* ignore
pattern.

Co-authored-by: Codex <codex@openai.com>
Disable qmake's automatic plugin import path for static Unix builds and list the
Qt platform, image format, and bearer plugins required by the browser and
QtWebKit smoke-test targets.

Add matching staticplugins.cpp import units for both targets so static builds
pull in the required plugin symbols explicitly.

Co-authored-by: Codex <codex@openai.com>
Print the raw ldd output separately from the dependency check summary so captured
logs show both the observed linker state and the interpreted result.

Treat missing libraries from the allowed shared-dependency list as warnings, while
still failing for missing or linked libraries outside that list. This keeps checks
useful on hosts that do not have every allowed runtime library installed.

Lower the QtWebKit build job cap from 16 to 12 to reduce resource pressure during
static builds.

Co-authored-by: Codex <codex@openai.com>
Add planned items for removing deprecated Qt API usage (QRegExp,
QString::SkipEmptyParts, QDesktopWidget, qrand, Q_ENUMS, Q_FOREACH,
string-based signal/slot connections), reviewing the QTextCodec
encoding paths and the remaining QFtp download path, and constrain
Qt6 planning to a QtWebKit-preserving migration with a compatibility
review of the QWebView/QWebPage browser surface.

Co-Authored-By: Claude <noreply@anthropic.com>
@magist3r
magist3r merged commit e5eda80 into master Jul 3, 2026
5 checks passed
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