diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-11-18 14:44:07 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-18 14:44:07 -0800 |
commit | d9ded26b86e9df8a87f92a5d7ad21f7fbce6edb6 (patch) | |
tree | 38780c771e99b4cc70a0875808eb78a682918884 /subsurface-core/qthelper.cpp | |
parent | 4cf20c34489a9f3a53cece13ec07cba44aa44487 (diff) | |
download | subsurface-d9ded26b86e9df8a87f92a5d7ad21f7fbce6edb6.tar.gz |
Location service: set user agent string
This allows the backend to know which version of Subsurface is
contacting it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/qthelper.cpp')
-rw-r--r-- | subsurface-core/qthelper.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/subsurface-core/qthelper.cpp b/subsurface-core/qthelper.cpp index cc41db2da..ac1624aa3 100644 --- a/subsurface-core/qthelper.cpp +++ b/subsurface-core/qthelper.cpp @@ -790,7 +790,11 @@ QString getUserAgent() QString arch; // 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()); +#else QString userAgent = QString("Subsurface:%1:").arg(subsurface_version()); +#endif userAgent.append(SubsurfaceSysInfo::prettyOsName().replace(':', ' ') + ":"); arch = SubsurfaceSysInfo::buildCpuArchitecture().replace(':', ' '); userAgent.append(arch); |