diff options
author | Tobias Fella <fella@posteo.de> | 2021-08-31 15:06:46 +0200 |
---|---|---|
committer | Tobias Fella <fella@posteo.de> | 2021-08-31 15:06:46 +0200 |
commit | e2de07628f61c565ac8c85fa3aae84a5fa6feba3 (patch) | |
tree | c1f1b1282429057465b97fcf2866ebbc8053829a /lib/util.cpp | |
parent | 06a8ef6ebed5962117121486059ba46dc7f6d4f9 (diff) | |
download | libquotient-e2de07628f61c565ac8c85fa3aae84a5fa6feba3.tar.gz libquotient-e2de07628f61c565ac8c85fa3aae84a5fa6feba3.zip |
Add functions and macros to query for Quotient's version
Diffstat (limited to 'lib/util.cpp')
-rw-r--r-- | lib/util.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/util.cpp b/lib/util.cpp index 904bfd5a..3de1d169 100644 --- a/lib/util.cpp +++ b/lib/util.cpp @@ -119,6 +119,26 @@ QString Quotient::serverPart(const QString& mxId) return parser.match(mxId).captured(1); } +QString Quotient::versionString() +{ + return QStringLiteral(Quotient_VERSION_STRING); +} + +int Quotient::majorVersion() +{ + return Quotient_VERSION_MAJOR; +} + +int Quotient::minorVersion() +{ + return Quotient_VERSION_MINOR; +} + +int Quotient::patchVersion() +{ + return Quotient_VERSION_PATCH; +} + // Tests for function_traits<> using namespace Quotient; |