Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:bmwiedemann:reproducible:test
libqt5-qtbase
reproducible.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File reproducible.patch of Package libqt5-qtbase
commit f95858a7d30d697aa04aa90122d1c313bc3cdea2 Author: Bernhard M. Wiedemann <bwiedemann@suse.de> Date: Tue Nov 21 16:01:38 2023 +0100 Sort rcc entries Change-Id: I0e88cf728b1f72d33a85222ca32da4b175c7d441 diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp index c5e3d2ae4c..f119a018a3 100644 --- a/src/tools/rcc/rcc.cpp +++ b/src/tools/rcc/rcc.cpp @@ -1125,6 +1125,15 @@ bool RCCResourceLibrary::writeHeader() return true; } +struct qt_rcc_compare_hash +{ + typedef bool result_type; + result_type operator()(const RCCFileInfo *left, const RCCFileInfo *right) const + { + return qt_hash(left->m_name) < qt_hash(right->m_name); + } +}; + bool RCCResourceLibrary::writeDataBlobs() { Q_ASSERT(m_errorDevice); @@ -1154,9 +1163,11 @@ bool RCCResourceLibrary::writeDataBlobs() QString errorMessage; while (!pending.isEmpty()) { RCCFileInfo *file = pending.pop(); - for (QHash<QString, RCCFileInfo*>::iterator it = file->m_children.begin(); - it != file->m_children.end(); ++it) { - RCCFileInfo *child = it.value(); + QList<RCCFileInfo*> m_children = file->m_children.values(); + // sort entries to generate .rcc files independent of filesystem order + std::sort(m_children.begin(), m_children.end(), qt_rcc_compare_hash()); + for (int i = 0; i < m_children.size(); ++i) { + RCCFileInfo *child = m_children.at(i); if (child->m_flags & RCCFileInfo::Directory) pending.push(child); else { @@ -1247,15 +1258,6 @@ bool RCCResourceLibrary::writeDataNames() return true; } -struct qt_rcc_compare_hash -{ - typedef bool result_type; - result_type operator()(const RCCFileInfo *left, const RCCFileInfo *right) const - { - return qt_hash(left->m_name) < qt_hash(right->m_name); - } -}; - bool RCCResourceLibrary::writeDataStructure() { switch (m_format) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor