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
ef77e497
Commit
ef77e497
authored
Jun 29, 2016
by
Don Gagne
Committed by
GitHub
Jun 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add network proxy support (#3687)
parent
33ec4385
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
1 deletion
+13
-1
QGCApplication.cc
src/QGCApplication.cc
+3
-0
QGCFileDownload.cc
src/QGCFileDownload.cc
+5
-0
QGCMapUrlEngine.cpp
src/QtLocationPlugin/QGCMapUrlEngine.cpp
+0
-1
FirmwareUpgradeController.cc
src/VehicleSetup/FirmwareUpgradeController.cc
+5
-0
No files found.
src/QGCApplication.cc
View file @
ef77e497
...
...
@@ -196,6 +196,9 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting)
setAttribute
(
Qt
::
AA_DontCreateNativeWidgetSiblings
);
#endif
// Setup for network proxy support
QNetworkProxyFactory
::
setUseSystemConfiguration
(
true
);
#ifdef Q_OS_LINUX
#ifndef __mobile__
if
(
!
_runningUnitTests
)
{
...
...
src/QGCFileDownload.cc
View file @
ef77e497
...
...
@@ -12,6 +12,7 @@
#include <QFileInfo>
#include <QStandardPaths>
#include <QNetworkProxy>
QGCFileDownload
::
QGCFileDownload
(
QObject
*
parent
)
:
QNetworkAccessManager
(
parent
)
...
...
@@ -63,6 +64,10 @@ bool QGCFileDownload::download(const QString& remoteFile)
QNetworkRequest
networkRequest
(
remoteUrl
);
QNetworkProxy
tProxy
;
tProxy
.
setType
(
QNetworkProxy
::
DefaultProxy
);
setProxy
(
tProxy
);
// Store local file location in user attribute so we can retrieve when the download finishes
networkRequest
.
setAttribute
(
QNetworkRequest
::
User
,
localFile
);
...
...
src/QtLocationPlugin/QGCMapUrlEngine.cpp
View file @
ef77e497
...
...
@@ -41,7 +41,6 @@ UrlFactory::UrlFactory()
_language
=
langs
[
0
];
}
QNetworkProxyFactory
::
setUseSystemConfiguration
(
true
);
// Google version strings
_versionGoogleMap
=
"m@338000000"
;
_versionGoogleSatellite
=
"198"
;
...
...
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
ef77e497
...
...
@@ -23,6 +23,7 @@
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include <QNetworkProxy>
struct
FirmwareToUrlElement_t
{
FirmwareUpgradeController
::
AutoPilotStackType_t
stackType
;
...
...
@@ -533,6 +534,10 @@ void FirmwareUpgradeController::_downloadFirmware(void)
_downloadManager
=
new
QNetworkAccessManager
(
this
);
Q_CHECK_PTR
(
_downloadManager
);
QNetworkProxy
tProxy
;
tProxy
.
setType
(
QNetworkProxy
::
DefaultProxy
);
_downloadManager
->
setProxy
(
tProxy
);
_downloadNetworkReply
=
_downloadManager
->
get
(
networkRequest
);
Q_ASSERT
(
_downloadNetworkReply
);
connect
(
_downloadNetworkReply
,
&
QNetworkReply
::
downloadProgress
,
this
,
&
FirmwareUpgradeController
::
_downloadProgress
);
...
...
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