1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-01 21:39:15 +02:00

Compare commits

..

16 Commits
10.1 ... 10.2

Author SHA1 Message Date
c0e2597dcc Merge branch 'origin/master' into Weblate. 2022-01-20 23:50:24 +01:00
ff0affc8ec Version++ 2022-01-20 23:50:23 +01:00
e38772c9b6 Added default DEM download URL 2022-01-20 23:48:38 +01:00
713876d7a4 Merge branch 'origin/master' into Weblate. 2022-01-18 21:31:18 +01:00
d0e0ea32ab Prefer GPS positioning sources if available 2022-01-18 21:30:50 +01:00
2529ea9932 Translated using Weblate (Esperanto)
Currently translated at 92.7% (407 of 439 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/eo/
2022-01-17 17:52:48 +01:00
025313edb0 Translated using Weblate (Russian)
Currently translated at 100.0% (439 of 439 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/ru/
2022-01-17 17:52:48 +01:00
86dbc58e8e Translated using Weblate (Finnish)
Currently translated at 97.9% (430 of 439 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fi/
2022-01-17 17:52:48 +01:00
3117127a3e Merge branch 'origin/master' into Weblate. 2022-01-14 00:15:44 +01:00
76c2da9b50 Do not buffer the I/O as we are already reading in blocks 2022-01-14 00:13:40 +01:00
39ab3d7a85 Translated using Weblate (French)
Currently translated at 100.0% (439 of 439 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fr/
2022-01-13 09:54:57 +01:00
53b34ff24c Added missing TLS plugins to Qt6 build 2022-01-10 21:54:39 +01:00
00a9adce1e Also ignore invalid dates in waypoint lines 2022-01-04 09:37:26 +01:00
c4e0ff6435 Ignore invalid dates
fixes #416
2022-01-03 23:21:55 +01:00
40616fb868 Do not load icons from the current directory when no symbols dir is set 2022-01-03 23:20:58 +01:00
c062a62014 Do not duplicate the suffixes in the formats list 2022-01-03 23:20:03 +01:00
14 changed files with 63 additions and 55 deletions

View File

@ -1,4 +1,4 @@
version: 10.1.{build}
version: 10.2.{build}
configuration:
- Release

View File

@ -3,7 +3,7 @@ unix:!macx {
} else {
TARGET = GPXSee
}
VERSION = 10.1
VERSION = 10.2
QT += core \
gui \

View File

@ -157,7 +157,7 @@
<message>
<location filename="../src/data/data.cpp" line="167"/>
<source>TwoNav files</source>
<translation type="unfinished"></translation>
<translation>TwoNav-dosieroj</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="168"/>

View File

@ -157,7 +157,7 @@
<message>
<location filename="../src/data/data.cpp" line="167"/>
<source>TwoNav files</source>
<translation type="unfinished"></translation>
<translation>TwoNav-tiedostot</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="168"/>

View File

@ -157,7 +157,7 @@
<message>
<location filename="../src/data/data.cpp" line="167"/>
<source>TwoNav files</source>
<translation type="unfinished"></translation>
<translation>Données TwoNav</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="168"/>
@ -423,7 +423,7 @@
<message>
<location filename="../src/GUI/gui.cpp" line="273"/>
<source>Show POI icons</source>
<translation type="unfinished"></translation>
<translation>Afficher les icônes POI</translation>
</message>
<message>
<location filename="../src/GUI/gui.cpp" line="303"/>
@ -450,22 +450,22 @@
<message>
<location filename="../src/GUI/gui.cpp" line="335"/>
<source>Show position</source>
<translation type="unfinished"></translation>
<translation>Afficher la position</translation>
</message>
<message>
<location filename="../src/GUI/gui.cpp" line="341"/>
<source>Follow position</source>
<translation type="unfinished"></translation>
<translation>Suivre la position</translation>
</message>
<message>
<location filename="../src/GUI/gui.cpp" line="346"/>
<source>Show coordinates</source>
<translation type="unfinished"></translation>
<translation>Afficher les coordonnées</translation>
</message>
<message>
<location filename="../src/GUI/gui.cpp" line="352"/>
<source>Show motion info</source>
<translation type="unfinished"></translation>
<translation>Afficher les infos de déplacement</translation>
</message>
<message>
<location filename="../src/GUI/gui.cpp" line="359"/>
@ -490,7 +490,7 @@
<message>
<location filename="../src/GUI/gui.cpp" line="377"/>
<source>Waypoint icons</source>
<translation type="unfinished"></translation>
<translation>Icônes de points de cheminement</translation>
</message>
<message>
<location filename="../src/GUI/gui.cpp" line="382"/>
@ -637,7 +637,7 @@
<message>
<location filename="../src/GUI/gui.cpp" line="642"/>
<source>Position</source>
<translation type="unfinished"></translation>
<translation>Position</translation>
</message>
<message>
<location filename="../src/GUI/gui.cpp" line="653"/>
@ -737,7 +737,7 @@
<message>
<location filename="../src/GUI/gui.cpp" line="842"/>
<source>Symbols directory:</source>
<translation type="unfinished"></translation>
<translation>Dossier de symboles :</translation>
</message>
<message>
<location filename="../src/GUI/gui.cpp" line="1235"/>
@ -1154,7 +1154,7 @@
<message>
<location filename="../src/map/maplist.cpp" line="135"/>
<source>QuickChart maps</source>
<translation type="unfinished"></translation>
<translation>Cartes QuickChart</translation>
</message>
<message>
<location filename="../src/map/maplist.cpp" line="139"/>
@ -1192,27 +1192,27 @@
<message>
<location filename="../src/GUI/motioninfoitem.cpp" line="87"/>
<source>kn</source>
<translation type="unfinished">nd</translation>
<translation>nd</translation>
</message>
<message>
<location filename="../src/GUI/motioninfoitem.cpp" line="90"/>
<source>mi/h</source>
<translation type="unfinished">mi/h</translation>
<translation>mi/h</translation>
</message>
<message>
<location filename="../src/GUI/motioninfoitem.cpp" line="93"/>
<source>km/h</source>
<translation type="unfinished">km/h</translation>
<translation>km/h</translation>
</message>
<message>
<location filename="../src/GUI/motioninfoitem.cpp" line="100"/>
<source>ft/min</source>
<translation type="unfinished"></translation>
<translation>pied/min</translation>
</message>
<message>
<location filename="../src/GUI/motioninfoitem.cpp" line="103"/>
<source>m/min</source>
<translation type="unfinished"></translation>
<translation>m/min</translation>
</message>
</context>
<context>
@ -1616,17 +1616,17 @@
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="283"/>
<source>Info background</source>
<translation type="unfinished"></translation>
<translation>Fond de l&apos;info</translation>
</message>
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="289"/>
<source>Crosshair color:</source>
<translation type="unfinished"></translation>
<translation>Couleur du réticule :</translation>
</message>
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="290"/>
<source>Info color:</source>
<translation type="unfinished"></translation>
<translation>Couleur d&apos;info :</translation>
</message>
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="363"/>
@ -1680,7 +1680,7 @@
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="622"/>
<source>Plugin:</source>
<translation type="unfinished"></translation>
<translation>Module complémentaire :</translation>
</message>
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="642"/>
@ -1829,7 +1829,7 @@
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="800"/>
<source>Position</source>
<translation type="unfinished"></translation>
<translation>Position</translation>
</message>
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="801"/>
@ -2350,7 +2350,7 @@
<message>
<location filename="../src/GUI/waypointitem.cpp" line="48"/>
<source>Symbol</source>
<translation type="unfinished"></translation>
<translation>Symbol</translation>
</message>
<message>
<location filename="../src/GUI/waypointitem.cpp" line="53"/>

View File

@ -157,7 +157,7 @@
<message>
<location filename="../src/data/data.cpp" line="167"/>
<source>TwoNav files</source>
<translation type="unfinished"></translation>
<translation>TwoNav файлы</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="168"/>

View File

@ -37,7 +37,7 @@ Unicode true
; The name of the installer
Name "GPXSee"
; Program version
!define VERSION "10.1"
!define VERSION "10.2"
; The file to write
OutFile "GPXSee-${VERSION}_x64.exe"
@ -256,6 +256,7 @@ Section "QT framework" SEC_QT
File "Qt6Core5Compat.dll"
File "Qt6Positioning.dll"
File "Qt6SerialPort.dll"
File /r "tls"
!else
File "Qt5Core.dll"
File "Qt5Gui.dll"

View File

@ -1059,13 +1059,7 @@ void GUI::openOptions()
if (options.plugin != _options.plugin
|| options.pluginParams.value(options.plugin)
!= _options.pluginParams.value(_options.plugin)) {
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
QGeoPositionInfoSource *source = QGeoPositionInfoSource::createSource(
options.plugin, this);
#else // QT 5.14
QGeoPositionInfoSource *source = QGeoPositionInfoSource::createSource(
options.plugin, options.pluginParams.value(options.plugin), this);
#endif // QT 5.14
QGeoPositionInfoSource *source = positionSource(options);
_showPositionAction->setEnabled(source != 0);
_mapView->setPositionSource(source);
delete _positionSource;
@ -2149,6 +2143,23 @@ void GUI::dropEvent(QDropEvent *event)
event->acceptProposedAction();
}
QGeoPositionInfoSource *GUI::positionSource(const Options &options)
{
QGeoPositionInfoSource *source;
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
source = QGeoPositionInfoSource::createSource(options.plugin, this);
#else // QT 5.14
source = QGeoPositionInfoSource::createSource(options.plugin,
options.pluginParams.value(options.plugin), this);
#endif // QT 5.14
if (source)
source->setPreferredPositioningMethods(
QGeoPositionInfoSource::SatellitePositioningMethods);
return source;
}
void GUI::writeSettings()
{
int index;
@ -2794,13 +2805,7 @@ void GUI::readSettings(QString &activeMap, QStringList &disabledPOIs)
.toString();
settings.endGroup();
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
_positionSource = QGeoPositionInfoSource::createSource(_options.plugin,
this);
#else // QT 5.14
_positionSource = QGeoPositionInfoSource::createSource(_options.plugin,
_options.pluginParams.value(_options.plugin), this);
#endif // QT 5.14
_positionSource = positionSource(_options);
_showPositionAction->setEnabled(_positionSource != 0);
settings.beginGroup(POSITION_SETTINGS_GROUP);

View File

@ -158,6 +158,7 @@ private:
qreal time() const;
qreal movingTime() const;
QAction *mapAction(const QString &name);
QGeoPositionInfoSource *positionSource(const Options &options);
void readSettings(QString &activeMap, QStringList &disabledPOIs);
void writeSettings();

View File

@ -198,7 +198,7 @@
#define POI_RADIUS_SETTING "poiRadius"
#define POI_RADIUS_DEFAULT (int)(IMPERIAL_UNITS() ? MIINM : KMINM)
#define DEM_URL_SETTING "demURL"
#define DEM_URL_DEFAULT ""
#define DEM_URL_DEFAULT "http://dem.gpxsee.org/$lat/$lat$lon.hgt.zip"
#define DEM_AUTH_SETTING "demAuthentication"
#define DEM_AUTH_DEFAULT false
#define DEM_USERNAME_SETTING "demUsername"

View File

@ -171,10 +171,14 @@ QString Data::formats()
QStringList Data::filter()
{
QStringList filter;
QString last;
for (QMultiMap<QString, Parser*>::iterator it = _parsers.begin();
it != _parsers.end(); it++)
filter << "*." + it.key();
it != _parsers.end(); it++) {
if (it.key() != last)
filter << "*." + it.key();
last = it.key();
}
return filter;
}

View File

@ -138,11 +138,8 @@ bool TwoNavParser::parse(QFile *file, QList<TrackData> &tracks,
if (list.size() > 5) {
QDateTime ts(timestamp(list.at(4), list.at(5)));
if (!ts.isValid()) {
_errorString = "Invalid date/time";
return false;
}
t.setTimestamp(ts);
if (ts.isValid())
t.setTimestamp(ts);
}
if (list.size() > 7) {
qreal elevation = list.at(7).toDouble(&ok);
@ -179,11 +176,8 @@ bool TwoNavParser::parse(QFile *file, QList<TrackData> &tracks,
if (list.size() > 6) {
QDateTime ts(timestamp(list.at(5), list.at(6)));
if (!ts.isValid()) {
_errorString = "Invalid date/time";
return false;
}
w.setTimestamp(ts);
if (ts.isValid())
w.setTimestamp(ts);
}
if (list.size() > 7) {
qreal elevation = list.at(7).toDouble(&ok);

View File

@ -27,6 +27,9 @@ QPair<qreal, qreal> Waypoint::elevations() const
void Waypoint::loadSymbolIcons(const QString &dir)
{
if (dir.isEmpty())
return;
QDir d(dir);
QFileInfoList files(d.entryInfoList(QDir::Files | QDir::Readable));

View File

@ -26,7 +26,7 @@ public:
_data.resize(1U<<subFile->blockBits());
_file.setFileName(subFile->fileName());
_file.open(QIODevice::ReadOnly);
_file.open(QIODevice::ReadOnly | QIODevice::Unbuffered);
}
private: