From f14e2e77cdabac944ec5243661e3bf1fe4293d14 Mon Sep 17 00:00:00 2001 From: Albert S Date: Tue, 31 May 2022 18:40:40 +0200 Subject: [PATCH] shared: common: Add versionText() function --- shared/common.cpp | 6 ++++++ shared/common.h | 1 + 2 files changed, 7 insertions(+) diff --git a/shared/common.cpp b/shared/common.cpp index 095cb25..e77fc80 100644 --- a/shared/common.cpp +++ b/shared/common.cpp @@ -201,3 +201,9 @@ bool Common::isTextFile(QFileInfo fileInfo) } return false; } + +QString Common::versionText() +{ + QString commitid = GIT_COMMIT_ID; + return commitid + " built " + __DATE__ + " " + __TIME__; +} diff --git a/shared/common.h b/shared/common.h index 28b1abd..5980650 100644 --- a/shared/common.h +++ b/shared/common.h @@ -13,5 +13,6 @@ bool initSqliteDatabase(QString path); void ensureConfigured(); QStringList excludedPaths(); bool isTextFile(QFileInfo fileInfo); +QString versionText(); } // namespace Common #endif