Skip to content
Snippets Groups Projects

contrib: qtdeclarative: add patch to not care about library version hash when checking QML cache

Merged Fatih Uzunoğlu requested to merge fuzun/vlc:qt/qmlcachedontchecklibraryhash into master

This is targeted for #29108 (closed). I have not tested this, because it is not easy to maintain two Qt installations. For the same reason, I'm not naming this merge request as "fix interface does not start". When the issue is fixed, we can close it manually.

Qt removes all version checks in Qt 6.10 (https://github.com/qt/qtdeclarative/commit/390c78b394b30d1abdc6268b21dd2a583472bd60). We can not import that patch as it breaks binary compatibility (we want to re-use already existing Qt 6.8.0 qmlcachegen).

For some reason that I recently realized, Qt checks the version two times: one with git tree hash, and one with QT_VERSION check. In !6996 (merged), I tried to adjust the version check to only compare major and minor versions (and not patch). However, we also need this, because git tree/commit hash check already implies a version check. It is not clear to me why Qt has multiple version checks, it was not obvious to me that Qt would do this. Their patch says:

The data structure version is supposed to encode any incompatible changes to our compilation unit format. Checking the compile hash and Qt version in addition is redundant and excessively restrictive.

And the data structure check is already there:

    if (version != quint32(QV4_DATA_STRUCTURE_VERSION)) {
        *errorString = QString::fromUtf8("V4 data structure version mismatch. Found %1 expected %2")
                               .arg(version, 0, 16).arg(QV4_DATA_STRUCTURE_VERSION, 0, 16);
        return false;
    }

I'm sorry for the inconvenience, hopefully this will fix it.

Request review @chub.

Merge request reports

Merge request pipeline #583077 passed

Merge request pipeline passed for 57089ae4

Test coverage 18.20% (0.28%) from 1 job

Closed by avatar (May 7, 2025 7:29pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading