Commit Graph

2019 Commits

Author SHA1 Message Date
Klaus Basan
d96a9a9fa2 Improved update missing parts 2017-09-24 19:49:02 +01:00
Klaus Basan
e10ab7b9de Ref T26, preparing to use flight plan data
* stub utility class (no function yet)
* use value objects in matcher signature instead of strings)
* removed initNewAircraft, use reverseLookupModelWithFlightplanData
2017-09-24 19:48:59 +01:00
Klaus Basan
8cf79e4ddb Fixed minor isEmpty() bug 2017-06-27 20:50:34 +02:00
Klaus Basan
b50071fa3c Replace CR for html string 2017-06-27 20:50:34 +02:00
Klaus Basan
417496024e Ref T26, Ref T27, added utility function in remote aircraft provider 2017-06-27 20:50:33 +02:00
Klaus Basan
0c336952d2 Ref T26, Ref T27, utility functions in "value object" classes 2017-06-27 20:50:31 +02:00
Klaus Basan
1956a27b19 Formatting 2017-06-27 20:50:29 +02:00
Klaus Basan
36037c4c04 Ref T85, minor improvements on server type
* UI: generic generation of combobox
* UI: Read only for combobox
* CServer utility functions
2017-06-27 20:50:28 +02:00
Klaus Basan
6d26c96569 Ref T27, preparation for refactoring, turned private slots into normal member functions
* Motivation: slots no longer required, and in the driver the (small) slot overhead might matter
* renamed some members to better reflect future use
* timer intervals as constexpr
* fixed some typos and comments
2017-06-27 20:50:26 +02:00
Klaus Basan
5aaf5cdeb1 Improved log messages and some typos fixed in DB reader 2017-06-27 20:50:25 +02:00
Mathew Sutcliffe
de5cb56525 Fixed strict aliasing warning
Summary:
Use `noquote` method instead of relying on undefined behaviour. This fixes a warning in GCC 6.3.

`noquote` method was added in Qt 5.4.

Reviewers: #swift_pilot_client, kbasan

Reviewed By: kbasan

Subscribers: jenkins

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D26
2017-06-23 18:17:56 +01:00
Klaus Basan
a7e5b70633 Unified parameter nane 2017-06-18 22:51:11 +02: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
Klaus Basan
63598a6a4e Ref T70, utility functions
* remove duplicates
* 3 model descriptions
2017-06-18 22:51:07 +02:00
Klaus Basan
eecbcbf914 Ref T80, remove invalid combined codes 2017-06-18 22:51:05 +02:00
Klaus Basan
699a8d0f9f Ref T82, removed add button for servers, only save
* save will add a new server when not already existing
* when saved with same name, it will override values
* default values for FSD setup
* adjusted validation
2017-06-18 22:51:04 +02:00
Klaus Basan
76e1a06c44 Ref T82, allow to sort by severity 2017-06-18 22:51:03 +02:00
Klaus Basan
e45ad3b7e9 Fix missing arg 2017-06-18 22:51:03 +02:00
Roland Winklmeier
5d1b5dba38 Allow to select server type in FSD settings
Summary:
With this change the server type is a dynamic setting per server and
replaces the hardcoded global server type in CNetworkVatlib. This allows
the user to select the server type in settings ui and configures
the vatlib session accordingly.
This also removes the command line argument to set the server type since
it doesn't make sense anymore.

Reviewers: msutcliffe

Reviewed By: msutcliffe

Subscribers: jenkins

Differential Revision: https://dev.swift-project.org/D24
2017-06-09 12:27:58 +02:00
Mathew Sutcliffe
2509fb9d2e Fatal message should generate a messagebox on Windows.
Qt already does this in debug builds, so this just makes release builds consistent.
2017-05-15 22:31:39 +01:00
Mathew Sutcliffe
ce6d0d8f1e A failed BLACK_VERIFY will generate a Crashpad crash report.
Using noinline to make sure the call to failedVerify is visible in the stack trace.
2017-05-15 22:31:38 +01:00
Mathew Sutcliffe
bc80fd3bd5 [feature][XPlane] Set own aircraft model string when own aircraft changes.
Summary:
Refactored parts of CAircraftModelLoaderXPlane::parseFlyableAirplanes into static method extractAcfProperties that can be called by xswiftbus.

Used extractAcfProperties in xswiftbus to provide the model string to the driver. Implemented CSimulatorXPlane::ps_emitOwnAircraftModelChanged.

Implements T74.

Reviewers: rwinklmeier

Reviewed By: rwinklmeier

Subscribers: jenkins

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D23
2017-05-14 17:21:39 +01:00
Mathew Sutcliffe
50b8fbe8fe [bug][Windows][Installer][DBus] Install session.conf in the correct location where dbus-daemon will look for it.
Summary:
On Windows, libdbus will spawn dbus-daemon when swift tries to connect to the session bus.

The daemon looks for session.conf in the share directory.
This patch ensures session.conf is installed in that directory.

Fixes T79.

Reviewers: rwinklmeier

Reviewed By: rwinklmeier

Subscribers: jenkins

Tags: #swift_pilot_client

Maniphest Tasks: T79

