Skip to content

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

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

Loading