diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2021-05-01 06:00:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-01 06:00:26 -0700 |
commit | 43a3964edd1dd087e53b53dc651a509bee77cfae (patch) | |
tree | 40107f24d870d02106705a261c6d9b424723556c /src/util | |
parent | 05f4766f0c3f26610a7ea6ec004483c01cbe5961 (diff) | |
parent | 3e5412107e728656f2dfea0d5db781b228504dfe (diff) |
Merge pull request #3816 from Holzhaus/version-date
Show Commit Date in About Dialog / Git Describe Format Improvements
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/versionstore.cpp | 5 | ||||
-rw-r--r-- | src/util/versionstore.h | 30 |
2 files changed, 22 insertions, 13 deletions
diff --git a/src/util/versionstore.cpp b/src/util/versionstore.cpp index c14822dcc6..6a42509ce9 100644 --- a/src/util/versionstore.cpp +++ b/src/util/versionstore.cpp @@ -39,6 +39,7 @@ const QString kMixxxVersionSuffix = QString(MIXXX_VERSION_SUFFIX); const QString kMixxx = QStringLiteral("Mixxx"); const QString kGitBranch = QString(GIT_BRANCH); const QString kGitDescribe = QString(GIT_DESCRIBE); +const QDateTime kGitCommitDate = QDateTime::fromString(GIT_COMMIT_DATE, Qt::ISODate); const QString kBuildFlags = QString(BUILD_FLAGS); } // namespace @@ -62,6 +63,10 @@ QString VersionStore::versionSuffix() { return kMixxxVersionSuffix; } +QDateTime VersionStore::date() { + return kGitCommitDate; +} + // static QString VersionStore::applicationName() { return kMixxx; diff --git a/src/util/versionstore.h b/src/util/versionstore.h index a821d35411..5f007576b1 100644 --- a/src/util/versionstore.h +++ b/src/util/versionstore.h @@ -1,42 +1,46 @@ #pragma once +#include <QDateTime> #include <QString> #include <QVersionNumber> class VersionStore { public: - // Returns the current Mixxx version string (e.g. 1.12.0-alpha) + /// Returns the current Mixxx version string (e.g. 1.12.0-alpha) static QString version(); - // Returns the current Mixxx version number (e.g. 1.12.0) + /// Returns the current Mixxx version number (e.g. 1.12.0) static QVersionNumber versionNumber(); - // Returns the current Mixxx version suffix (e.g. "beta") + /// Returns the current Mixxx version suffix (e.g. "beta") static QString versionSuffix(); - // Returns the application name. (e.g. "Mixxx") + /// Returns the application name. (e.g. "Mixxx") static QString applicationName(); - // Returns the platform (e.g. "Windows x86_64") + /// Returns the last change date + static QDateTime date(); + + /// Returns the platform (e.g. "Windows x86_64") static QString platform(); - // Returns the git branch (e.g. features_key) or the null - // string if the branch is unknown. + /// Returns the git branch (e.g. features_key) or the null + /// string if the branch is unknown. static QString gitBranch(); - // Returns the output of "git describe" + /// Returns the output of "git describe" static QString gitDescribe(); - // Returns the output of "git describe" and the branch name (if available) + /// Returns the output of "git describe" and the branch name (if available) static QString gitVersion(); - // Returns the build flags used to build Mixxx (e.g. "hid=1 modplug=0") or - // the null string if the flags are unknown. + /// Returns the build flags used to build Mixxx (e.g. "hid=1 modplug=0") or + /// the null string if the flags are unknown. static QString buildFlags(); - // Returns a list of the version of each dependency: + /// Returns a list of the version of each dependency: static QStringList dependencyVersions(); - // Prints out diagnostic information about this build. + /// Prints out diagnostic information about this build. static void logBuildDetails(); }; |