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
7188d04e
Commit
7188d04e
authored
Apr 04, 2018
by
DonLakeFlyer
Browse files
Better debugging support
parent
a59f2282
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Terrain/TerrainQuery.cc
View file @
7188d04e
...
...
@@ -97,6 +97,17 @@ void TerrainAirMapQuery::_sendQuery(const QString& path, const QUrlQuery& urlQue
}
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
)
...
...
@@ -104,7 +115,7 @@ void TerrainAirMapQuery::_requestFinished(void)
QNetworkReply
*
reply
=
qobject_cast
<
QNetworkReply
*>
(
QObject
::
sender
());
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
();
_requestFailed
();
return
;
...
...
@@ -133,7 +144,7 @@ void TerrainAirMapQuery::_requestFinished(void)
// Send back data
const
QJsonValue
&
jsonData
=
rootObject
[
"data"
];
qCDebug
(
TerrainQueryLog
)
<<
"_requestFinished sucess"
;
qCDebug
(
TerrainQueryLog
)
<<
"_requestFinished suc
c
ess"
;
switch
(
_queryMode
)
{
case
QueryModeCoordinates
:
emit
_parseCoordinateData
(
jsonData
);
...
...
src/Terrain/TerrainQuery.h
View file @
7188d04e
...
...
@@ -64,6 +64,7 @@ public:
void
requestCarpetHeights
(
const
QGeoCoordinate
&
swCoord
,
const
QGeoCoordinate
&
neCoord
,
bool
statsOnly
)
final
;
private
slots
:
void
_requestError
(
QNetworkReply
::
NetworkError
code
);
void
_requestFinished
(
void
);
private:
...
...
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