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
7188d04e
Commit
7188d04e
authored
Apr 04, 2018
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better debugging support
parent
a59f2282
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
TerrainQuery.cc
src/Terrain/TerrainQuery.cc
+13
-2
TerrainQuery.h
src/Terrain/TerrainQuery.h
+1
-0
No files found.
src/Terrain/TerrainQuery.cc
View file @
7188d04e
...
@@ -97,6 +97,17 @@ void TerrainAirMapQuery::_sendQuery(const QString& path, const QUrlQuery& urlQue
...
@@ -97,6 +97,17 @@ void TerrainAirMapQuery::_sendQuery(const QString& path, const QUrlQuery& urlQue
}
}
connect
(
networkReply
,
&
QNetworkReply
::
finished
,
this
,
&
TerrainAirMapQuery
::
_requestFinished
);
connect
(
networkReply
,
&
QNetworkReply
::
finished
,
this
,
&
TerrainAirMapQuery
::
_requestFinished
);
connect
(
networkReply
,
QOverload
<
QNetworkReply
::
NetworkError
>::
of
(
&
QNetworkReply
::
error
),
this
,
&
TerrainAirMapQuery
::
_requestError
);
}
void
TerrainAirMapQuery
::
_requestError
(
QNetworkReply
::
NetworkError
code
)
{
QNetworkReply
*
reply
=
qobject_cast
<
QNetworkReply
*>
(
QObject
::
sender
());
if
(
code
!=
QNetworkReply
::
NoError
)
{
qCDebug
(
TerrainQueryLog
)
<<
"_requestError error:url:data"
<<
reply
->
error
()
<<
reply
->
url
()
<<
reply
->
readAll
();
return
;
}
}
}
void
TerrainAirMapQuery
::
_requestFinished
(
void
)
void
TerrainAirMapQuery
::
_requestFinished
(
void
)
...
@@ -104,7 +115,7 @@ void TerrainAirMapQuery::_requestFinished(void)
...
@@ -104,7 +115,7 @@ void TerrainAirMapQuery::_requestFinished(void)
QNetworkReply
*
reply
=
qobject_cast
<
QNetworkReply
*>
(
QObject
::
sender
());
QNetworkReply
*
reply
=
qobject_cast
<
QNetworkReply
*>
(
QObject
::
sender
());
if
(
reply
->
error
()
!=
QNetworkReply
::
NoError
)
{
if
(
reply
->
error
()
!=
QNetworkReply
::
NoError
)
{
qCDebug
(
TerrainQueryLog
)
<<
"_requestFinished error:
data"
<<
reply
->
error
()
<<
reply
->
readAll
();
qCDebug
(
TerrainQueryLog
)
<<
"_requestFinished error:
url:data"
<<
reply
->
error
()
<<
reply
->
url
()
<<
reply
->
readAll
();
reply
->
deleteLater
();
reply
->
deleteLater
();
_requestFailed
();
_requestFailed
();
return
;
return
;
...
@@ -133,7 +144,7 @@ void TerrainAirMapQuery::_requestFinished(void)
...
@@ -133,7 +144,7 @@ void TerrainAirMapQuery::_requestFinished(void)
// Send back data
// Send back data
const
QJsonValue
&
jsonData
=
rootObject
[
"data"
];
const
QJsonValue
&
jsonData
=
rootObject
[
"data"
];
qCDebug
(
TerrainQueryLog
)
<<
"_requestFinished sucess"
;
qCDebug
(
TerrainQueryLog
)
<<
"_requestFinished suc
c
ess"
;
switch
(
_queryMode
)
{
switch
(
_queryMode
)
{
case
QueryModeCoordinates
:
case
QueryModeCoordinates
:
emit
_parseCoordinateData
(
jsonData
);
emit
_parseCoordinateData
(
jsonData
);
...
...
src/Terrain/TerrainQuery.h
View file @
7188d04e
...
@@ -64,6 +64,7 @@ public:
...
@@ -64,6 +64,7 @@ public:
void
requestCarpetHeights
(
const
QGeoCoordinate
&
swCoord
,
const
QGeoCoordinate
&
neCoord
,
bool
statsOnly
)
final
;
void
requestCarpetHeights
(
const
QGeoCoordinate
&
swCoord
,
const
QGeoCoordinate
&
neCoord
,
bool
statsOnly
)
final
;
private
slots
:
private
slots
:
void
_requestError
(
QNetworkReply
::
NetworkError
code
);
void
_requestFinished
(
void
);
void
_requestFinished
(
void
);
private:
private:
...
...
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