Commit Graph

63 Commits

Author SHA1 Message Date
Klaus Basan
02f638501e Ref T529, model loader improvements
* XP loader improved progress messages
* added LoadingFailed
* use "Qt::QueuedConnection" for CMultiAircraftModelLoaderProvider

In some cases the loading progress signal was not send properly changing to Qt::QueuedConnection has solved the issue
2019-02-22 20:36:06 +00:00
Klaus Basan
001d90bd6b Ref T529, using sort order in model loader 2019-02-22 20:36:04 +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
6aa1402303 Improve XP model loader messages
Change the severity to Error for parser errors and raise a prominent popup with all collected issues.
Also be more explicit from which file and line the error came from.

Maniphest Tasks: T462
2019-02-22 20:35:51 +00:00
Roland Rossgotterer
6ea8d16460 Fix CAircraftModelLoaderXPlane::performParsing to accept multiple dirs
This implements an old todo from KB.
2019-02-22 20:35:50 +00:00
Roland Rossgotterer
5181855b59 Update loading progress while parsing X-Plane models
Maniphest Tasks: T517
2019-02-22 20:35:50 +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
ace7650ebe Ref T480 No need for QStringLiteral when concatenating with %, use UTF-16 string literals. 2019-02-22 20:23:46 +00:00
Mat Sutcliffe
268d858e2d Parse errors in CAircraftModelLoaderXPlane should be errors, not warnings. 2019-02-22 20:23:32 +00:00
Roland Winklmeier
dbbc459dbc Add X-Plane object version into the model description 2018-09-12 17:01:47 +02:00
Roland Winklmeier
01779183c4 Don't set distributor from CSL package name
That is almost always wrong.
2018-09-12 17:01:46 +02:00
Roland Winklmeier
d682df243a Fix loading of older OBJ8 CSL modelsets
- Fix support for older modelsets not using the texture for OBJ8 feature
- Small error when xsb_aircraft.txt was outside the object folder

ref T326
2018-09-12 17:01:45 +02:00
Roland Winklmeier
a19ccabf35 Refactor shared X-Plane model parser in common header only functions
ref T290
2018-08-24 21:27:00 +02:00
Klaus Basan
2838e90e75 Ref T292, Ref T285 XPlane loader to set file timestamp correctly 2018-07-26 04:32:39 +02:00
Klaus Basan
a6ee6d4b72 Ref T292, Ref T285 minor style improvements, renamings 2018-07-26 04:32:38 +02:00
Klaus Basan
74fa7d7289 Ref T292, Ref T285 signal when "real" loading was started (loading from disk) 2018-07-25 02:37:13 +02:00
Klaus Basan
f36ebbfa83 Doxygen and style 2018-07-25 02:37:12 +02:00
Klaus Basan
40c0c6ae35 Ref T292, adjusted the specific model loaders
* no longer using "std::unique_ptr"
* QObject parent
* Style
2018-07-25 02:36:55 +02:00
Klaus Basan
76334b75d1 Ref T246, model loader improvements / renamings 2018-07-17 19:04:55 +02:00
Roland Winklmeier
2ab6a96d57 Adapt to libxplanemp improvements
* XPMPMultiplayerInit API change
* New CSL command 'VERT_OFFSET'
* OBJ8 objects can have multiple textures now. Therefore use the same model
name convention as with OBJ7.
2018-04-05 02:52:24 +02:00
Klaus Basan
640ec3a573 Ref T252, send all loading status messages as list 2018-02-22 01:26:23 +01:00
Klaus Basan
1970ae9f9b Ref T252, formatting 2018-02-16 12:13:50 +01:00
Klaus Basan
e9e0ae1ff4 Ref T241, Ref T243 formatting and minor tweaks
* unified how we write thread_local const
* ASSERTs
* formatting
2018-02-04 08:53:48 +01:00
Klaus Basan
2f0253b3eb Ref T118, support multiple model directories
* this was recently discussed https://swift-project.slack.com/archives/C04J6J76N/p1508430536000065
* for config parser already implemented
* for XP the loading from multiple dirs still needs to be implemented (see todo)
2017-10-31 15:39:15 +01:00
Klaus Basan
e920dc77b8 Ref T118, formatting 2017-10-31 15:39:12 +01:00
Klaus Basan
65bc1c00fb Formatting, "this->m_" to "m_", comments 2017-09-24 20:29:09 +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
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
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
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
Mathew Sutcliffe
fce1513dae refs #937 Resolved clazy warnings: unnecessary detaching of containers. 2017-04-19 19:31:38 +01:00
Mathew Sutcliffe
488f42b0a1 refs #928 Parse and load OBJ8 CSL packages. 2017-04-19 19:31:33 +01:00
Klaus Basan
5a91f561be refs #888, loadingFinished with CStatusMessage 2017-03-01 20:51:40 +01:00
Klaus Basan
8e55baaf85 Typos, QStringBuilder 2017-03-01 20:51:39 +01:00
Roland Winklmeier
db6b3b07fa Ignore empty lines and comments when parsing xsb_aircraft.txt 2016-12-13 18:32:26 +00:00
Mathew Sutcliffe
78099c0ebe refs #824 X-Plane model loader: set exclude flag for flyable aircraft. 2016-12-13 19:01:59 +01:00
Klaus Basan
02798a7f2b refs #822, set file ts in parser/modelloader 2016-12-13 19:01:52 +01:00
Mathew Sutcliffe
520f593d51 refs #747 It must be possible to load CSL models from a user-supplied directory. 2016-09-02 00:57:01 +01:00
Mathew Sutcliffe
87eeac4e15 refs #710 Simple algorithms to replace several regular expressions. 2016-08-30 04:02:00 +01:00
Klaus Basan
5789120ecc refs #555, load models from directory
* file dialog
* adjusted signatures to pass directory
2016-08-26 21:05:42 +01:00
Klaus Basan
019b623f43 refs #720, adjusted model loader
* callback function to data consolidation (so I can refer to consolidation in BlackCore)
* use status message in parser
* avoid duplicate keys (WOAI has ambiguous model strings which are to be excluded)
2016-08-26 21:04:21 +01:00
Klaus Basan
554d1add79 refs #676, allow 1..n model directories
* adjusted loaders
* changed settings
2016-06-23 20:13:29 +02:00
Klaus Basan
bc344c73fc refs #585, adjusted loaders
* use paths from settings
* no longer pass model directory and exclude directories
2016-06-15 00:11:26 +02:00
Roland Winklmeier
3e4e49a6b6 Set last modification timestamp when loading X-Plane models
This feature was already implemented for MS Flight Simulator model
loaders and missing in the X-Plane model loader.
2016-05-24 16:59:16 +02:00
Roland Winklmeier
3d7a39ed00 Fix BlackMisc header includes
* Include only what is used
* Use forward declaration when possible
* Sorted includes

refs #630
2016-05-13 17:05:49 +02:00
Klaus Basan
43f9515eaa refs #641, moved last simulator selection to caches
* removed from component cache
* kept renamed component caches as stubs for later usage

refs #646, removed gui state cache as it causes build issues on Jenkins
(idea was to keep the classes as stubs for later usage)
2016-05-07 20:11:41 +02:00