mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 19:55:53 +01:00
Compare commits
No commits in common. "65fac30780d66e081fd222e1e116220a84fa144f" and "3b3f06cec8b6b0c071febe630576dfdc5a96be9d" have entirely different histories.
65fac30780
...
3b3f06cec8
@ -19,6 +19,9 @@ QT += core \
|
|||||||
serialport
|
serialport
|
||||||
greaterThan(QT_MAJOR_VERSION, 5) {
|
greaterThan(QT_MAJOR_VERSION, 5) {
|
||||||
QT += openglwidgets
|
QT += openglwidgets
|
||||||
|
lessThan(QT_MINOR_VERSION, 5) {
|
||||||
|
QT += core5compat
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CONFIG += object_parallel_to_source
|
CONFIG += object_parallel_to_source
|
||||||
@ -578,13 +581,11 @@ unix:!macx:!android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
QT += core5compat
|
RESOURCES += theme-color.qrc
|
||||||
|
|
||||||
HEADERS += src/GUI/navigationwidget.h
|
HEADERS += src/GUI/navigationwidget.h
|
||||||
SOURCES += src/GUI/navigationwidget.cpp
|
SOURCES += src/GUI/navigationwidget.cpp
|
||||||
|
|
||||||
RESOURCES += theme-color.qrc
|
|
||||||
|
|
||||||
defineReplace(versionCode) {
|
defineReplace(versionCode) {
|
||||||
segments = $$split(1, ".")
|
segments = $$split(1, ".")
|
||||||
for (segment, segments): \
|
for (segment, segments): \
|
||||||
|
@ -1,17 +1,6 @@
|
|||||||
#include "textcodec.h"
|
#include "textcodec.h"
|
||||||
|
|
||||||
/*
|
#if QT_VERSION < QT_VERSION_CHECK(6, 5, 0)
|
||||||
QStringDecoder can use the ICU library for codepage transformations since
|
|
||||||
Qt 6.5, but we use QTextCodec from the core5compat module on Android to
|
|
||||||
reduce the size of the app bundle (the ICU library has ~30MB).
|
|
||||||
|
|
||||||
On all other platforms, we require a Qt6 build with ICU support for all
|
|
||||||
the CP* encodings to work. On Linux, most distros compile Qt6 with ICU
|
|
||||||
support, on Windows and OS X a special Qt6 build is required as
|
|
||||||
the "official" Qt6 installers have ICU support disabled (QTBUG-121353).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) || defined(Q_OS_ANDROID)
|
|
||||||
|
|
||||||
static QTextCodec *codec(int mib)
|
static QTextCodec *codec(int mib)
|
||||||
{
|
{
|
||||||
@ -85,7 +74,7 @@ QString TextCodec::toString(const QByteArray &ba)
|
|||||||
return _codec ? _codec->toUnicode(ba) : QString::fromLatin1(ba);
|
return _codec ? _codec->toUnicode(ba) : QString::fromLatin1(ba);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // QT 6 || ANDROID
|
#else // QT 6.5
|
||||||
|
|
||||||
TextCodec::TextCodec()
|
TextCodec::TextCodec()
|
||||||
{
|
{
|
||||||
@ -108,4 +97,4 @@ QString TextCodec::toString(const QByteArray &ba)
|
|||||||
{
|
{
|
||||||
return _decoder.isValid() ? _decoder.decode(ba) : QString::fromLatin1(ba);
|
return _decoder.isValid() ? _decoder.decode(ba) : QString::fromLatin1(ba);
|
||||||
}
|
}
|
||||||
#endif // QT 6 || ANDROID
|
#endif // QT 6.5
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
#define TEXTCODEC_H
|
#define TEXTCODEC_H
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) || defined(Q_OS_ANDROID)
|
#if QT_VERSION < QT_VERSION_CHECK(6, 5, 0)
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
#else // QT 6 || ANDROID
|
#else // QT 6.5
|
||||||
#include <QStringDecoder>
|
#include <QStringDecoder>
|
||||||
#endif // QT 6 || ANDROID
|
#endif // QT 6.5
|
||||||
|
|
||||||
class TextCodec
|
class TextCodec
|
||||||
{
|
{
|
||||||
@ -17,7 +17,7 @@ public:
|
|||||||
QString toString(const QByteArray &ba);
|
QString toString(const QByteArray &ba);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) || defined(Q_OS_ANDROID)
|
#if QT_VERSION < QT_VERSION_CHECK(6, 5, 0)
|
||||||
QTextCodec *_codec;
|
QTextCodec *_codec;
|
||||||
#else // QT 6.5
|
#else // QT 6.5
|
||||||
QStringDecoder _decoder;
|
QStringDecoder _decoder;
|
||||||
|
@ -446,9 +446,9 @@ void RasterTile::render()
|
|||||||
QList<TextItem*> textItems;
|
QList<TextItem*> textItems;
|
||||||
QImage arrows[2];
|
QImage arrows[2];
|
||||||
|
|
||||||
arrows[ROAD] = (_ratio > 1.0)
|
arrows[ROAD] = (_ratio >= 2)
|
||||||
? QImage(":/map/arrow@2x.png") : QImage(":/map/arrow.png");
|
? QImage(":/map/arrow@2x.png") : QImage(":/map/arrow.png");
|
||||||
arrows[WATER] = (_ratio > 1.0)
|
arrows[WATER] = (_ratio >= 2)
|
||||||
? QImage(":/map/water-arrow@2x.png") : QImage(":/map/water-arrow.png");
|
? QImage(":/map/water-arrow@2x.png") : QImage(":/map/water-arrow.png");
|
||||||
|
|
||||||
fetchData(polygons, lines, points);
|
fetchData(polygons, lines, points);
|
||||||
|
Loading…
Reference in New Issue
Block a user