Hello community, here is the log from the commit of package gpxsee for openSUSE:Factory checked in at 2018-03-20 22:01:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gpxsee (Old) and /work/SRC/openSUSE:Factory/.gpxsee.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gpxsee" Tue Mar 20 22:01:07 2018 rev:23 rq:588919 version:5.5 Changes: -------- --- /work/SRC/openSUSE:Factory/gpxsee/gpxsee.changes 2018-03-12 12:13:24.787851984 +0100 +++ /work/SRC/openSUSE:Factory/.gpxsee.new/gpxsee.changes 2018-03-20 22:01:30.695194431 +0100 @@ -1,0 +2,7 @@ +Mon Mar 19 23:39:34 CET 2018 - [email protected] + +- Update to version 5.5 + * Fixed deadlocks caused by infinite HTTP timeout. + * Several minor bugfixes. + +------------------------------------------------------------------- Old: ---- GPXSee-5.4.tar.gz New: ---- GPXSee-5.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gpxsee.spec ++++++ --- /var/tmp/diff_new_pack.I3zx8V/_old 2018-03-20 22:01:32.527128475 +0100 +++ /var/tmp/diff_new_pack.I3zx8V/_new 2018-03-20 22:01:32.531128331 +0100 @@ -19,7 +19,7 @@ # See also http://en.opensuse.org/openSUSE:Specfile_guidelines Name: gpxsee -Version: 5.4 +Version: 5.5 Release: 1 Summary: GPS log files visualizing and analyzing tool License: GPL-3.0 ++++++ GPXSee-5.4.tar.gz -> GPXSee-5.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/.appveyor.yml new/GPXSee-5.5/.appveyor.yml --- old/GPXSee-5.4/.appveyor.yml 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/.appveyor.yml 2018-03-19 22:40:49.000000000 +0100 @@ -1,4 +1,4 @@ -version: 5.4.{build} +version: 5.5.{build} configuration: Release platform: Any CPU environment: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/gpxsee.pro new/GPXSee-5.5/gpxsee.pro --- old/GPXSee-5.4/gpxsee.pro 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/gpxsee.pro 2018-03-19 22:40:49.000000000 +0100 @@ -1,5 +1,5 @@ TARGET = GPXSee -VERSION = 5.4 +VERSION = 5.5 QT += core \ gui \ network diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/lang/gpxsee_fi.ts new/GPXSee-5.5/lang/gpxsee_fi.ts --- old/GPXSee-5.4/lang/gpxsee_fi.ts 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/lang/gpxsee_fi.ts 2018-03-19 22:40:49.000000000 +0100 @@ -1401,17 +1401,17 @@ <message> <location filename="../src/GUI/speedgraph.cpp" line="25"/> <source>min/km</source> - <translation type="unfinished"></translation> + <translation>min/km</translation> </message> <message> <location filename="../src/GUI/speedgraph.cpp" line="26"/> <source>min/mi</source> - <translation type="unfinished"></translation> + <translation>min/mi</translation> </message> <message> <location filename="../src/GUI/speedgraph.cpp" line="26"/> <source>min/nmi</source> - <translation type="unfinished"></translation> + <translation>min/mpk</translation> </message> <message> <location filename="../src/GUI/speedgraph.cpp" line="30"/> @@ -1421,7 +1421,7 @@ <message> <location filename="../src/GUI/speedgraph.cpp" line="32"/> <source>Pace</source> - <translation type="unfinished"></translation> + <translation>Tahti</translation> </message> <message> <location filename="../src/GUI/speedgraph.cpp" line="90"/> @@ -1454,17 +1454,17 @@ <message> <location filename="../src/GUI/speedgraphitem.cpp" line="26"/> <source>min/km</source> - <translation type="unfinished"></translation> + <translation>min/km</translation> </message> <message> <location filename="../src/GUI/speedgraphitem.cpp" line="27"/> <source>min/mi</source> - <translation type="unfinished"></translation> + <translation>min/mi</translation> </message> <message> <location filename="../src/GUI/speedgraphitem.cpp" line="27"/> <source>min/nmi</source> - <translation type="unfinished"></translation> + <translation>min/mpk</translation> </message> <message> <location filename="../src/GUI/speedgraphitem.cpp" line="29"/> @@ -1479,7 +1479,7 @@ <message> <location filename="../src/GUI/speedgraphitem.cpp" line="33"/> <source>Pace</source> - <translation type="unfinished"></translation> + <translation>Tahti</translation> </message> </context> <context> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/lang/gpxsee_ru.ts new/GPXSee-5.5/lang/gpxsee_ru.ts --- old/GPXSee-5.4/lang/gpxsee_ru.ts 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/lang/gpxsee_ru.ts 2018-03-19 22:40:49.000000000 +0100 @@ -1402,17 +1402,17 @@ <message> <location filename="../src/GUI/speedgraph.cpp" line="25"/> <source>min/km</source> - <translation type="unfinished"></translation> + <translation>мин/км</translation> </message> <message> <location filename="../src/GUI/speedgraph.cpp" line="26"/> <source>min/mi</source> - <translation type="unfinished"></translation> + <translation>мин/мл</translation> </message> <message> <location filename="../src/GUI/speedgraph.cpp" line="26"/> <source>min/nmi</source> - <translation type="unfinished"></translation> + <translation>мин/мор.мл</translation> </message> <message> <location filename="../src/GUI/speedgraph.cpp" line="30"/> @@ -1422,7 +1422,7 @@ <message> <location filename="../src/GUI/speedgraph.cpp" line="32"/> <source>Pace</source> - <translation type="unfinished"></translation> + <translation>Темп</translation> </message> <message> <location filename="../src/GUI/speedgraph.cpp" line="90"/> @@ -1455,17 +1455,17 @@ <message> <location filename="../src/GUI/speedgraphitem.cpp" line="26"/> <source>min/km</source> - <translation type="unfinished"></translation> + <translation>мин/км</translation> </message> <message> <location filename="../src/GUI/speedgraphitem.cpp" line="27"/> <source>min/mi</source> - <translation type="unfinished"></translation> + <translation>мин/мл</translation> </message> <message> <location filename="../src/GUI/speedgraphitem.cpp" line="27"/> <source>min/nmi</source> - <translation type="unfinished"></translation> + <translation>мин/мор.мл</translation> </message> <message> <location filename="../src/GUI/speedgraphitem.cpp" line="29"/> @@ -1480,7 +1480,7 @@ <message> <location filename="../src/GUI/speedgraphitem.cpp" line="33"/> <source>Pace</source> - <translation type="unfinished"></translation> + <translation>Темп</translation> </message> </context> <context> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/lang/gpxsee_sv.ts new/GPXSee-5.5/lang/gpxsee_sv.ts --- old/GPXSee-5.4/lang/gpxsee_sv.ts 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/lang/gpxsee_sv.ts 2018-03-19 22:40:49.000000000 +0100 @@ -1401,17 +1401,17 @@ <message> <location filename="../src/GUI/speedgraph.cpp" line="25"/> <source>min/km</source> - <translation type="unfinished"></translation> + <translation>min/km</translation> </message> <message> <location filename="../src/GUI/speedgraph.cpp" line="26"/> <source>min/mi</source> - <translation type="unfinished"></translation> + <translation>min/mi</translation> </message> <message> <location filename="../src/GUI/speedgraph.cpp" line="26"/> <source>min/nmi</source> - <translation type="unfinished"></translation> + <translation>min/nmi</translation> </message> <message> <location filename="../src/GUI/speedgraph.cpp" line="30"/> @@ -1421,7 +1421,7 @@ <message> <location filename="../src/GUI/speedgraph.cpp" line="32"/> <source>Pace</source> - <translation type="unfinished"></translation> + <translation>Tempo</translation> </message> <message> <location filename="../src/GUI/speedgraph.cpp" line="90"/> @@ -1454,17 +1454,17 @@ <message> <location filename="../src/GUI/speedgraphitem.cpp" line="26"/> <source>min/km</source> - <translation type="unfinished"></translation> + <translation>min/km</translation> </message> <message> <location filename="../src/GUI/speedgraphitem.cpp" line="27"/> <source>min/mi</source> - <translation type="unfinished"></translation> + <translation>min/mi</translation> </message> <message> <location filename="../src/GUI/speedgraphitem.cpp" line="27"/> <source>min/nmi</source> - <translation type="unfinished"></translation> + <translation>min/nmi</translation> </message> <message> <location filename="../src/GUI/speedgraphitem.cpp" line="29"/> @@ -1479,7 +1479,7 @@ <message> <location filename="../src/GUI/speedgraphitem.cpp" line="33"/> <source>Pace</source> - <translation type="unfinished"></translation> + <translation>Tempo</translation> </message> </context> <context> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/pkg/csv/pcs.csv new/GPXSee-5.5/pkg/csv/pcs.csv --- old/GPXSee-5.4/pkg/csv/pcs.csv 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/pkg/csv/pcs.csv 2018-03-19 22:40:49.000000000 +0100 @@ -344,6 +344,7 @@ Hjorsey 1955 / UTM zone 27N,3055,4658,16027,9001,9807,8801,0,9102,8802,-21,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,, Hjorsey 1955 / UTM zone 28N,3056,4658,16028,9001,9807,8801,0,9102,8802,-15,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,, ED50 / Jordan TM,3066,4230,19995,9001,9807,8801,0,9102,8802,37,9102,8805,0.9998,9201,8806,500000,9001,8807,-3000000,9001,,,,,, +ETRS89 / TM35FIN (E-N),3067,4258,16065,9001,9807,8801,0,9102,8802,27,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,, NAD27 / Wisconsin Transverse Mercator,3069,4267,14811,9001,9807,8801,0,9102,8802,-90,9102,8805,0.9996,9201,8806,500000,9001,8807,-4500000,9001,,,,,, NAD83 / Wisconsin Transverse Mercator,3070,4269,14841,9001,9807,8801,0,9102,8802,-90,9102,8805,0.9996,9201,8806,520000,9001,8807,-4480000,9001,,,,,, NAD83 / Maine CS2000 East,3072,4269,11851,9001,9807,8801,43.5,9110,8802,-67.523,9110,8805,0.99998,9201,8806,700000,9001,8807,0,9001,,,,,, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/pkg/gpxsee.nsi new/GPXSee-5.5/pkg/gpxsee.nsi --- old/GPXSee-5.4/pkg/gpxsee.nsi 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/pkg/gpxsee.nsi 2018-03-19 22:40:49.000000000 +0100 @@ -5,7 +5,7 @@ ; The name of the installer Name "GPXSee" ; Program version -!define VERSION "5.4" +!define VERSION "5.5" ; The file to write OutFile "GPXSee-${VERSION}.exe" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/pkg/gpxsee64.nsi new/GPXSee-5.5/pkg/gpxsee64.nsi --- old/GPXSee-5.4/pkg/gpxsee64.nsi 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/pkg/gpxsee64.nsi 2018-03-19 22:40:49.000000000 +0100 @@ -5,7 +5,7 @@ ; The name of the installer Name "GPXSee" ; Program version -!define VERSION "5.4" +!define VERSION "5.5" ; The file to write OutFile "GPXSee-${VERSION}_x64.exe" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/src/map/albersequal.cpp new/GPXSee-5.5/src/map/albersequal.cpp --- old/GPXSee-5.4/src/map/albersequal.cpp 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/src/map/albersequal.cpp 2018-03-19 22:40:49.000000000 +0100 @@ -70,7 +70,6 @@ double sp1, sp2; - _e = ellipsoid; _latitudeOrigin = deg2rad(latitudeOrigin); _longitudeOrigin = deg2rad(longitudeOrigin); _falseEasting = falseEasting; @@ -79,7 +78,9 @@ sp1 = deg2rad(standardParallel1); sp2 = deg2rad(standardParallel2); - _es2 = 2 * _e->flattening() - _e->flattening() * _e->flattening(); + _a2 = ellipsoid->radius() * ellipsoid->radius(); + _es2 = 2 * ellipsoid->flattening() - ellipsoid->flattening() + * ellipsoid->flattening(); _es = sqrt(_es2); _one_minus_es2 = 1 - _es2; _two_es = 2 * _es; @@ -109,7 +110,7 @@ _n = sin_lat1; _C = sqr_m1 + _n * q1; - _a_over_n = _e->radius() / _n; + _a_over_n = ellipsoid->radius() / _n; nq0 = _n * q0; _rho0 = (_C < nq0) ? 0 : _a_over_n * sqrt(_C - nq0); } @@ -172,7 +173,7 @@ if (rho != 0.0) theta = atan2(dx, rho0_minus_dy); rho_n = rho * _n; - q = (_C - (rho_n * rho_n) / (_e->radius() * _e->radius())) / _n; + q = (_C - (rho_n * rho_n) / _a2) / _n; qc = 1 - ((_one_minus_es2) / (_two_es)) * log((1.0 - _es) / (1.0 + _es)); if (fabs(fabs(qc) - fabs(q)) > 1.0e-6) { q_over_2 = q / 2.0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/src/map/albersequal.h new/GPXSee-5.5/src/map/albersequal.h --- old/GPXSee-5.4/src/map/albersequal.h 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/src/map/albersequal.h 2018-03-19 22:40:49.000000000 +0100 @@ -18,13 +18,12 @@ virtual Coordinates xy2ll(const QPointF &p) const; private: - const Ellipsoid *_e; - double _latitudeOrigin; double _longitudeOrigin; double _falseEasting; double _falseNorthing; + double _a2; double _rho0; double _C; double _n; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/src/map/downloader.cpp new/GPXSee-5.5/src/map/downloader.cpp --- old/GPXSee-5.4/src/map/downloader.cpp 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/src/map/downloader.cpp 2018-03-19 22:40:49.000000000 +0100 @@ -2,6 +2,7 @@ #include <QFileInfo> #include <QNetworkRequest> #include <QNetworkReply> +#include <QBasicTimer> #include "config.h" #include "downloader.h" @@ -25,15 +26,60 @@ #define ATTR_LEVEL (QNetworkRequest::Attribute)(QNetworkRequest::User + 2) #define MAX_REDIRECT_LEVEL 5 +#define TIMEOUT 30 /* s */ + + +class Downloader::ReplyTimeout : public QObject +{ +public: + static void setTimeout(QNetworkReply *reply, int timeout) + { + Q_ASSERT(reply); + new ReplyTimeout(reply, timeout); + } + +private: + ReplyTimeout(QNetworkReply *reply, int timeout) : QObject(reply) + { + _timer.start(timeout * 1000, this); + } + + void timerEvent(QTimerEvent *ev) + { + if (!_timer.isActive() || ev->timerId() != _timer.timerId()) + return; + QNetworkReply *reply = static_cast<QNetworkReply*>(parent()); + if (reply->isRunning()) + reply->close(); + _timer.stop(); + } + + QBasicTimer _timer; +}; + +class Downloader::Redirect +{ +public: + Redirect() : _level(0) {} + Redirect(const QUrl &origin, int level) : + _origin(origin), _level(level) {} + + const QUrl &origin() const {return _origin;} + int level() const {return _level;} + +private: + QUrl _origin; + int _level; +}; Downloader::Downloader(QObject *parent) : QObject(parent) { connect(&_manager, SIGNAL(finished(QNetworkReply*)), - SLOT(downloadFinished(QNetworkReply*))); + SLOT(downloadFinished(QNetworkReply*))); } -bool Downloader::doDownload(const Download &dl, const Redirect &redirect) +bool Downloader::doDownload(const Download &dl, const Redirect *redirect) { QUrl url(dl.url()); @@ -44,14 +90,18 @@ QNetworkRequest request(url); request.setAttribute(ATTR_FILE, QVariant(dl.file())); - if (!redirect.isNull()) { - request.setAttribute(ATTR_ORIGIN, QVariant(redirect.origin())); - request.setAttribute(ATTR_LEVEL, QVariant(redirect.level())); + if (redirect) { + request.setAttribute(ATTR_ORIGIN, QVariant(redirect->origin())); + request.setAttribute(ATTR_LEVEL, QVariant(redirect->level())); } request.setRawHeader("User-Agent", USER_AGENT); - QNetworkReply *reply = _manager.get(request); - _currentDownloads.insert(url, reply); + QNetworkReply *reply = _manager.get(request); + if (reply) { + _currentDownloads.insert(url); + ReplyTimeout::setTimeout(reply, TIMEOUT); + } else + return false; return true; } @@ -109,7 +159,7 @@ } else { Redirect redirect(origin.isEmpty() ? url : origin, level + 1); Download dl(location, filename); - doDownload(dl, redirect); + doDownload(dl, &redirect); } } else if (!saveToDisk(filename, reply)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/src/map/downloader.h new/GPXSee-5.5/src/map/downloader.h --- old/GPXSee-5.4/src/map/downloader.h 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/src/map/downloader.h 2018-03-19 22:40:49.000000000 +0100 @@ -4,10 +4,8 @@ #include <QNetworkAccessManager> #include <QUrl> #include <QList> -#include <QMap> #include <QSet> - class QNetworkReply; class Download @@ -32,6 +30,7 @@ Downloader(QObject *parent = 0); bool get(const QList<Download> &list); + void clearErrors() {_errorDownloads.clear();} signals: void finished(); @@ -40,28 +39,14 @@ void downloadFinished(QNetworkReply *reply); private: - class Redirect - { - public: - Redirect() : _level(0) {} - Redirect(const QUrl &origin, int level) : - _origin(origin), _level(level) {} - - const QUrl &origin() const {return _origin;} - int level() const {return _level;} - - bool isNull() const {return (_level == 0);} - - private: - QUrl _origin; - int _level; - }; + class Redirect; + class ReplyTimeout; - bool doDownload(const Download &dl, const Redirect &redirect = Redirect()); + bool doDownload(const Download &dl, const Redirect *redirect = 0); bool saveToDisk(const QString &filename, QIODevice *data); QNetworkAccessManager _manager; - QMap<QUrl, QNetworkReply *> _currentDownloads; + QSet<QUrl> _currentDownloads; QSet<QUrl> _errorDownloads; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/src/map/geotiff.cpp new/GPXSee-5.5/src/map/geotiff.cpp --- old/GPXSee-5.4/src/map/geotiff.cpp 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/src/map/geotiff.cpp 2018-03-19 22:40:49.000000000 +0100 @@ -22,6 +22,7 @@ #define GeogPrimeMeridianGeoKey 2051 #define GeogAngularUnitsGeoKey 2054 #define GeogEllipsoidGeoKey 2056 +#define GeogAzimuthUnitsGeoKey 2060 #define ProjectedCSTypeGeoKey 3072 #define ProjectionGeoKey 3074 #define ProjCoordTransGeoKey 3075 @@ -54,13 +55,7 @@ #define IS_SET(map, key) \ ((map).contains(key) && (map).value(key).SHORT != 32767) -#define TO_M(lu, val) \ - (std::isnan(val) ? val : (lu).toMeters(val)) -#define TO_DEG(au, val) \ - (std::isnan(val) ? val : (au).toDegrees(val)) -#define ARRAY_SIZE(a) \ - (sizeof(a) / sizeof(*a)) typedef struct { quint16 KeyDirectoryVersion; @@ -236,6 +231,7 @@ case GeogGeodeticDatumGeoKey: case GeogPrimeMeridianGeoKey: case GeogAngularUnitsGeoKey: + case GeogAzimuthUnitsGeoKey: case ProjectedCSTypeGeoKey: case ProjectionGeoKey: case ProjCoordTransGeoKey: @@ -296,14 +292,15 @@ _errorString = QString("%1: unknown GCS") .arg(kv.value(GeographicTypeGeoKey).SHORT); } else if (IS_SET(kv, GeogGeodeticDatumGeoKey) - || kv.value(GeogEllipsoidGeoKey).SHORT == 7019) { + || kv.value(GeogEllipsoidGeoKey).SHORT == 7019 + || kv.value(GeogEllipsoidGeoKey).SHORT == 7030) { int pm = IS_SET(kv, GeogPrimeMeridianGeoKey) ? kv.value(GeogPrimeMeridianGeoKey).SHORT : 8901; int au = IS_SET(kv, GeogAngularUnitsGeoKey) ? kv.value(GeogAngularUnitsGeoKey).SHORT : 9102; - /* If only the ellipsoid is defined and it is GRS80, handle such - definition as a WGS84 geodetic datum. */ + // If only the ellipsoid is defined and it is GRS80 or WGS84, handle + // such definition as a WGS84 geodetic datum. int gd = IS_SET(kv, GeogGeodeticDatumGeoKey) ? kv.value(GeogGeodeticDatumGeoKey).SHORT : 6326; @@ -383,6 +380,8 @@ AngularUnits au(IS_SET(kv, GeogAngularUnitsGeoKey) ? kv.value(GeogAngularUnitsGeoKey).SHORT : 9102); + AngularUnits zu(IS_SET(kv, GeogAzimuthUnitsGeoKey) + ? kv.value(GeogAzimuthUnitsGeoKey).SHORT : 9102); LinearUnits lu(IS_SET(kv, ProjLinearUnitsGeoKey) ? kv.value(ProjLinearUnitsGeoKey).SHORT : 9001); if (lu.isNull()) { @@ -392,15 +391,15 @@ } if (kv.contains(ProjNatOriginLatGeoKey)) - lat0 = kv.value(ProjNatOriginLatGeoKey).DOUBLE; + lat0 = au.toDegrees(kv.value(ProjNatOriginLatGeoKey).DOUBLE); else if (kv.contains(ProjCenterLatGeoKey)) - lat0 = kv.value(ProjCenterLatGeoKey).DOUBLE; + lat0 = au.toDegrees(kv.value(ProjCenterLatGeoKey).DOUBLE); else lat0 = NAN; if (kv.contains(ProjNatOriginLongGeoKey)) - lon0 = kv.value(ProjNatOriginLongGeoKey).DOUBLE; + lon0 = au.toDegrees(kv.value(ProjNatOriginLongGeoKey).DOUBLE); else if (kv.contains(ProjCenterLongGeoKey)) - lon0 = kv.value(ProjCenterLongGeoKey).DOUBLE; + lon0 = au.toDegrees(kv.value(ProjCenterLongGeoKey).DOUBLE); else lon0 = NAN; if (kv.contains(ProjScaleAtNatOriginGeoKey)) @@ -410,28 +409,27 @@ else scale = NAN; if (kv.contains(ProjStdParallel1GeoKey)) - sp1 = kv.value(ProjStdParallel1GeoKey).DOUBLE; + sp1 = au.toDegrees(kv.value(ProjStdParallel1GeoKey).DOUBLE); else if (kv.contains(ProjAzimuthAngleGeoKey)) - sp1 = kv.value(ProjAzimuthAngleGeoKey).DOUBLE; + sp1 = zu.toDegrees(kv.value(ProjAzimuthAngleGeoKey).DOUBLE); else sp1 = NAN; if (kv.contains(ProjStdParallel2GeoKey)) - sp2 = kv.value(ProjStdParallel2GeoKey).DOUBLE; + sp2 = au.toDegrees(kv.value(ProjStdParallel2GeoKey).DOUBLE); else if (kv.contains(ProjRectifiedGridAngleGeoKey)) - sp2 = kv.value(ProjRectifiedGridAngleGeoKey).DOUBLE; + sp2 = au.toDegrees(kv.value(ProjRectifiedGridAngleGeoKey).DOUBLE); else sp2 = NAN; if (kv.contains(ProjFalseNorthingGeoKey)) - fn = kv.value(ProjFalseNorthingGeoKey).DOUBLE; + fn = lu.toMeters(kv.value(ProjFalseNorthingGeoKey).DOUBLE); else fn = NAN; if (kv.contains(ProjFalseEastingGeoKey)) - fe = kv.value(ProjFalseEastingGeoKey).DOUBLE; + fe = lu.toMeters(kv.value(ProjFalseEastingGeoKey).DOUBLE); else fe = NAN; - Projection::Setup setup(TO_DEG(au, lat0), TO_DEG(au, lon0), scale, - TO_M(lu, fe), TO_M(lu, fn), TO_DEG(au, sp1), TO_DEG(au, sp2)); + Projection::Setup setup(lat0, lon0, scale, fe, fn, sp1, sp2); _projection = Projection(g, m, setup, lu); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/src/map/mapfile.cpp new/GPXSee-5.5/src/map/mapfile.cpp --- old/GPXSee-5.4/src/map/mapfile.cpp 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/src/map/mapfile.cpp 2018-03-19 22:40:49.000000000 +0100 @@ -216,6 +216,9 @@ else if (name == "(VG94) VICGRID94 Victoria Australia") _projection = Projection(gcs, 9802, Projection::Setup(-37, 145, NAN, 2500000, 2500000, -36, -38), 9001); + else if (name == "(SUI) Swiss Grid") + _projection = Projection(gcs, 9815, Projection::Setup(46.570866, + 7.26225, 1.0, 600000, 200000, 90.0, 90.0), 9001); else { _errorString = QString("%1: Unknown map projection").arg(name); return false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/src/map/tileloader.cpp new/GPXSee-5.5/src/map/tileloader.cpp --- old/GPXSee-5.4/src/map/tileloader.cpp 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/src/map/tileloader.cpp 2018-03-19 22:40:49.000000000 +0100 @@ -77,6 +77,8 @@ for (int i = 0; i < list.count(); i++) dir.remove(list.at(i)); + + _downloader->clearErrors(); } QString TileLoader::tileUrl(const Tile &tile) const diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/src/map/tileloader.h new/GPXSee-5.5/src/map/tileloader.h --- old/GPXSee-5.4/src/map/tileloader.h 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/src/map/tileloader.h 2018-03-19 22:40:49.000000000 +0100 @@ -3,7 +3,8 @@ #include <QString> #include "tile.h" -#include "downloader.h" + +class Downloader; class TileLoader { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/src/map/transversemercator.cpp new/GPXSee-5.5/src/map/transversemercator.cpp --- old/GPXSee-5.4/src/map/transversemercator.cpp 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/src/map/transversemercator.cpp 2018-03-19 22:40:49.000000000 +0100 @@ -47,14 +47,14 @@ #define SPHSN(lat) \ - ((double)(_e->radius() / sqrt(1.e0 - _es * pow(sin(lat), 2)))) + ((double)(_a / sqrt(1.e0 - _es * pow(sin(lat), 2)))) #define SPHTMD(lat) \ ((double)(_ap * lat - _bp * sin(2.e0 * lat) + _cp * sin(4.e0 * lat) \ - _dp * sin(6.e0 * lat) + _ep * sin(8.e0 * lat))) #define DENOM(lat) \ ((double)(sqrt(1.e0 - _es * pow(sin(lat),2)))) #define SPHSR(lat) \ - ((double)(_e->radius() * (1.e0 - _es) / pow(DENOM(lat), 3))) + ((double)(_a * (1.e0 - _es) / pow(DENOM(lat), 3))) TransverseMercator::TransverseMercator(const Ellipsoid *ellipsoid, @@ -65,31 +65,32 @@ double b; - _e = ellipsoid; + _a = ellipsoid->radius(); _longitudeOrigin = deg2rad(longitudeOrigin); _latitudeOrigin = deg2rad(latitudeOrigin); _scale = scale; _falseEasting = falseEasting; _falseNorthing = falseNorthing; - _es = 2 * _e->flattening() - _e->flattening() * _e->flattening(); + _es = 2 * ellipsoid->flattening() - ellipsoid->flattening() + * ellipsoid->flattening(); _ebs = (1 / (1 - _es)) - 1; - b = _e->radius() * (1 - _e->flattening()); + b = _a * (1 - ellipsoid->flattening()); - tn = (_e->radius() - b) / (_e->radius() + b); + tn = (_a - b) / (_a + b); tn2 = tn * tn; tn3 = tn2 * tn; tn4 = tn3 * tn; tn5 = tn4 * tn; - _ap = _e->radius() * (1.e0 - tn + 5.e0 * (tn2 - tn3) / 4.e0 + 81.e0 + _ap = _a * (1.e0 - tn + 5.e0 * (tn2 - tn3) / 4.e0 + 81.e0 * (tn4 - tn5) / 64.e0); - _bp = 3.e0 * _e->radius() * (tn - tn2 + 7.e0 * (tn3 - tn4) / 8.e0 + 55.e0 + _bp = 3.e0 * _a * (tn - tn2 + 7.e0 * (tn3 - tn4) / 8.e0 + 55.e0 * tn5 / 64.e0 ) / 2.e0; - _cp = 15.e0 * _e->radius() * (tn2 - tn3 + 3.e0 * (tn4 - tn5 ) / 4.e0) / 16.0; - _dp = 35.e0 * _e->radius() * (tn3 - tn4 + 11.e0 * tn5 / 16.e0) / 48.e0; - _ep = 315.e0 * _e->radius() * (tn4 - tn5) / 512.e0; + _cp = 15.e0 * _a * (tn2 - tn3 + 3.e0 * (tn4 - tn5 ) / 4.e0) / 16.0; + _dp = 35.e0 * _a * (tn3 - tn4 + 11.e0 * tn5 / 16.e0) / 48.e0; + _ep = 315.e0 * _a * (tn4 - tn5) / 512.e0; } QPointF TransverseMercator::ll2xy(const Coordinates &c) const diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/src/map/transversemercator.h new/GPXSee-5.5/src/map/transversemercator.h --- old/GPXSee-5.4/src/map/transversemercator.h 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/src/map/transversemercator.h 2018-03-19 22:40:49.000000000 +0100 @@ -18,12 +18,12 @@ virtual Coordinates xy2ll(const QPointF &p) const; private: - const Ellipsoid *_e; double _longitudeOrigin; double _latitudeOrigin; double _scale; double _falseEasting; double _falseNorthing; + double _a; double _es; double _ebs; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-5.4/src/map/wmtsmap.cpp new/GPXSee-5.5/src/map/wmtsmap.cpp --- old/GPXSee-5.4/src/map/wmtsmap.cpp 2018-03-11 20:53:16.000000000 +0100 +++ new/GPXSee-5.5/src/map/wmtsmap.cpp 2018-03-19 22:40:49.000000000 +0100 @@ -3,6 +3,7 @@ #include "common/wgs84.h" #include "config.h" #include "transform.h" +#include "downloader.h" #include "wmts.h" #include "wmtsmap.h" ++++++ PKGBUILD ++++++ --- /var/tmp/diff_new_pack.I3zx8V/_old 2018-03-20 22:01:32.747120555 +0100 +++ /var/tmp/diff_new_pack.I3zx8V/_new 2018-03-20 22:01:32.755120267 +0100 @@ -1,5 +1,5 @@ pkgname=gpxsee -pkgver=5.4 +pkgver=5.5 pkgrel=1 pkgdesc='GPX viewer and analyzer' arch=('i686' 'x86_64') ++++++ debian.changelog ++++++ --- /var/tmp/diff_new_pack.I3zx8V/_old 2018-03-20 22:01:32.787119115 +0100 +++ /var/tmp/diff_new_pack.I3zx8V/_new 2018-03-20 22:01:32.791118971 +0100 @@ -1,3 +1,10 @@ +gpxsee (5.5) stable; urgency=high + + * Fixed deadlocks caused by infinite HTTP timeout. + * Several minor bugfixes. + + -- Martin Tuma <[email protected]> Mon, 19 Mar 2018 23:42:57 +0100 + gpxsee (5.4) stable; urgency=low * Added pace info. ++++++ gpxsee.dsc ++++++ --- /var/tmp/diff_new_pack.I3zx8V/_old 2018-03-20 22:01:32.895115227 +0100 +++ /var/tmp/diff_new_pack.I3zx8V/_new 2018-03-20 22:01:32.895115227 +0100 @@ -1,9 +1,9 @@ Format: 1.0 Source: gpxsee -Version: 5.4 +Version: 5.5 Binary: gpxsee Maintainer: Martin Tuma <[email protected]> Architecture: any Build-Depends: debhelper (>= 9), qtbase5-dev, qtbase5-dev-tools, qt5-qmake, qttools5-dev-tools, libqt5opengl5-dev Files: - 00000000000000000000000000000000 0 GPXSee-5.4.tar.gz + 00000000000000000000000000000000 0 GPXSee-5.5.tar.gz
