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
This commit is contained in:
Paweł 2020-06-16 09:30:35 +02:00 committed by GitHub
parent 5e0ac814cf
commit c5f6fd7568
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,7 +38,13 @@ int main(int argc, char **argv)
} }
else if (getArgs().printVersion) 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 else
{ {