Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
1ca359f5
Commit
1ca359f5
authored
Aug 02, 2017
by
Gus Grubba
Browse files
Route Internet test function to main app.
Switch test from 8.8.8.8:53 to "www.github.com:80"
parent
cc6730cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/QGCApplication.cc
View file @
1ca359f5
...
...
@@ -668,3 +668,8 @@ void QGCApplication::qmlAttemptWindowClose(void)
{
QMetaObject
::
invokeMethod
(
_rootQmlObject
(),
"attemptWindowClose"
);
}
bool
QGCApplication
::
isInternetAvailable
()
{
return
getQGCMapEngine
()
->
isInternetActive
();
}
src/QGCApplication.h
View file @
1ca359f5
...
...
@@ -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 @
1ca359f5
...
...
@@ -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
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment