From d90954c6eb3d5a3c621e34a68e6703a757f5bb12 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Wed, 17 Jan 2024 15:30:34 +0100 Subject: [PATCH] Add location, version and info to send-last-version object. --- worker.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/worker.cpp b/worker.cpp index d3e7c3c..6e21e4a 100644 --- a/worker.cpp +++ b/worker.cpp @@ -1127,15 +1127,14 @@ PSAInstalled Worker::getPSAInstalled() { QString absPathName; QString absPathNameRepository; - psaInstalled.versionInfo.lastCommit = ""; - psaInstalled.versionInfo.reason = ""; - psaInstalled.versionInfo.created = ""; + psaInstalled.versionInfo.lastCommit = "N/A"; + psaInstalled.versionInfo.reason = "N/A"; + psaInstalled.versionInfo.created = "N/A"; - QStringList versionInfo = m_gc.gitShowReason(m_branchName); - if (versionInfo.size() == 3) { - psaInstalled.versionInfo.lastCommit = versionInfo.at(0); - psaInstalled.versionInfo.reason = versionInfo.at(1); - psaInstalled.versionInfo.created = versionInfo.at(2); + if (m_versionInfo.size() == 3) { + psaInstalled.versionInfo.lastCommit = m_versionInfo.at(0); + psaInstalled.versionInfo.reason = m_versionInfo.at(1); + psaInstalled.versionInfo.created = m_versionInfo.at(2); } if (m_zoneNr != 0) { @@ -1148,10 +1147,10 @@ PSAInstalled Worker::getPSAInstalled() { psaInstalled.tariff.size = getFileSize(absPathName); psaInstalled.tariff.zone = m_zoneNr; psaInstalled.tariff.loadTime = Utils::getTariffLoadTime(absPathName); + psaInstalled.tariff.project = Utils::getLocation(absPathName); + psaInstalled.tariff.version = Utils::getTariffVersion(absPathName); + psaInstalled.tariff.info = Utils::getTariffInfo(absPathName); } - psaInstalled.tariff.project = "Szeged"; - psaInstalled.tariff.info = "N/A"; - psaInstalled.tariff.version = "N/A"; psaInstalled.hw.linuxVersion = getOsVersion(); psaInstalled.hw.cpuSerial = m_cpuSerial;