mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-22 23:04:23 +02:00
Compare commits
9 Commits
11.11
...
9ff7ecea97
Author | SHA1 | Date | |
---|---|---|---|
9ff7ecea97 | |||
78e3c78197 | |||
38cd871178 | |||
5594bf74b6 | |||
65515143eb | |||
29895420b6 | |||
88f7e13500 | |||
51335a0f84 | |||
077cc20934 |
45
.github/workflows/codeql.yml
vendored
Normal file
45
.github/workflows/codeql.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
name: "CodeQL"
|
||||
|
||||
on: [workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'cpp' ]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install qtbase5-dev qtbase5-private-dev qtbase5-dev-tools qt5-qmake qttools5-dev-tools libqt5opengl5-dev qtpositioning5-dev libqt5svg5-dev
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
@ -188,6 +188,7 @@
|
||||
<file alias="silo.png">icons/map/marine/silo.png</file>
|
||||
<file alias="turning-basin.png">icons/map/marine/turning-basin.png</file>
|
||||
<file alias="entry-prohibited-line.png">icons/map/marine/entry-prohibited-line.png</file>
|
||||
<file alias="safety-zone-line.png">icons/map/marine/safety-zone-line.png</file>
|
||||
<file alias="cable-area-line.png">icons/map/marine/cable-area-line.png</file>
|
||||
<file alias="pipeline-area-line.png">icons/map/marine/pipeline-area-line.png</file>
|
||||
<file alias="windmotor.png">icons/map/marine/windmotor.png</file>
|
||||
|
BIN
icons/map/marine/safety-zone-line.png
Normal file
BIN
icons/map/marine/safety-zone-line.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 106 B |
@ -2397,12 +2397,12 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/temperaturegraph.cpp" line="111"/>
|
||||
<source>C</source>
|
||||
<translation>°C</translation>
|
||||
<translation>C</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/temperaturegraph.cpp" line="115"/>
|
||||
<source>F</source>
|
||||
<translation>°F</translation>
|
||||
<translation>F</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -2410,12 +2410,12 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/temperaturegraphitem.cpp" line="21"/>
|
||||
<source>C</source>
|
||||
<translation>°C</translation>
|
||||
<translation>C</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/temperaturegraphitem.cpp" line="21"/>
|
||||
<source>F</source>
|
||||
<translation>°F</translation>
|
||||
<translation>F</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/temperaturegraphitem.cpp" line="24"/>
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define CATMOR 40
|
||||
#define CATTRK 54
|
||||
#define CATREA 56
|
||||
#define CATSIT 61
|
||||
#define CATSCF 65
|
||||
#define CATWAT 69
|
||||
#define CATWRK 71
|
||||
@ -24,6 +25,7 @@
|
||||
#define WATLEV 187
|
||||
|
||||
#define I_CATACH 17000
|
||||
#define I_CATSIT 17002
|
||||
#define I_RESTRN 17004
|
||||
#define I_CATHAF 17008
|
||||
#define I_RDOCAL 17017
|
||||
|
@ -97,6 +97,7 @@ int ISO8211::readDR(QFile &file, QVector<FieldDefinition> &fields) const
|
||||
QByteArray fieldLen, fieldPos;
|
||||
int len, lenSize, posSize, tagSize, offset;
|
||||
|
||||
static_assert(sizeof(ddr) == 24, "Invalid DR alignment");
|
||||
if (file.read((char*)&ddr, sizeof(ddr)) != sizeof(ddr))
|
||||
return -1;
|
||||
|
||||
|
@ -51,22 +51,24 @@ static QMap<uint,uint> orderMapInit()
|
||||
map.insert(TYPE(UWTROC), 26);
|
||||
map.insert(TYPE(WATTUR), 27);
|
||||
map.insert(TYPE(PILBOP), 28);
|
||||
map.insert(TYPE(I_RDOCAL), 29);
|
||||
map.insert(TYPE(I_TRNBSN), 30);
|
||||
map.insert(TYPE(HRBFAC), 31);
|
||||
map.insert(TYPE(I_HRBFAC), 31);
|
||||
map.insert(TYPE(PILPNT), 32);
|
||||
map.insert(TYPE(ACHBRT), 33);
|
||||
map.insert(TYPE(I_ACHBRT), 33);
|
||||
map.insert(TYPE(CRANES), 34);
|
||||
map.insert(TYPE(I_CRANES), 34);
|
||||
map.insert(TYPE(I_WTWGAG), 35);
|
||||
map.insert(TYPE(PYLONS), 36);
|
||||
map.insert(TYPE(LNDMRK), 37);
|
||||
map.insert(TYPE(SILTNK), 38);
|
||||
map.insert(TYPE(LNDELV), 39);
|
||||
map.insert(TYPE(SMCFAC), 40);
|
||||
map.insert(TYPE(BUISGL), 41);
|
||||
map.insert(TYPE(SISTAT), 29);
|
||||
map.insert(TYPE(I_SISTAT), 29);
|
||||
map.insert(TYPE(I_RDOCAL), 30);
|
||||
map.insert(TYPE(I_TRNBSN), 31);
|
||||
map.insert(TYPE(HRBFAC), 32);
|
||||
map.insert(TYPE(I_HRBFAC), 32);
|
||||
map.insert(TYPE(PILPNT), 33);
|
||||
map.insert(TYPE(ACHBRT), 34);
|
||||
map.insert(TYPE(I_ACHBRT), 34);
|
||||
map.insert(TYPE(CRANES), 35);
|
||||
map.insert(TYPE(I_CRANES), 35);
|
||||
map.insert(TYPE(I_WTWGAG), 36);
|
||||
map.insert(TYPE(PYLONS), 37);
|
||||
map.insert(TYPE(LNDMRK), 38);
|
||||
map.insert(TYPE(SILTNK), 39);
|
||||
map.insert(TYPE(LNDELV), 40);
|
||||
map.insert(TYPE(SMCFAC), 41);
|
||||
map.insert(TYPE(BUISGL), 42);
|
||||
|
||||
map.insert(TYPE(I_DISMAR), 0xFFFFFFFE);
|
||||
map.insert(TYPE(SOUNDG), 0xFFFFFFFF);
|
||||
@ -220,6 +222,22 @@ static QString hUnits(uint type)
|
||||
}
|
||||
}
|
||||
|
||||
static QString sistat(uint type)
|
||||
{
|
||||
switch (type) {
|
||||
case 1:
|
||||
return "SS (Port Control)";
|
||||
case 3:
|
||||
return "SS (INT)";
|
||||
case 6:
|
||||
return "SS (Lock)";
|
||||
case 8:
|
||||
return "SS (Bridge)";
|
||||
default:
|
||||
return "SS";
|
||||
}
|
||||
}
|
||||
|
||||
MapData::Point::Point(uint type, const Coordinates &c, const QString &label,
|
||||
const QVector<QByteArray> ¶ms) : _type(type), _pos(c), _label(label)
|
||||
{
|
||||
@ -233,6 +251,10 @@ MapData::Point::Point(uint type, const Coordinates &c, const QString &label,
|
||||
if (!params.at(1).isEmpty())
|
||||
_label = QString("VHF ") + QString::fromLatin1(params.at(1));
|
||||
_param = QVariant(params.at(0).toDouble());
|
||||
} else if (type>>16 == I_SISTAT || type>>16 == SISTAT) {
|
||||
if (_label.isEmpty())
|
||||
_label = sistat(type && 0xFF);
|
||||
_type = TYPE(SISTAT);
|
||||
}
|
||||
}
|
||||
|
||||
@ -509,7 +531,9 @@ MapData::Attr MapData::pointAttr(const ISO8211::Record &r, uint OBJL)
|
||||
|| (OBJL == BUAARE && key == CATBUA)
|
||||
|| (OBJL == SMCFAC && key == CATSCF)
|
||||
|| (OBJL == BUISGL && key == FUNCTN)
|
||||
|| (OBJL == WATTUR && key == CATWAT))
|
||||
|| (OBJL == WATTUR && key == CATWAT)
|
||||
|| (OBJL == SISTAT && key == CATSIT)
|
||||
|| (OBJL == I_SISTAT && key == I_CATSIT))
|
||||
subtype = av.at(1).toByteArray().toUInt();
|
||||
else if (OBJL == I_DISMAR && key == CATDIS)
|
||||
subtype |= av.at(1).toByteArray().toUInt();
|
||||
|
@ -71,6 +71,7 @@
|
||||
#define RIVERS 114
|
||||
#define ROADWY 116
|
||||
#define SLCONS 122
|
||||
#define SISTAT 123
|
||||
#define SILTNK 125
|
||||
#define SLOTOP 126
|
||||
#define SMCFAC 128
|
||||
@ -90,6 +91,7 @@
|
||||
#define I_ACHARE 17001
|
||||
#define I_DISMAR 17004
|
||||
#define I_RESARE 17005
|
||||
#define I_SISTAT 17007
|
||||
#define I_BERTHS 17010
|
||||
#define I_BRIDGE 17011
|
||||
#define I_CBLOHD 17012
|
||||
|
@ -67,6 +67,9 @@ void Style::polygonStyle()
|
||||
QImage(":/marine/entry-prohibited-line.png"));
|
||||
_polygons[SUBTYPE(I_RESARE, 17)] = Polygon(
|
||||
QImage(":/marine/entry-prohibited-line.png"));
|
||||
_polygons[SUBTYPE(RESARE, 12)] = Polygon(QImage(":/marine/safety-zone-line.png"));
|
||||
_polygons[SUBTYPE(I_RESARE, 12)] = Polygon(QImage(":/marine/safety-zone-line.png"));
|
||||
_polygons[SUBTYPE(RESARE, 1)] = Polygon(QImage(":/marine/safety-zone-line.png"));
|
||||
_polygons[SUBTYPE(ACHARE, 1)] = Polygon(QImage(":/marine/anchor-line.png"));
|
||||
_polygons[SUBTYPE(I_ACHARE, 1)] = Polygon(QImage(":/marine/anchor-line.png"));
|
||||
_polygons[TYPE(PRCARE)] = Polygon(QBrush(QColor("#eb49eb"),
|
||||
@ -117,7 +120,8 @@ void Style::polygonStyle()
|
||||
<< TYPE(DMPGRD) << TYPE(TSEZNE) << TYPE(OBSTRN) << TYPE(UWTROC)
|
||||
<< TYPE(DWRTPT) << SUBTYPE(ACHARE, 1) << SUBTYPE(I_ACHARE, 1)
|
||||
<< SUBTYPE(RESARE, 9) << SUBTYPE(RESARE, 2) << SUBTYPE(I_RESARE, 2)
|
||||
<< SUBTYPE(RESARE, 17) << SUBTYPE(I_RESARE, 17) << TYPE(CBLARE)
|
||||
<< SUBTYPE(RESARE, 17) << SUBTYPE(I_RESARE, 17) << SUBTYPE(RESARE, 12)
|
||||
<< SUBTYPE(I_RESARE, 12) << SUBTYPE(RESARE, 1) << TYPE(CBLARE)
|
||||
<< TYPE(PIPARE) << TYPE(PRCARE) << SUBTYPE(MARKUL, 3);
|
||||
}
|
||||
|
||||
@ -241,6 +245,7 @@ void Style::pointStyle()
|
||||
_points[SUBTYPE(I_DISMAR, 2)].setTextFontSize(Small);
|
||||
_points[SUBTYPE(I_DISMAR, 2)].setHaloColor(QColor());
|
||||
_points[SUBTYPE(I_DISMAR, 3)] = _points[SUBTYPE(I_DISMAR, 2)];
|
||||
_points[SUBTYPE(I_DISMAR, 4)] = _points[SUBTYPE(I_DISMAR, 2)];
|
||||
_points[TYPE(CGUSTA)] = Point(QImage(":/marine/coast-guard.png"));
|
||||
_points[TYPE(RDOSTA)] = Point(QImage(":/marine/radio.png"));
|
||||
_points[TYPE(RADSTA)] = Point(QImage(":/marine/radar.png"));
|
||||
@ -255,6 +260,7 @@ void Style::pointStyle()
|
||||
_points[SUBTYPE(WATTUR, 3)] = Point(QImage(":/marine/overfalls.png"));
|
||||
_points[SUBTYPE(WATTUR, 4)] = Point(QImage(":/marine/overfalls.png"));
|
||||
_points[TYPE(PILBOP)] = Point(QImage(":/marine/boarding-place.png"));
|
||||
_points[TYPE(SISTAT)] = Point(QImage(":/marine/pylon.png"));
|
||||
|
||||
_points[SUBTYPE(SMCFAC, 7)] = Point(QImage(":/POI/restaurant-11.png"));
|
||||
_points[SUBTYPE(SMCFAC, 11)] = Point(QImage(":/POI/pharmacy-11.png"));
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef SECTION_H
|
||||
#define SECTION_H
|
||||
#ifndef IMG_SECTION_H
|
||||
#define IMG_SECTION_H
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
@ -14,4 +14,4 @@ struct Section {
|
||||
|
||||
}
|
||||
|
||||
#endif // SECTION_H
|
||||
#endif // IMG_SECTION_H
|
||||
|
Reference in New Issue
Block a user