Commit Graph

60 Commits

Author SHA1 Message Date
Lars Toenning
bcc4bdd31e Add SPDX identifiers for REUSE compliance
Co-authored-by: Mat Sutcliffe <oktal3700@gmail.com>
2023-10-03 09:29:49 +02:00
Lars Toenning
970b7c3650 clang-format src 2023-04-18 16:07:19 +02:00
Lars Toenning
466e0dbae4 Read VATSIM servers from servers.json 2023-02-28 08:29:58 +01:00
Mat Sutcliffe
57d32da826 Use nested namespaces (C++17 feature) 2021-09-18 15:07:48 +01:00
Mat Sutcliffe
50eebb799d Update VATSIM data file reader to read new JSON data file format 2020-12-05 17:30:15 +00:00
Mat Sutcliffe
b80114213d Issue #77 Move mixin classes to separate files
By separating them from unrelated code, their dependents
can use them without depending on unrelated code, which
in turn helps to reduce cyclic dependencies.
2020-08-29 14:16:17 +01:00
Mat Sutcliffe
78987a678f Suppress Qt 5.15 deprecation warnings 2020-06-29 18:34:14 +01:00
Klaus Basan
299859646a VATSIM data file parser "fixes"
- Limit the number of parser errors going to the log
- stop parsing if no attributes can be obtained (otherwise we see too many parser messages)
2020-06-12 18:42:42 +01:00
Klaus Basan
5b3c011a15 Added "url" to signature "dataRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState state, int number, const QUrl &url)"
Allows to write log. messages with URL
2020-06-12 18:42:38 +01:00
Klaus Basan
c2d2d05566 Log.message 2020-01-07 19:57:21 +00:00
Mat Sutcliffe
942417b7a9 Avoid constructing CStatusMessage format string from external data source.
Put external data source as argument using stream operator instead.

Part 1 of hotfix for assert caused by percent character in vatsim-data.txt
2019-09-16 22:41:29 +01:00
Klaus Basan
b43ab76007 Add URL info for reading 2019-09-16 22:41:28 +01:00
Klaus Basan
5b5e139d10 Fix for index issue
https://discordapp.com/channels/539048679160676382/568904623151382546/604778928787161099
https://discordapp.com/channels/539048679160676382/567983892791951374/593854116992778263

5   org.qt-project.QtCore         	0x0000000104efe2c2 qt_assert_x(char const*, char const*, char const*, int) + 80
6   libblackcore.0.9.2.dylib      	0x0000000102ad79f1 BlackCore::Vatsim::CVatsimDataFileReader::parseVatsimFile(QNetworkReply*) + 13633 (qstringliteral.h:100)
2019-09-16 22:40:45 +01:00
Klaus Basan
4ecd8a78ad Handled some potentially "dangerous" parsing issues for VATSIM file (no coordinate)
https://discordapp.com/channels/539048679160676382/539486489977946112/593081121512751116
2019-09-16 22:40:00 +01:00
Mat Sutcliffe
e9a4c49d68 Ref T547 Update license masthead in all source code files. 2019-02-22 20:36:43 +00:00
Mat Sutcliffe
fe7a45afcf Ref T516 Update CStatusMessage call sites to use new syntax. 2019-02-22 20:35:51 +00:00
Mat Sutcliffe
225ff81252 Ref T485 Adjust CLogMessage and CStatusMessage call sites to use the new API. 2019-02-22 20:34:55 +00:00
Mat Sutcliffe
6c05c5249d When calling arg() on a QString constructed from a literal, use QStringLiteral. 2019-02-22 20:23:47 +00:00
Klaus Basan
e51bbd1f5d Ref T376, adjusted CServer class ctor 2018-10-05 17:39:55 +02:00
Klaus Basan
183280fa75 Ref T308, using an optimized (faster) function for YYYYmmdd string parsing
Ref T309, found that QDateTime::fromString returns a QDateTime object with local timestamp. Using a optimized version returns UTC objects now.

- The bug was found writing a unit test for Ref T308
- Slack: https://swift-project.slack.com/archives/G7GD2UP9C/p1534848725000100
2018-08-22 12:31:53 +02:00
Klaus Basan
b671c2a0a5 Style, removed redundant CForm overrides 2018-08-07 20:41:06 +02:00
Klaus Basan
6fb620a8f6 Clearer warning 2018-06-13 13:59:43 +02:00
Klaus Basan
abfa12c1ec Ref T272, skip VATSIM readers if (for sure) connected to an other eco system
Remark: This requires the server (=> ecosystem) to be connected, otherwise VATSIM data (before that connection) are still read as default
2018-06-01 01:30:31 +02:00
Klaus Basan
0d76cc8d3e Formatting 2018-05-08 16:06:33 +02:00
Klaus Basan
8c539fab0a Ref T215, FP value class
* split into prefix / aircraft ICAO / suffix
* suffix equipment code functions
* fixed FP remarks loading (JSON file)
* fixed missing sending of aircraft ICAO
2018-01-13 05:04:17 +01:00
Klaus Basan
1f9337609a Ref T172, adjustments for ecosystem
* stricter equal comparison ("changed" flag)
* set VATSIM server type and ecosystem in VATSIM reader
2017-12-29 19:49:38 +01:00
Klaus Basan
3de7d66e65 Ref T129, use map of CFlightPlanRemark instead of 2 individual maps 2017-10-10 00:27:58 +01:00
Klaus Basan
3c24d5c7f9 Ref T129, created CFlightPlanRemarks as value object and removed flight plan utils
* CFlightPlanRemarks supports the functionality of utils, but is also a valid value object
* deleted CFlightPlanUtils .h/.cpp
* CFlightPlan uses CFlightPlanRemarks
* changed classes like VATSIM data reader to use CFlightPlanRemarks (instead of utils)
2017-10-10 00:27:56 +01:00
Klaus Basan
8a4415ce07 Ref T129, parsed flight remarks can be obtained from VATSIM reader 2017-10-10 00:27:53 +01:00
Klaus Basan
34faabb6c5 Ref T129, fixed const correctness in VATSIM data reader 2017-10-10 00:27:51 +01:00
Klaus Basan
0d3882032b Ref T129, use utility function in CFlightPlanUtils in VATSIM file reader 2017-10-10 00:27:48 +01:00
Klaus Basan
21f80ca2e3 Ref T129, formatting VATSIM data reader and minor tweaks 2017-10-10 00:27:44 +01:00
Klaus Basan
4be7a61922 Ref T129, prephase formatting 2017-10-10 00:27:27 +01:00
Klaus Basan
b9760b4c60 Ref T149, use URL log to log network access in threaded reader classes
* added getFromNetworkAndLog
* adjusted DB reader
* adjusted other readers
2017-09-24 19:54:23 +01:00
Klaus Basan
f3847bd33c Ref T121, check if Internet is accessible
* in case the internet provider is down, this is not detected
* extended test to detect if access is possible
* in case of downtime this indicated in status component
2017-09-24 19:51:44 +01:00
Klaus Basan
874b517e23 Ref T104, use unified log function
and removed some redundant log messages
2017-09-24 19:50:25 +01:00
Klaus Basan
76b3b6c0b6 Utility function to directly log warning when network not accessible 2017-09-24 19:50:18 +01:00
Klaus Basan
8aed8f598e Ref T105, remove empty cleanup functions 2017-09-24 19:50:17 +01:00
Klaus Basan
b6b1b96ec4 Ref T105, use new style with threaded readers
* use doWorkCheck
* relaxed doWorkCheck in unit tests
* removed isShuttingDown, gracefulShutdown
* set timer object name (in case something is wrong, we might see the name in the log)
2017-09-24 19:50:08 +01:00
Klaus Basan
d2d44085ba Formatting 2017-09-24 19:49:03 +01:00
Klaus Basan
0b85a7c02a Log if VATSIM data file contains malformed lines 2017-09-24 19:49:01 +01:00
Klaus Basan
042f725e54 Ref T27, store flight plan remarks in VATSIM reader
This can be used in airspace monitor
2017-09-24 19:48:54 +01:00
Klaus Basan
2746b0a5f9 Improved VATSIM datafile parsing
* removed empty split value at end
* some formatting
* columns to lower case at 1st parsing, not always
2017-06-18 22:51:09 +02:00
Mathew Sutcliffe
d5ab73e1bc Replace QRegExp with QRegularExpression
Reviewers: kbasan, msutcliffe

Reviewed By: kbasan, msutcliffe

Subscribers: jenkins

Differential Revision: https://dev.swift-project.org/D11
2017-05-05 23:08:35 +01:00
Mathew Sutcliffe
3ea9e33e6b refs #937 Resolved clazy warnings: pass-by-value/reference. 2017-04-19 19:31:42 +01:00
Mathew Sutcliffe
b7f69c6887 refs #937 Resolved clazy warnings: unnecessary memory allocation. 2017-04-19 19:31:39 +01:00
Roland Winklmeier
7edd1bb621 Rename CThreadedReader::isNetworkConnectedAndAccessible() for consistency
refs #869
2017-02-24 15:22:13 +00:00
Klaus Basan
1ced7f3c0b refs #857, check if network is accessible in readers
* new read state "skipped"
* renamed to "isNetworkConnectedAndAccessible"
* checking before reading, which would only fail if network is not accessible
2017-02-24 00:08:55 +00:00
Klaus Basan
3e4c0a0c2a Minor adjustment to identify section causing issue in VATSIM file 2017-01-10 23:45:32 +00:00
Mathew Sutcliffe
7e85422da7 refs #837 CAircraftSituation altitude is part of its position. 2017-01-10 23:44:40 +00:00