Commit Graph

291 Commits

Author SHA1 Message Date
Mat Sutcliffe
eb6b0ff289 Fix clang-tidy and clazy warnings 2021-08-29 17:02:27 +01:00
Mat Sutcliffe
09b58b8084 Issue #22 Error when FL doesn't end in 0 or 5 should be warning 2021-08-21 18:38:55 +01:00
Mat Sutcliffe
33209fa1eb Use std::as_const (C++17 feature) 2021-07-13 17:56:31 +01:00
Mat Sutcliffe
4df055afbe Issue #77 Break cyclic dependency between CIcon and CIconList by using CSequence<CIcon> 2020-12-19 18:50:38 +00:00
Mat Sutcliffe
d1b6776c44 Issue #77 Break dependency of sequence on propertyindex 2020-08-29 23:25:50 +01:00
Mat Sutcliffe
bb8aeaa3d0 Fix build with Clang on Windows 2020-08-29 14:16:17 +01: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
8e065a8fef Issue #77 Factor out parts of CDirectoryUtils into CSwiftDirectories
CDirectoryUtils is utilities for manipulating directories.
CSwiftDirectories is getters that return directories used by swift.
2020-08-29 14:16:12 +01:00
Mat Sutcliffe
2f22904540 Issue #73 Unittest for CIdentifier dbus object path conversion 2020-08-16 14:54:36 +01:00
Mat Sutcliffe
151810d6fc Issue #15 Shared state unittest 2020-08-01 19:48:36 +01:00
Mat Sutcliffe
073f1549a2 Issue #15 Added CVariant::matches()
If the contained object type has a matches() method, CVariant::matches()
will call that method and return its result.
(This is a utility to allow using CVariant to represent an event subscription.)
2020-08-01 13:18:56 +01:00
Mat Sutcliffe
6aa9f0cc25 Issue #15 Created CPromise, a way to set the result of QFuture objects
This enables several new features:
* singleShot can return a QFuture.
* a version of invokeMethod that returns a QFuture.
* CGenericDBusInterface::callDBusFuture, which returns a QFuture.
2020-08-01 13:18:55 +01:00
Mat Sutcliffe
07f6c8b73c Issue #15 CVariant can convert between CVariantList and our other container classes 2020-08-01 13:18:55 +01:00
Lars Toenning
6cf7571dff Add user-defined literals for physical quantities
Fixes #14
2020-07-17 10:33:01 +02:00
Lars Toenning
368dd1f46d [PQ] Add unary minus operator 2020-07-17 10:33:01 +02:00
Mat Sutcliffe
670b1a1986 Fix cppcheck and compiler warnings 2020-06-29 18:34:16 +01:00
Klaus Basan
a1ea9a2e10 Fixed unit test warnings as discussed, see https://discordapp.com/channels/539048679160676382/539925070550794240/663426372651319336 2020-01-07 19:57:28 +00:00
Mat Sutcliffe
48d1521d3a Correct filename extension 2020-01-07 19:57:25 +00:00
Mat Sutcliffe
4a0d8e9864 Fixed most Qt 5.14 deprecation warnings 2020-01-07 19:57:25 +00:00
Klaus Basan
81ade55cb5 Ref T730, added QT multimedia in some projects, as it is now needed in blackmisc 2019-10-11 18:59:58 +01:00
Roland Rossgotterer
e0b52db77a [MinGW] Fix many unresolved symbols 2019-09-16 22:41:33 +01:00
Klaus Basan
add649c321 Ref T709, improved normalization and space pressed handling, unit test 2019-09-16 22:41:14 +01:00
Klaus Basan
e62aa6fb2f Ref T715, setting for "night texture"
* settings class
* UI
2019-09-16 22:41:12 +01:00
Klaus Basan
34aa8333cc Ref T709, sync Qt free timestamp after parsing with swift version 2019-09-16 22:40:58 +01:00
Klaus Basan
6a2f08b49f Ref T709, UNIT test for JSON settings 2019-09-16 22:40:56 +01:00
Mat Sutcliffe
dd86be3335 String simplification (accent removal) using Unicode decomposition 2019-09-16 22:40:44 +01:00
Klaus Basan
9965fd039e Ref T704, improved airline prefix parsing (from callsign) 2019-09-16 22:40:31 +01:00
Mat Sutcliffe
35b0836754 Ref T696 Fix number formatting for CTime and CAngle.
- Removed the 'L' in the format strings, so the C locale is used.
- Added `1 + digits` to the `fieldWidth`, as this actually includes the
  decimal point and the digits after it.
2019-09-16 22:40:13 +01:00
Klaus Basan
74be3fa8c2 Added network to UNIT tests (needed for CUrl
Other includes where needed
2019-09-16 22:40:09 +01:00
Mat Sutcliffe
668a77d083 Ref T689 Settings validation can produce more descriptive error messages. 2019-09-16 22:40:05 +01:00
Mat Sutcliffe
4ab3e9a03b Ref T682 Don't convert text codec name to lower case, as it is case sensitive. 2019-09-16 22:40:03 +01:00
Klaus Basan
693c94c87a Send FP altitude without unit
https://discordapp.com/channels/539048679160676382/539846348275449887/593211815559823367
https://discordapp.com/channels/539048679160676382/539846348275449887/593063154238619649
2019-09-16 22:40:01 +01:00
Mat Sutcliffe
5d75d58784 Ref T570 Measure sortHint using true CPU time routines. 2019-04-12 14:54:47 +01:00
Mat Sutcliffe
6d9c1b4d5e Ref T552 Added unittest for QDataStream marshalling. 2019-04-12 13:57:18 +01:00
Mat Sutcliffe
e5e6c53c82 Fixed buggy implementation of CPhysicalQuantity::lessThan.
This bug could cause a variant containing a list containing a null PQ
to compare equal to a variant containing a list containing a non-null PQ.
2019-04-11 22:12:04 +01:00
Roland Rossgotterer
3f9042848f Use QDateTime::setOffsetFromUtc instead of QDateTime::setUtcOffset 2019-04-11 22:11:50 +01:00
Klaus Basan
804dcbf5b8 Temp disable sortHint UNIT test (until we know why it sporadically fails) 2019-04-11 22:11:41 +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
Roland Rossgotterer
94c2859e18 Replace QDBusConnection::localMachineId with QSysInfo::machineUniqueId()
QSysInfo::machineUniqueId() was added in Qt 5.11 and is using DBus independent unique machine ids everywhere except on Linux. This prevents running into an assert in case DBus is not properly installed at a very early stage of the application without any chance to give the user a warning and handle it gracefully.
2019-02-22 20:35:16 +00:00
Mat Sutcliffe
73d8cf392b Ref T275 testaircraftsituation: repeat test 20 times to mitigate external influences. 2019-02-22 20:34:59 +00:00
Mat Sutcliffe
4f2579b812 Ref T275 testaircraftsituation: detach lists to get meaningful benchmark results. 2019-02-22 20:34:58 +00:00
Mat Sutcliffe
cba820cbce Ref T485 Update for efficient QString usage in CLogMessage:
- `debug()`, `warning()`, `error()` etc. overloaded on `const char16_t[]` to accept UTF-16 string literals.
- Overloads on `const char *` are deleted to avoid accidents.
- Message is stored as QString and/or QStringView depending which overload is used.
- The multiplexing between QString and QStringView is handled by a special value class, to keep the metaclass simple.
- QStringView does not have `arg()` method, so had to implement our own.
2019-02-22 20:34:54 +00:00
Mat Sutcliffe
dd655bcb25 Ref T486 Using QRandomGenerator. 2019-02-22 20:34:53 +00:00
Mat Sutcliffe
bd9948bbff Ref T486 Using QMetaObject::invokeMethod with pointer-to-member-function (or functor). 2019-02-22 20:34:53 +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
Mat Sutcliffe
71de01065b Ref T464 Implement removal of one sequence from another in O(n),
assuming that elements in both sequences are in the same order in both.
2018-12-14 19:57:29 +01:00
Mat Sutcliffe
8a058202ed Fixed buggy CSequence::sortBy when sorting by multiple members.
Implementation of Predicates::MemberLess was wrong, so replaced it with a
simpler one. Also added a regression test and removed unused code.
2018-11-30 22:02:04 +01:00
Roland Rossgotterer
659b78832e Rewrite 7z uncompressing to work on all supported platforms
On Windows we ship 7za.exe in our binaries.
On MacOS we do the same, but the executable needs to be called with the full path.
On Linux we don't ship anything but assume it to be available from the distribution.
2018-11-29 20:54:25 +01:00
Roland Winklmeier
ee8af9f4c6 Filter other pilots ghost aircraft when flying in shared cockpit mode
When flying in shared cockpit mode, both pilots log into the network.
One as pilot to be visible to ATC and other pilots. The other one as
observer. For the observing user, the pilots aircraft needs to be filtered.
Filter algorithm is using the same schema as vPilot does.

ref T427
2018-11-16 02:49:54 +01:00