Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Marble
Manage
Activity
Members
Labels
Plan
Issues
12
Issue boards
Milestones
Wiki
Bugzilla
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Education
Marble
Commits
f69b5176
Commit
f69b5176
authored
10 years ago
by
Abhinav Gangwar
Committed by
Dennis Nienhüser
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lib/marble/TinyWebBrowser.cpp
+4
-2
4 additions, 2 deletions
src/lib/marble/TinyWebBrowser.cpp
with
4 additions
and
2 deletions
src/lib/marble/TinyWebBrowser.cpp
+
4
−
2
View file @
f69b5176
...
...
@@ -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
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment