From 19b2102fed17adead8ff803e253c3a377c0c581a Mon Sep 17 00:00:00 2001 From: Leon Richardt Date: Sat, 21 Sep 2019 20:24:52 +0200 Subject: [PATCH] Fix Version::dateOfBuild_ on Windows The `CHATTERINO_NIGHTLY_VERSION_STRING` defines differ on Windows and MacOS/Linux. (See `appveyor.yml` and `travis.yml`, respectively.) Therefore, the Windows version string looked really messed up but it should be fixed now. --- src/common/Version.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/common/Version.cpp b/src/common/Version.cpp index e6a47ef38..dc3c04d67 100644 --- a/src/common/Version.cpp +++ b/src/common/Version.cpp @@ -16,11 +16,11 @@ Version::Version() this->commitHash_ = QString(FROM_EXTERNAL_DEFINE(CHATTERINO_GIT_HASH)).remove('"'); - // Date of build + // Date of build, this is depended on the format not changing #ifdef CHATTERINO_NIGHTLY_VERSION_STRING this->dateOfBuild_ = QString(FROM_EXTERNAL_DEFINE(CHATTERINO_NIGHTLY_VERSION_STRING)) - .remove('"'); + .remove('"').split(' ')[0]; #endif // "Full" version string, as displayed in window title @@ -31,11 +31,6 @@ Version::Version() } this->fullVersion_ += this->version_; - - if (Modes::getInstance().isNightly) - { - this->fullVersion_ += this->dateOfBuild_; - } } const Version &Version::getInstance()