Initialize psaInstalled.versionInfo to be sent to ISMAS in sendLastVersion().

This commit is contained in:
Gerhard Hoffmann 2023-08-16 10:38:36 +02:00
parent 1eba5338e4
commit e700a40875

View File

@ -1117,6 +1117,17 @@ PSAInstalled Worker::getPSAInstalled() {
QString absPathName; QString absPathName;
QString absPathNameRepository; QString absPathNameRepository;
psaInstalled.versionInfo.lastCommit = "";
psaInstalled.versionInfo.reason = "";
psaInstalled.versionInfo.created = "";
QStringList versionInfo = m_gc.gitShowReason();
if (versionInfo.size() == 3) {
psaInstalled.versionInfo.lastCommit = versionInfo.at(0);
psaInstalled.versionInfo.reason = versionInfo.at(1);
psaInstalled.versionInfo.created = versionInfo.at(2);
}
if (m_zoneNr != 0) { if (m_zoneNr != 0) {
QString const &n = QString("%1").arg(m_zoneNr).rightJustified(2, '0'); QString const &n = QString("%1").arg(m_zoneNr).rightJustified(2, '0');
psaInstalled.tariff.name = QString("tariff%1.json").arg(n); psaInstalled.tariff.name = QString("tariff%1.json").arg(n);