Skip to content
Snippets Groups Projects
Commit f69b5176 authored by Abhinav Gangwar's avatar Abhinav Gangwar Committed by Dennis Nienhüser
Browse files

Different user-agent strings for mobile and desktop devices

REVIEW: 116624
BUG: 310058
parent 0fc7260f
No related branches found
No related tags found
No related merge requests found
......@@ -105,8 +105,10 @@ void TinyWebBrowser::openExternalLink( QUrl url )
QByteArray TinyWebBrowser::userAgent(const QString &platform, const QString &component)
{
QString result( "Mozilla/5.0 (compatible; Marble/%1; %2; %3)" );
result = result.arg( MARBLE_VERSION_STRING, platform, component);
QString result( "Mozilla/5.0 (compatible; Marble/%1; %2; %3; %4)" );
bool const smallScreen = MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen;
QString const device = smallScreen ? "MobileDevice" : "DesktopDevice";
result = result.arg( MARBLE_VERSION_STRING, device, platform, component);
return result.toLatin1();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment