Commit Graph

272 Commits

Author SHA1 Message Date
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
Klaus Basan
e378ec235a Ref T429, UNIT test for PBH interpolator 2018-11-16 02:49:53 +01:00
Klaus Basan
985c06816b Ref T429, unit test to test same/changed position 2018-11-16 02:49:53 +01:00
Klaus Basan
c056d74820 Ref T424, FP unit test 2018-11-16 02:49:51 +01:00
Klaus Basan
0dbaf989e9 Ref T424, renamed altitude string functions and added "roundedToNearest100ft" 2018-11-06 01:41:48 +01:00
Roland Winklmeier
1a63c00a71 Change CService::getAircraftLivery() to return livery without path
CService::getAircraftLivery() is expected to return the livery name itself
without the full path.

ref T378
2018-11-04 17:42:43 +01:00
Klaus Basan
c6025e5994 Use BLACKTEST_MAIN in tests to avoid "QWARN : BlackMiscTest::CTestXPlane::acfPropertiesTest() QCoreApplication::applicationDirPath: Please instantiate the QApplication object first" 2018-11-04 17:42:42 +01:00
Klaus Basan
5dbf4468f2 COM frequency rounding + testcase 2018-10-05 17:39:56 +02:00
Mat Sutcliffe
d2d27a8eac Rework sortHint test to pre-construct 500k separate situationlist objects
and then test each one, instead of just testing a single list object 500k times.
As a result, performance on Mac is comparable to Windows and Linux.
2018-09-12 17:40:40 +02:00
Roland Winklmeier
5cc8249b38 Add X-Plane utils unit test 2018-08-25 22:12:02 +02:00
Roland Winklmeier
77ce9f8b8a Split the giant test binaries into smaller unit tests
This is an intermediate step to have smaller unit tests. It is a trade off
between having many many test executables compared to a few bigger ones. But
this comes a lot closer to what QtTest is meant to be used.
2018-08-25 22:12:01 +02:00
Klaus Basan
433818ca4f Ref T308, if QDateTime is invalid (normal state) setting a offset turns it into a valid timestamp of 1970 (which is wrong) 2018-08-22 12:32:01 +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
1e783a2ce6 Skip hint test in any case on MacOS
Remark: Sometimes we have up to 25% overhead on MacOS

QDEBUG :BlackMiscTest::CTestAircraftSituation::sortHint() MacOS: "yes"
QDEBUG : BlackMiscTest::CTestAircraftSituation::sortHint() Access without hint 48 ms
QDEBUG : BlackMiscTest::CTestAircraftSituation::sortHint() Access with hint 60 ms
QDEBUG : BlackMiscTest::CTestAircraftSituation::sortHint() Access ratio 1.25
FAIL!  : BlackMiscTest::CTestAircraftSituation::sortHint() 'hint <= noHint' returned FALSE. (Expected hinted sort being faster)
2018-08-09 17:21:04 +02:00
Klaus Basan
dd687b7d90 Cppcheck and unit test fixes 2018-08-07 20:39:06 +02:00
Klaus Basan
21f901590b UNIT test can be skipped on MacOS 2018-07-12 18:29:44 +02:00
Klaus Basan
978fe5eea2 Ref T275, Ref T280 hint for timestamp based list if they are already sorted 2018-06-18 03:04:29 +02:00
Klaus Basan
6ed541b6ab Ref T243, Ref T273, added info about elevation (where did we obtain it?) 2018-06-13 13:59:52 +02:00
Klaus Basan
c6f3d4e2f2 Ref T270, mark interpolator as unit test
* if we use "recycled" parts, we have to store also the last status
* mark unit test so "recycling" is disabled
* status flag for "reused"
2018-06-13 13:59:46 +02:00
Klaus Basan
b8829cca56 Minor interpolator unit test adjustment 2018-06-13 13:59:34 +02:00