aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/util.cpp20
-rw-r--r--lib/util.h5
2 files changed, 25 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;
diff --git a/lib/util.h b/lib/util.h
index 78fc9ab7..5bfe6841 100644
--- a/lib/util.h
+++ b/lib/util.h
@@ -318,4 +318,9 @@ qreal stringToHueF(const QString& s);
/** Extract the serverpart from MXID */
QString serverPart(const QString& mxId);
+
+QString versionString();
+int majorVersion();
+int minorVersion();
+int patchVersion();
} // namespace Quotient