Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
59428e13
Commit
59428e13
authored
Aug 03, 2017
by
Gus Grubba
Committed by
GitHub
Aug 03, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5520 from mavlink/internetTest
Internet Test
parents
a1c60f60
1ca359f5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
QGCApplication.cc
src/QGCApplication.cc
+5
-0
QGCApplication.h
src/QGCApplication.h
+3
-0
QGCTileCacheWorker.cpp
src/QtLocationPlugin/QGCTileCacheWorker.cpp
+1
-1
No files found.
src/QGCApplication.cc
View file @
59428e13
...
...
@@ -668,3 +668,8 @@ void QGCApplication::qmlAttemptWindowClose(void)
{
QMetaObject
::
invokeMethod
(
_rootQmlObject
(),
"attemptWindowClose"
);
}
bool
QGCApplication
::
isInternetAvailable
()
{
return
getQGCMapEngine
()
->
isInternetActive
();
}
src/QGCApplication.h
View file @
59428e13
...
...
@@ -92,6 +92,9 @@ public:
/// Do we have Bluetooth Support?
bool
isBluetoothAvailable
()
{
return
_bluetoothAvailable
;
}
/// Is Internet available?
bool
isInternetAvailable
();
public
slots
:
/// You can connect to this slot to show an information message box from a different thread.
void
informationMessageBoxOnMainThread
(
const
QString
&
title
,
const
QString
&
msg
);
...
...
src/QtLocationPlugin/QGCTileCacheWorker.cpp
View file @
59428e13
...
...
@@ -1056,7 +1056,7 @@ void
QGCCacheWorker
::
_testInternet
()
{
QTcpSocket
socket
;
socket
.
connectToHost
(
"
8.8.8.8"
,
53
);
socket
.
connectToHost
(
"
www.github.com"
,
80
);
if
(
socket
.
waitForConnected
(
2500
))
{
qCDebug
(
QGCTileCacheLog
)
<<
"Yes Internet Access"
;
emit
internetStatus
(
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment