From d9ded26b86e9df8a87f92a5d7ad21f7fbce6edb6 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 18 Nov 2015 14:44:07 -0800 Subject: Location service: set user agent string This allows the backend to know which version of Subsurface is contacting it. Signed-off-by: Dirk Hohndel --- subsurface-core/qthelper.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'subsurface-core/qthelper.cpp') 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); -- cgit v1.2.3-70-g09d2