In order to make qhelpgenerator output reproducible, we need a way to get
deterministic embedded timestaps. Backport the patch from qttools5 [1] to
make qch files reproducible by replacing the current time by a fixed date.
[1] https://codereview.qt-project.org/#/c/106296/
Author: Eduard Sanou <dhole@openmailbox.org>
Gbp-Pq: Name replace_timestamps_with_fixed_date_in_qhelpgenerator.patch
d->query->exec(QLatin1String("INSERT INTO MetaDataTable VALUES('qchVersion', '1.0')"));
- d->query->prepare(QLatin1String("INSERT INTO MetaDataTable VALUES('CreationDate', ?)"));
- d->query->bindValue(0, QDateTime::currentDateTime().toString(Qt::ISODate));
- d->query->exec();
+ d->query->exec(QLatin1String("INSERT INTO MetaDataTable VALUES('CreationDate', '2012-12-20T12:00:00Z')"));
return true;
}
CollectionConfiguration::setAddressBarVisible(helpEngine,
!config.hideAddressBar());
CollectionConfiguration::setCreationTime(helpEngine,
- QDateTime::currentDateTime().toTime_t());
+ QDateTime::fromString("2012-12-20T12:00:00Z", Qt::ISODate).toUTC().toTime_t());
CollectionConfiguration::setFullTextSearchFallbackEnabled(helpEngine,
config.fullTextSearchFallbackEnabled());
void CollectionConfiguration::updateLastRegisterTime(QHelpEngineCore &helpEngine)
{
- helpEngine.setCustomValue(LastRegisterTime, QDateTime::currentDateTime());
+ helpEngine.setCustomValue(LastRegisterTime, QDateTime::fromString("2012-12-20T12:00:00Z", Qt::ISODate).toUTC());
}
bool CollectionConfiguration::isNewer(const QHelpEngineCore &newer,