fix: add build config header & trimlines form stdout

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers 2023-06-28 11:25:59 -07:00
parent f287d9deac
commit c123558314
No known key found for this signature in database
GPG Key ID: E10E321EB160949B
2 changed files with 4 additions and 3 deletions

View File

@ -46,6 +46,7 @@
#if defined(LAUNCHER_APPLICATION)
#include "Application.h"
#endif
#include "BuildConfig.h"
#include "net/NetAction.h"

View File

@ -145,9 +145,9 @@ void PrismExternalUpdater::checkForUpdates()
auto [first_line, remainder1] = StringUtils::splitFirst(std_output, '\n');
auto [second_line, remainder2] = StringUtils::splitFirst(remainder1, '\n');
auto [third_line, release_notes] = StringUtils::splitFirst(remainder2, '\n');
auto version_name = StringUtils::splitFirst(first_line, ": ").second;
auto version_tag = StringUtils::splitFirst(second_line, ": ").second;
auto release_timestamp = QDateTime::fromString(StringUtils::splitFirst(third_line, ": ").second, Qt::ISODate);
auto version_name = StringUtils::splitFirst(first_line, ": ").second.trimmed();
auto version_tag = StringUtils::splitFirst(second_line, ": ").second.trimmed();
auto release_timestamp = QDateTime::fromString(StringUtils::splitFirst(third_line, ": ").second.trimmed(), Qt::ISODate);
qDebug() << "Update available:" << version_name << version_tag << release_timestamp;
qDebug() << "Update release notes:" << release_notes;