[vlc-commits] [Git][videolan/vlc][master] contrib: qtdeclarative: add patch to not care about library version hash when checking QML cache

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Apr 2 15:16:53 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
57089ae4 by Fatih Uzunoglu at 2025-04-02T14:38:46+00:00
contrib: qtdeclarative: add patch to not care about library version hash when checking QML cache

- - - - -


2 changed files:

- + contrib/src/qtdeclarative/0001-QtQml-do-not-care-about-library-version-hash-when-ch.patch
- contrib/src/qtdeclarative/rules.mak


Changes:

=====================================
contrib/src/qtdeclarative/0001-QtQml-do-not-care-about-library-version-hash-when-ch.patch
=====================================
@@ -0,0 +1,40 @@
+From 516124593ac452a9c894ea642a67854a6ee1a2fd Mon Sep 17 00:00:00 2001
+From: Fatih Uzunoglu <fuzun54 at outlook.com>
+Date: Mon, 31 Mar 2025 23:14:59 +0300
+Subject: [PATCH] QtQml: do not care about library version hash when checking
+ QML cache
+
+This allows using `qmlcachegen` that has different library version
+hash.
+---
+ src/qml/common/qv4compileddata.cpp | 14 --------------
+ 1 file changed, 14 deletions(-)
+
+diff --git a/src/qml/common/qv4compileddata.cpp b/src/qml/common/qv4compileddata.cpp
+index 803739e27c..1af7319517 100644
+--- a/src/qml/common/qv4compileddata.cpp
++++ b/src/qml/common/qv4compileddata.cpp
+@@ -68,20 +68,6 @@ bool Unit::verifyHeader(QDateTime expectedSourceTimeStamp, QString *errorString)
+         }
+     }
+ 
+-#if defined(QML_COMPILE_HASH) && defined(QML_COMPILE_HASH_LENGTH) && QML_COMPILE_HASH_LENGTH > 0
+-    if (qstrncmp(qml_compile_hash, libraryVersionHash, QML_COMPILE_HASH_LENGTH) != 0) {
+-        *errorString = QStringLiteral("QML compile hashes don't match. Found %1 expected %2")
+-                               .arg(QString::fromLatin1(
+-                                            QByteArray(libraryVersionHash, QML_COMPILE_HASH_LENGTH)
+-                                                    .toPercentEncoding()),
+-                                    QString::fromLatin1(
+-                                            QByteArray(qml_compile_hash, QML_COMPILE_HASH_LENGTH)
+-                                                    .toPercentEncoding()));
+-        return false;
+-    }
+-#else
+-#error "QML_COMPILE_HASH must be defined for the build of QtDeclarative to ensure version checking for cache files"
+-#endif
+     return true;
+ }
+ 
+-- 
+2.48.1
+


=====================================
contrib/src/qtdeclarative/rules.mak
=====================================
@@ -35,6 +35,7 @@ $(TARBALLS)/qtdeclarative-everywhere-src-$(QTDECLARATIVE_VERSION).tar.xz:
 qtdeclarative: qtdeclarative-everywhere-src-$(QTDECLARATIVE_VERSION).tar.xz .sum-qtdeclarative
 	$(UNPACK)
 	$(APPLY) $(SRC)/qtdeclarative/0001-QtQml-do-not-care-about-patch-version-when-checking-.patch
+	$(APPLY) $(SRC)/qtdeclarative/0001-QtQml-do-not-care-about-library-version-hash-when-ch.patch
 	# disable unused CLI tools: qml, qmleasing, qmldom, qmlformat, qmltc
 	sed -i.orig -e 's,add_subdirectory(qml),#add_subdirectory(qml),' $(UNPACK_DIR)/tools/CMakeLists.txt
 	sed -i.orig -e 's,add_subdirectory(qmleasing),#add_subdirectory(qmleasing),' $(UNPACK_DIR)/tools/CMakeLists.txt



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/57089ae44aeb0f6e6dca9d7a3afdb79ae6f308a6

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/57089ae44aeb0f6e6dca9d7a3afdb79ae6f308a6
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list