Commit Graph

2006 Commits

Author SHA1 Message Date
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
Mathew Sutcliffe
816f3bd48e New X-Plane flyable plane model string schema
Summary:
New aircraft for XP11 should include a name, author, and studio. These can be used to generate a better model string that doesn't depend on file or directory names.

If the `.acf` contains studio, this is used as the distributor. Otherwise, we use author as distributor instead (truncated in case it is a long list of names).

Then the model string is constructed by combining distributor and model name. If the model name already contains the distributor, we just use the model name.

If the name and distributor are missing, we fall back to the old scheme based on `.acf` filename and dirname.

I have also added a space between aircraft and livery. And I have added default description strings.

After this has landed and been deployed to users, we will need to remove all flyable X-Plane planes from the database and start again with them. (These are the excluded ones.) And we can't accept mappings that use the fallback old scheme if the submitted has renamed the `.acf` file or directory name.

Reviewers: rwinklmeier, kbasan

Reviewed By: kbasan

Subscribers: jenkins

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D16
2017-05-05 23:07:28 +01:00
Mathew Sutcliffe
fbc9c37646 X-Plane model loader: performance tweaks.
Summary:
Using `QStringRef` and `QLatin1String` to avoid unnecessary allocations and conversions.

Depends on D12.

Reviewers: rwinklmeier, kbasan

Subscribers: jenkins

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D13
2017-05-05 23:07:27 +01:00
Mathew Sutcliffe
4e23cd1382 X-Plane model loader: support extra properties of .acf files
Summary:
There are optional fields in an X-Plane flyable aircraft that we can use if they are present:

* Description
* Name
* Distributor

If not present, the user has to edit them manually.

@kbasan Any problem with constructing a `CDistributor` with empty db key?

Reviewers: rwinklmeier, kbasan

Reviewed By: rwinklmeier

Subscribers: jenkins, kbasan

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D12
2017-05-05 23:07:25 +01:00
Mathew Sutcliffe
4a4dea8d4d Rename xbus to xswiftbus
Summary:
I wanted to rename xbus because its relation to //swift// is not immediately clear from the name.

xswiftbus seems reasonable.

Reviewers: #swift_pilot_client, kbasan

Reviewed By: kbasan

Subscribers: kbasan, jenkins

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D14
2017-05-05 23:07:11 +01:00
Klaus Basan
5aa9cb1dca Ref T41, default values for channel/platform
Later I want to get rid of such hardcoded values, but for now it is a workaround
2017-05-05 22:43:57 +01:00
Klaus Basan
8ac609a166 Formatting and UI fixes 2017-05-05 22:40:46 +01:00
Klaus Basan
523f650a34 Ref T40, utility functions 2017-05-05 22:40:24 +01:00
Klaus Basan
fad7d4b8c9 Ref T35, optional model description when mapping 2017-05-05 22:40:16 +01:00
Klaus Basan
8ad7c1e3c7 Fixed issue with still using header instead of info object data
plus some utility functionality
2017-05-05 22:40:10 +01:00
Klaus Basan
640ad99520 Allow to pass timeout to obtainNextWorkingUrl
Sometimes timeout for news in launcher, needs to be investigated
2017-05-05 22:39:56 +01:00
Klaus Basan
88ef2ee019 Ref T32, utility functions for URL/URL list
* keep error messages of failed URLs
* append query
2017-04-21 03:11:00 +02:00
Klaus Basan
db3370f8f7 Ref T24, shared info file name and flag for SharedInfoObjectEntity 2017-04-20 20:38:30 +02:00
Klaus Basan
65f4d1f9e2 Increase timeout a bit (WLAN experience) 2017-04-20 20:35:48 +02:00