aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qmlmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-mobile/qmlmanager.cpp')
-rw-r--r--qt-mobile/qmlmanager.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp
index ad9aefd75..ff1c748a1 100644
--- a/qt-mobile/qmlmanager.cpp
+++ b/qt-mobile/qmlmanager.cpp
@@ -794,3 +794,12 @@ QString QMLManager::getDate(const QString& diveId)
datestring = get_dive_date_string(d->when);
return datestring;
}
+
+QString QMLManager::getVersion() const
+{
+ QRegExp versionRe(".*:([\\.,\\d]+).*");
+ if (!versionRe.exactMatch(getUserAgent()))
+ return QString();
+
+ return versionRe.cap(1);
+}