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:
commit
9ca699b1be
@ -181,18 +181,23 @@ QByteArray OPMaps::GetImageFrom(const MapType::Types &type, const Point &pos, co
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#ifdef DEBUG_GMAPS
|
||||
qDebug() << "Timeout is " << Timeout;
|
||||
#endif // DEBUG_GMAPS
|
||||
reply = network.get(qheader);
|
||||
#ifdef DEBUG_GMAPS
|
||||
qDebug() << "reply " << reply;
|
||||
#endif // DEBUG_GMAPS
|
||||
|
||||
QTime time;
|
||||
while ((!(reply->isFinished()) || (time.elapsed() > (6 * Timeout)))) {
|
||||
QCoreApplication::processEvents(QEventLoop::AllEvents);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_GMAPS
|
||||
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 ((reply->error() != QNetworkReply::NoError) | (time.elapsed() > Timeout * 6)) {
|
||||
qDebug() << "reply error: " << reply->error() << " see table at - http://doc.qt.io/qt-5/qnetworkreply.html";
|
||||
return ret;
|
||||
|
@ -86,7 +86,9 @@ void TileCacheQueue::run()
|
||||
usleep(44);
|
||||
delete task;
|
||||
} else {
|
||||
#ifdef DEBUG_TILECACHEQUEUE
|
||||
qDebug() << "Cache engine BEGIN WAIT";
|
||||
#endif // DEBUG_TILECACHEQUEUE
|
||||
waitmutex.lock();
|
||||
int tout = 4000;
|
||||
if (!waitc.wait(&waitmutex, tout)) {
|
||||
@ -101,7 +103,9 @@ void TileCacheQueue::run()
|
||||
}
|
||||
mutex.unlock();
|
||||
}
|
||||
#ifdef DEBUG_TILECACHEQUEUE
|
||||
qDebug() << "Cache Engine DID NOT TimeOut";
|
||||
#endif // DEBUG_TILECACHEQUEUE
|
||||
waitmutex.unlock();
|
||||
}
|
||||
}
|
||||
|
@ -39,9 +39,6 @@ void Tile::Clear()
|
||||
qDebug() << "Tile:Clear Overlays";
|
||||
#endif // DEBUG_TILE
|
||||
mutex.lock();
|
||||
foreach(QByteArray img, Overlays) {
|
||||
img.~QByteArray();
|
||||
}
|
||||
Overlays.clear();
|
||||
mutex.unlock();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user