From c5f6fd7568540690252c7a1a4b05727785541c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82?= <44851575+zneix@users.noreply.github.com> Date: Tue, 16 Jun 2020 09:30:35 +0200 Subject: [PATCH] made --version output consistent with AboutPage (#1739) When using "chatterino --version" it now also outputs commit and date of build (if on nightly), just like in Settings -> About --- src/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 200ccd945..67a05b7b9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -38,7 +38,13 @@ int main(int argc, char **argv) } else if (getArgs().printVersion) { - qInfo().noquote() << Version::instance().fullVersion(); + auto version = Version::instance(); + qInfo().noquote() << QString("%1 (commit %2%3)") + .arg(version.fullVersion()) + .arg(version.commitHash()) + .arg(Modes::instance().isNightly + ? ", " + version.dateOfBuild() + : ""); } else {