Unverified Commit 2d27243a authored by Gus Grubba's avatar Gus Grubba Committed by GitHub

Merge pull request #7369 from DonLakeFlyer/TileError

Fix: Tile errors were reported twice
parents 16e93829 ae4d5f6e
...@@ -268,6 +268,7 @@ QGCCachedTileSet::_networkReplyFinished() ...@@ -268,6 +268,7 @@ QGCCachedTileSet::_networkReplyFinished()
qWarning() << "QGCMapEngineManager::networkReplyFinished() NULL Reply"; qWarning() << "QGCMapEngineManager::networkReplyFinished() NULL Reply";
return; return;
} }
if (reply->error() == QNetworkReply::NoError) {
//-- Get tile hash //-- Get tile hash
const QString hash = reply->request().attribute(QNetworkRequest::User).toString(); const QString hash = reply->request().attribute(QNetworkRequest::User).toString();
if(!hash.isEmpty()) { if(!hash.isEmpty()) {
...@@ -276,10 +277,6 @@ QGCCachedTileSet::_networkReplyFinished() ...@@ -276,10 +277,6 @@ QGCCachedTileSet::_networkReplyFinished()
} else { } else {
qWarning() << "QGCMapEngineManager::networkReplyFinished() Reply not in list: " << hash; qWarning() << "QGCMapEngineManager::networkReplyFinished() Reply not in list: " << hash;
} }
if (reply->error() != QNetworkReply::NoError) {
qWarning() << "QGCMapEngineManager::networkReplyFinished() Error:" << reply->errorString();
return;
}
qCDebug(QGCCachedTileSetLog) << "Tile fetched" << hash; qCDebug(QGCCachedTileSetLog) << "Tile fetched" << hash;
QByteArray image = reply->readAll(); QByteArray image = reply->readAll();
UrlFactory::MapType type = getQGCMapEngine()->hashToType(hash); UrlFactory::MapType type = getQGCMapEngine()->hashToType(hash);
...@@ -311,6 +308,7 @@ QGCCachedTileSet::_networkReplyFinished() ...@@ -311,6 +308,7 @@ QGCCachedTileSet::_networkReplyFinished()
} else { } else {
qWarning() << "QGCMapEngineManager::networkReplyFinished() Empty Hash"; qWarning() << "QGCMapEngineManager::networkReplyFinished() Empty Hash";
} }
}
reply->deleteLater(); reply->deleteLater();
} }
......
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