qml: Compile application sources ahead of time - #863
Open
johnny9 wants to merge 1 commit into
Open
Conversation
johnny9
force-pushed
the
codex/695-854-qml-cache
branch
from
August 18, 2026 02:14
f68fa3b to
48e77ff
Compare
johnny9
marked this pull request as ready for review
August 18, 2026 18:00
johnny9
force-pushed
the
codex/695-854-qml-cache
branch
from
August 20, 2026 00:49
48e77ff to
4c1227c
Compare
johnny9
force-pushed
the
codex/695-854-qml-cache
branch
from
August 25, 2026 02:11
4c1227c to
e3fd144
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This compiles the application QML and JavaScript with
qt6_add_qml_module.qmlcachegennow checks these files during the build and embeds the generatedunits in the executable. Existing
qrc:/qml/...paths remain unchanged. Images,fonts, and
controls/qmldirremain in the manual resource file.On Qt 6.6 and newer, the application uses only the embedded AOT units. It does
not read or write host-generated
.qmlcor.jscfiles. Qt 6.2 through 6.5cannot control embedded and host cache files separately, so those versions use
the embedded QML source with the host cache disabled.
This prevents invalid QML from reaching packaged builds and prevents stale host
cache files from affecting application upgrades.
The change also adds unit and launch tests for the cache policy and adds the Qt
private declarative headers required by cachegen builds.
Tested on Ubuntu 24.04 with Qt 6.4.2:
bitcoin-core-app,bitcoinqml_unit_tests, andbitcoinqml_qmltests.qmlcachegen.git diff --check.Fixes #695
Fixes #854