Debian Codegraph @

contrib/depends/patches/qt/rcc_hardcode_timestamp.patch

raw
1 Hardcode last modified timestamp in Qt RCC
2
3 This change allows the already built qt package to be reused even with
4 the SOURCE_DATE_EPOCH variable set, e.g., for Guix builds.
5
6 diff --git a/qtbase/src/tools/rcc/rcc.cpp b/qtbase/src/tools/rcc/rcc.cpp
7 index e461ab6294..256dc0ba29 100644
8 --- a/qtbase/src/tools/rcc/rcc.cpp
9 +++ b/qtbase/src/tools/rcc/rcc.cpp
10 @@ -201,14 +201,7 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib)
11
12 if (lib.formatVersion() >= 2) {
13 // last modified time stamp
14 - const QDateTime lastModified = m_fileInfo.lastModified(QTimeZone::UTC);
15 - quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0);
16 - static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong();
17 - if (sourceDate != 0)
18 - lastmod = sourceDate;
19 - static const quint64 sourceDate2 = 1000 * qgetenv("SOURCE_DATE_EPOCH").toULongLong();
20 - if (sourceDate2 != 0)
21 - lastmod = sourceDate2;
22 + quint64 lastmod = quint64(1);
23 lib.writeNumber8(lastmod);
24 if (text || pass1)
25 lib.writeChar('\n');