diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-12-20 07:59:50 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-12-20 07:59:50 -0800 |
commit | 2882a1ef412643ae29bf4dca12195063764393ff (patch) | |
tree | 3be133bc03d231755e22923fe611ca42e2ddabc9 /subsurface-core/qthelper.cpp | |
parent | c819d40c19e4983f0deac4dff671bb25aabfc116 (diff) | |
download | subsurface-2882a1ef412643ae29bf4dca12195063764393ff.tar.gz |
Remove the non-canonical Subusrface version
It no longer makes sense to lie about the version. If you are running a product
build, then the canonical version is the same version as the plain version used
to be. And in either case it makes much more sense to simply log the full
version information.
We used to have the differently styled versions for different OSs, but I don't
think this is needed anymore. Let's hope this doesn't go down as one of these
"famous last words" moments...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/qthelper.cpp')
-rw-r--r-- | subsurface-core/qthelper.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/subsurface-core/qthelper.cpp b/subsurface-core/qthelper.cpp index a840f4dd2..d55e8438f 100644 --- a/subsurface-core/qthelper.cpp +++ b/subsurface-core/qthelper.cpp @@ -791,9 +791,9 @@ QString getUserAgent() // fill in the system data - use ':' as separator // replace all other ':' with ' ' so that this is easy to parse #ifdef SUBSURFACE_MOBILE - QString userAgent = QString("Subsurface-mobile:%1:").arg(subsurface_version()); + QString userAgent = QString("Subsurface-mobile:%1:").arg(subsurface_canonical_version()); #else - QString userAgent = QString("Subsurface:%1:").arg(subsurface_version()); + QString userAgent = QString("Subsurface:%1:").arg(subsurface_canonical_version()); #endif userAgent.append(SubsurfaceSysInfo::prettyOsName().replace(':', ' ') + ":"); arch = SubsurfaceSysInfo::buildCpuArchitecture().replace(':', ' '); @@ -805,6 +805,13 @@ QString getUserAgent() } +extern "C" const char *subsurface_user_agent() +{ + static QString uA = getUserAgent(); + + return strdup(qPrintable(uA)); +} + QString uiLanguage(QLocale *callerLoc) { QString shortDateFormat; |