mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-01 18:29:16 +01:00
Fix GoogleMapsKorea, GoogleMapsKoreaHybrid & GoogleMapsKoreaSatellite, Still need to fix the Labels mapset
SSL bug in QT, workaround used in url generation code as well
This commit is contained in:
parent
01a00ccafd
commit
3a95dd9b78
@ -103,6 +103,12 @@ QByteArray OPMaps::GetImageFrom(const MapType::Types &type, const Point &pos, co
|
|||||||
QNetworkReply *reply;
|
QNetworkReply *reply;
|
||||||
QNetworkRequest qheader;
|
QNetworkRequest qheader;
|
||||||
QNetworkAccessManager network;
|
QNetworkAccessManager network;
|
||||||
|
// This SSL Hack is half assed... technically bad *security* joojoo.
|
||||||
|
// Required due to a QT5 bug on linux and Mac
|
||||||
|
//
|
||||||
|
QSslConfiguration conf = qheader.sslConfiguration();
|
||||||
|
conf.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
qheader.setSslConfiguration(conf);
|
||||||
network.setProxy(Proxy);
|
network.setProxy(Proxy);
|
||||||
#ifdef DEBUG_GMAPS
|
#ifdef DEBUG_GMAPS
|
||||||
qDebug() << "Try Tile from the Internet";
|
qDebug() << "Try Tile from the Internet";
|
||||||
@ -196,8 +202,10 @@ QByteArray OPMaps::GetImageFrom(const MapType::Types &type, const Point &pos, co
|
|||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "Finished?" << reply->error() << " abort?" << (time.elapsed() > Timeout * 6);
|
qDebug() << "Finished?" << reply->error() << " abort?" << (time.elapsed() > Timeout * 6);
|
||||||
|
// 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();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user