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)
QGCApplication::~QGCApplication()
{
// Place shutdown code in _shutdown
_app = NULL;
}
void QGCApplication::_initCommon(void)
......
......@@ -92,7 +92,8 @@ void AppLogModel::threadsafeLog(const QString message)
insertRows(line, 1);
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();
// Be careful of toolbox not being open yet
if (toolbox) {
......@@ -110,5 +111,6 @@ void AppLogModel::threadsafeLog(const QString message)
if (_logFile.isOpen()) {
QTextStream out(&_logFile);
out << message << "\n";
_logFile.flush();
}
}
......@@ -595,6 +595,7 @@ void TerrainAtCoordinateBatchManager::_coordinateHeights(bool success, QList<dou
int currentIndex = 0;
foreach (const SentRequestInfo_t& sentRequestInfo, _sentRequests) {
if (!sentRequestInfo.queryObjectDestroyed) {
qCDebug(TerrainQueryLog) << "TerrainAtCoordinateBatchManager::_coordinateHeights returned TerrainCoordinateQuery:count" << sentRequestInfo.terrainAtCoordinateQuery << sentRequestInfo.cCoord;
disconnect(sentRequestInfo.terrainAtCoordinateQuery, &TerrainAtCoordinateQuery::destroyed, this, &TerrainAtCoordinateBatchManager::_queryObjectDestroyed);
QList<double> requestAltitudes = heights.mid(currentIndex, sentRequestInfo.cCoord);
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