Differential Revision: https://dev.swift-project.org/D22
2017-05-14 17:21:37 +01:00
Mathew Sutcliffe
41ff563e19 T66 A new smart pointer for managing a CContinuousWorker subclass instance.
Owns the worker before it starts, when ownership is transferred to the thread.
2017-05-14 17:21:34 +01:00
Mathew Sutcliffe
ca81c65eae T66 CContinuousWorker tracks whether it has been started,
and when starting checks that it was not already started.
2017-05-14 17:21:33 +01:00
Mathew Sutcliffe
fd649c0b5c T73 Added virtual final destructors in CMeasurementUnit derived classes.
This fixes the GCC warning "deleting polymorphic object with non-virtual destructor".
They are marked final so the virtual dispatch can be optimized out, because they don't need to be overridden.
2017-05-14 17:21:31 +01:00
Mathew Sutcliffe
07ec7e6bc1 T73 Pass units by value.
Class types which are trivial to copy should be passed by value.
2017-05-14 17:21:30 +01:00
Mathew Sutcliffe
c8d78ada65 T73 Flyweight pattern based on pimpl, to reduce CMeasurementUnit memory usage.
* All members of CMeasurementUnit moved into nested pimpl class Data.
* CMeasurementUnit has only one member: a pointer to a const Data.
* Static const CMeasurementUnits replaced with static const Datas.
* Each CMeasurementUnit singleton method returns by-value a CMeasurementUnit containing a pointer to a static const Data.
* Means CMeasurementUnit is trivial to copy because we never copy the pimpl members.
** Works because the available units are fixed at compile time so we never need to create novel units at runtime.
2017-05-14 17:21:23 +01:00
Mathew Sutcliffe
fef2bc528e T73 Enabled for constexpr, to take advantage of constant-initialization.
* CMeasurementUnit and every one of its members is a literal type.
** This requires using QLatin1String instead of QString.
* Every static const CMeasurementUnit is static constexpr.
** This means they are initialized at compile time, no runtime initialization needed.
2017-05-14 17:13:40 +01:00
Mathew Sutcliffe
5e4349bba6 T73 Style. 2017-05-14 15:08:04 +01:00
Mathew Sutcliffe
48482d8d1e T73 CMeasurementUnit converter strategy based on function pointers.
Because function pointers are literal types, so they can be constexpr.
2017-05-14 15:08:03 +01:00
Mathew Sutcliffe
895190c4d0 T73 Fixed non-threadsafe static initialization. 2017-05-14 15:08:01 +01:00
Mathew Sutcliffe
e848459ccb Avoiding QRegularExpression for simple stuff [follow-up D11]
Summary: Fixing a snag I noticed while reviewing D11. There is no need to use a regex for such a simple thing as removing `[^A-Z]`. Some other minor optimizations in the same function.

Reviewers: rwinklmeier, kbasan

Reviewed By: rwinklmeier

Subscribers: jenkins

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D20
2017-05-14 15:04:32 +01:00
Mathew Sutcliffe
91341890ec Use a blocking queued connection to CLogHandler::logLocalMessage
when logging a fatal message from a worker thread.
Hopefully this will allow assert messages to be recorded in the logs.
2017-05-11 17:39:42 +01:00
Mathew Sutcliffe
f34c48cf6c T79 Improved log messages. 2017-05-11 16:37:54 +01:00
Klaus Basan
a4100d7efa Ref T77, tooltip for models (HTML Summary) 2017-05-09 19:13:54 +02:00
Klaus Basan
afbb87298f Ref T77, prefix for getDbKeyAsStringInParentheses 2017-05-09 19:13:53 +02:00
Klaus Basan
5558cee4d8 Ref T67, utility functions for simulator info/model list 2017-05-09 19:13:45 +02:00
Klaus Basan
92472e78a6 Ref T58, consolidation fixes
* override simulator, because values can be removed
* DB simulator has priority
2017-05-09 19:13:42 +02:00
Mathew Sutcliffe
183d3f58e7 X-Plane model loader: fixed malformed model strings with spurious multiple liveries.
Each livery was being appended to the model string of the previous livery model.
Reported by Alex Beavil.
2017-05-07 21:52:14 +01:00
Mathew Sutcliffe
b1e57e28d0 Fixed QVector out-of-bounds assert in X-Plane model loader. 2017-05-06 20:22:46 +01: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
Klaus Basan
5b3097a2b0 Ref T28, description for cache 2017-05-05 23:08:18 +01:00
Klaus Basan
c0320609b3 Ref T28, minor improvements 2017-05-05 23:08:06 +01:00
Klaus Basan
c3ed0bc394 Ref T28, removed areModelFilesUpdated and info if loading was from cache
* removed CacheUntilNewer
* did not really work and had some problems
* cache timestamp not really a good value to compare with
* too slow with remote file
2017-05-05 23:08:04 +01:00
Klaus Basan
6fc48ab160 Ref T53, "bulkadd" role in UI/user 2017-05-05 23:08:02 +01:00
Klaus Basan
4d156ad8fc Ref T28, description for caches 2017-05-05 23:07:51 +01:00
Klaus Basan
a0f2a168f9 Ref T28, utility functions to get timestamps 2017-05-05 23:07:46 +01:00
Klaus Basan
d46257f670 Ref T42, util function to create network report 2017-05-05 23:07:38 +01:00
Klaus Basan
297ef8ea16 Ref T42, single quote around value 2017-05-05 23:07:36 +01:00