Unverified Commit 7ecfdf16 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #6340 from DonLakeFlyer/LogTerrain

More logging in terrain, more work on log output to file
parents 27de23be 1e3db639
...@@ -335,6 +335,7 @@ void QGCApplication::_shutdown(void) ...@@ -335,6 +335,7 @@ void QGCApplication::_shutdown(void)
QGCApplication::~QGCApplication() QGCApplication::~QGCApplication()
{ {
// Place shutdown code in _shutdown // Place shutdown code in _shutdown
_app = NULL;
} }
void QGCApplication::_initCommon(void) void QGCApplication::_initCommon(void)
......
...@@ -92,7 +92,8 @@ void AppLogModel::threadsafeLog(const QString message) ...@@ -92,7 +92,8 @@ void AppLogModel::threadsafeLog(const QString message)
insertRows(line, 1); insertRows(line, 1);
setData(index(line), message, Qt::DisplayRole); setData(index(line), message, Qt::DisplayRole);
if (_logFile.fileName().isEmpty() && qgcApp()->logOutput()) { if (qgcApp() && qgcApp()->logOutput() && _logFile.fileName().isEmpty()) {
qDebug() << _logFile.fileName().isEmpty() << qgcApp()->logOutput();
QGCToolbox* toolbox = qgcApp()->toolbox(); QGCToolbox* toolbox = qgcApp()->toolbox();
// Be careful of toolbox not being open yet // Be careful of toolbox not being open yet
if (toolbox) { if (toolbox) {
...@@ -110,5 +111,6 @@ void AppLogModel::threadsafeLog(const QString message) ...@@ -110,5 +111,6 @@ void AppLogModel::threadsafeLog(const QString message)
if (_logFile.isOpen()) { if (_logFile.isOpen()) {
QTextStream out(&_logFile); QTextStream out(&_logFile);
out << message << "\n"; out << message << "\n";
_logFile.flush();
} }
} }
...@@ -595,6 +595,7 @@ void TerrainAtCoordinateBatchManager::_coordinateHeights(bool success, QList<dou ...@@ -595,6 +595,7 @@ void TerrainAtCoordinateBatchManager::_coordinateHeights(bool success, QList<dou
int currentIndex = 0; int currentIndex = 0;
foreach (const SentRequestInfo_t& sentRequestInfo, _sentRequests) { foreach (const SentRequestInfo_t& sentRequestInfo, _sentRequests) {
if (!sentRequestInfo.queryObjectDestroyed) { if (!sentRequestInfo.queryObjectDestroyed) {
qCDebug(TerrainQueryLog) << "TerrainAtCoordinateBatchManager::_coordinateHeights returned TerrainCoordinateQuery:count" << sentRequestInfo.terrainAtCoordinateQuery << sentRequestInfo.cCoord;
disconnect(sentRequestInfo.terrainAtCoordinateQuery, &TerrainAtCoordinateQuery::destroyed, this, &TerrainAtCoordinateBatchManager::_queryObjectDestroyed); disconnect(sentRequestInfo.terrainAtCoordinateQuery, &TerrainAtCoordinateQuery::destroyed, this, &TerrainAtCoordinateBatchManager::_queryObjectDestroyed);
QList<double> requestAltitudes = heights.mid(currentIndex, sentRequestInfo.cCoord); QList<double> requestAltitudes = heights.mid(currentIndex, sentRequestInfo.cCoord);
sentRequestInfo.terrainAtCoordinateQuery->_signalTerrainData(true, requestAltitudes); sentRequestInfo.terrainAtCoordinateQuery->_signalTerrainData(true, requestAltitudes);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment