1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

Merged in filnet/librepilot/LP-277_opmap_compile_warning (pull request #219)

Lp 277_opmap_compile_warning
This commit is contained in:
Lalanne Laurent 2016-04-04 21:36:40 +02:00
commit 9ca699b1be
3 changed files with 10 additions and 4 deletions

View File

@ -181,18 +181,23 @@ QByteArray OPMaps::GetImageFrom(const MapType::Types &type, const Point &pos, co
default: default:
break; break;
} }
#ifdef DEBUG_GMAPS
qDebug() << "Timeout is " << Timeout; qDebug() << "Timeout is " << Timeout;
#endif // DEBUG_GMAPS
reply = network.get(qheader); reply = network.get(qheader);
#ifdef DEBUG_GMAPS
qDebug() << "reply " << reply; qDebug() << "reply " << reply;
#endif // DEBUG_GMAPS
QTime time; QTime time;
while ((!(reply->isFinished()) || (time.elapsed() > (6 * Timeout)))) { while ((!(reply->isFinished()) || (time.elapsed() > (6 * Timeout)))) {
QCoreApplication::processEvents(QEventLoop::AllEvents); QCoreApplication::processEvents(QEventLoop::AllEvents);
} }
#ifdef DEBUG_GMAPS
qDebug() << "Finished?" << reply->error() << " abort?" << (time.elapsed() > Timeout * 6); qDebug() << "Finished?" << reply->error() << " abort?" << (time.elapsed() > Timeout * 6);
#endif // DEBUG_GMAPS
// If you are seeing Error 6 here you are dealing with a QT SSL Bug!!! // If you are seeing Error 6 here you are dealing with a QT SSL Bug!!!
if ((reply->error() != QNetworkReply::NoError) | (time.elapsed() > Timeout * 6)) { if ((reply->error() != QNetworkReply::NoError) | (time.elapsed() > Timeout * 6)) {
qDebug() << "reply error: " << reply->error() << " see table at - http://doc.qt.io/qt-5/qnetworkreply.html"; qDebug() << "reply error: " << reply->error() << " see table at - http://doc.qt.io/qt-5/qnetworkreply.html";
return ret; return ret;

View File

@ -86,7 +86,9 @@ void TileCacheQueue::run()
usleep(44); usleep(44);
delete task; delete task;
} else { } else {
#ifdef DEBUG_TILECACHEQUEUE
qDebug() << "Cache engine BEGIN WAIT"; qDebug() << "Cache engine BEGIN WAIT";
#endif // DEBUG_TILECACHEQUEUE
waitmutex.lock(); waitmutex.lock();
int tout = 4000; int tout = 4000;
if (!waitc.wait(&waitmutex, tout)) { if (!waitc.wait(&waitmutex, tout)) {
@ -101,7 +103,9 @@ void TileCacheQueue::run()
} }
mutex.unlock(); mutex.unlock();
} }
#ifdef DEBUG_TILECACHEQUEUE
qDebug() << "Cache Engine DID NOT TimeOut"; qDebug() << "Cache Engine DID NOT TimeOut";
#endif // DEBUG_TILECACHEQUEUE
waitmutex.unlock(); waitmutex.unlock();
} }
} }

View File

@ -39,9 +39,6 @@ void Tile::Clear()
qDebug() << "Tile:Clear Overlays"; qDebug() << "Tile:Clear Overlays";
#endif // DEBUG_TILE #endif // DEBUG_TILE
mutex.lock(); mutex.lock();
foreach(QByteArray img, Overlays) {
img.~QByteArray();
}
Overlays.clear(); Overlays.clear();
mutex.unlock(); mutex.unlock();
} }