From e700a408752d764ef175092d777c28db7dfdfe41 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Wed, 16 Aug 2023 10:38:36 +0200 Subject: [PATCH] Initialize psaInstalled.versionInfo to be sent to ISMAS in sendLastVersion(). --- worker.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/worker.cpp b/worker.cpp index f31df53..f72be12 100644 --- a/worker.cpp +++ b/worker.cpp @@ -1117,6 +1117,17 @@ PSAInstalled Worker::getPSAInstalled() { QString absPathName; 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) { QString const &n = QString("%1").arg(m_zoneNr).rightJustified(2, '0'); psaInstalled.tariff.name = QString("tariff%1.json").arg(n);