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>
This commit is contained in:
Dirk Hohndel 2015-11-18 14:44:07 -08:00
parent 4cf20c3448
commit d9ded26b86
3 changed files with 8 additions and 0 deletions

View file

@ -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);