mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
4cf20c3448
commit
d9ded26b86
3 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue