diff --git a/shared/common.cpp b/shared/common.cpp index e77fc80..a956997 100644 --- a/shared/common.cpp +++ b/shared/common.cpp @@ -205,5 +205,6 @@ bool Common::isTextFile(QFileInfo fileInfo) QString Common::versionText() { QString commitid = GIT_COMMIT_ID; - return commitid + " built " + __DATE__ + " " + __TIME__; + QString tag = GIT_TAG; + return tag + " (" + commitid + ") built " + __DATE__ + " " + __TIME__; } diff --git a/shared/shared.pro b/shared/shared.pro index 3c80b41..432269c 100644 --- a/shared/shared.pro +++ b/shared/shared.pro @@ -16,12 +16,17 @@ CONFIG += c++17 INCLUDEPATH += $$PWD/../sandbox/exile.h/ INCLUDEPATH += /usr/include/poppler/qt5/ /usr/include/quazip5 + + # The following define makes your compiler emit warnings if you use # any feature of Qt which has been marked as deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS +DEFINES += GIT_COMMIT_ID="\\\"$(shell git rev-parse --short HEAD)\\\"" +DEFINES += GIT_TAG="\\\"$(shell git describe --tags HEAD)\\\"" + # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt.