1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-12-03 16:09:08 +01:00

Compare commits

...

3 Commits

Author SHA1 Message Date
681f6c5b09 Version++ 2023-08-28 20:24:37 +02:00
e34f77f1a1 Use the real file names for suffix extraction on Android
Many file URLs/paths that are passed to GPXSee on Android are unusable for
extracting the file suffix due to the Android file name mangling. Use
the converted "display names" for suffix extraction where possible.
2023-08-28 20:18:38 +02:00
00e8004042 Improve GHP data detection
Do not consider all files with size divisible by 20 as valid GHP data... Require
at least on valid data point.
2023-08-28 20:14:30 +02:00
6 changed files with 10 additions and 5 deletions

View File

@ -1,4 +1,4 @@
version: 13.7.{build}
version: 13.8.{build}
configuration:
- Release

View File

@ -3,7 +3,7 @@ unix:!macx:!android {
} else {
TARGET = GPXSee
}
VERSION = 13.7
VERSION = 13.8
QT += core \

View File

@ -37,7 +37,7 @@ Unicode true
; The name of the installer
Name "GPXSee"
; Program version
!define VERSION "13.7"
!define VERSION "13.8"
; The file to write
OutFile "GPXSee-${VERSION}_x64.exe"

View File

@ -1,6 +1,7 @@
#include <QApplication>
#include <QFile>
#include <QFileInfo>
#include "common/util.h"
#include "gpxparser.h"
#include "tcxparser.h"
#include "csvparser.h"
@ -94,7 +95,7 @@ void Data::processData(QList<TrackData> &trackData, QList<RouteData> &routeData)
Data::Data(const QString &fileName, bool tryUnknown)
{
QFile file(fileName);
QFileInfo fi(fileName);
QFileInfo fi(Util::displayName(fileName));
QList<TrackData> trackData;
QList<RouteData> routeData;

View File

@ -270,6 +270,10 @@ bool GHPParser::parse(QFile *file, QList<TrackData> &tracks,
_errorString = "unexpected end of file";
return false;
}
if (!segment.size()) {
_errorString = "No usable data found";
return false;
}
tracks.append(TrackData());
tracks.last().append(segment);

View File

@ -65,7 +65,7 @@ MapList::ParserMap MapList::_parsers = parsers();
Map *MapList::loadFile(const QString &path, bool *isDir)
{
ParserMap::iterator it;
QFileInfo fi(path);
QFileInfo fi(Util::displayName(path));
QString suffix(fi.completeSuffix().toLower());
Map *map = 0;
QStringList errors;