mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-06-27 03:29:16 +02:00
Optimize TextCodec initialization
QTextCodec initialization is very slow due to it's broken caching in Qt when ICU is enabled. Make TetCodec initialize fast anyway as it may be used very often in IMG maps (every LBL subfile has it's own codec!).
This commit is contained in:
@ -128,7 +128,7 @@ qint64 CryptDevice::readData(char *data, qint64 maxSize)
|
||||
class DataStream : public QDataStream
|
||||
{
|
||||
public:
|
||||
DataStream(QIODevice *d) : QDataStream(d) {}
|
||||
DataStream(QIODevice *d) : QDataStream(d), _codec(1252) {}
|
||||
|
||||
void setCodepage(quint16 codepage) {_codec = TextCodec(codepage);}
|
||||
|
||||
|
@ -75,7 +75,7 @@ bool TwoNavParser::parse(QFile *file, QList<TrackData> &tracks,
|
||||
QVector<Waypoint> &waypoints)
|
||||
{
|
||||
Q_UNUSED(polygons);
|
||||
TextCodec codec;
|
||||
TextCodec codec(1252);
|
||||
GCS gcs;
|
||||
bool ok, route = false, track = false, waypoint = false;
|
||||
|
||||
|
Reference in New Issue
Block a user