mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Support function to print version string
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8566523b43
commit
3bdaf00546
2 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -91,6 +91,7 @@ public slots:
|
|||
QString getNumber(const QString& diveId);
|
||||
QString getDate(const QString& diveId);
|
||||
QString getCurrentPosition();
|
||||
QString getVersion() const;
|
||||
void deleteGpsFix(quint64 when);
|
||||
void refreshDiveList();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue