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