Commit Graph

1047 Commits

Author SHA1 Message Date
Roland Winklmeier
fb3df51013 Move aircraft matching out of simulator plugins
All model matching will be done simulator independent in
CContextSimulator. The simulator specific part is kept in the model
set.
This also caused the signal modelMatchingCompleted to be renamed to
aircraftRenderingChanged, since the name wasn't accurate anymore.
Both getInstalledModels(), getInstalledModelsCount() and iconForModel()
were removed from the ISimulator interface.

refs #765
2016-09-19 16:30:05 +02:00
Roland Winklmeier
40d4c7774d Make originators calling updateAircraftModel identifable
refs #765
2016-09-19 16:29:37 +02:00
Roland Winklmeier
004ca4f0ca Rename argument simulatorInfo to simulatorPluginInfo 2016-09-19 16:29:37 +02:00
Klaus Basan
03b5f9ce2c refs #764, improved JSON response with messages for JSON authentication service 2016-09-19 16:18:56 +02:00
Klaus Basan
44258a97fa Use temp dir. for cache when a unit test is performed
* the temp. dir can also be used for other purposes
2016-09-19 16:18:55 +02:00
Klaus Basan
09d74c48b8 Changed some default URL to https://datastore.swift-project.org 2016-09-19 16:18:55 +02:00
Klaus Basan
0846a8773a refs #755, validation also for "distributors from DB"
* validation now in webdataservices (so it can check against DB data)
* utility functions
2016-09-19 16:18:50 +02:00
Klaus Basan
c848d7ca61 refs #755, allow to refresh GUI parts during consolidation 2016-09-19 16:18:47 +02:00
Klaus Basan
cbc095d230 refs #755, restore distributor order when consolidating with DB data
(formerly order was overridden)
2016-09-19 16:18:43 +02:00
Klaus Basan
aafff6cd82 Formatting this->ui to ui 2016-09-19 16:18:41 +02:00
Klaus Basan
23ccb35ed8 refs #751, improved model writing to DB
* a pending request can be aborted when taking too long
* success / directWrite flags in signals
2016-09-19 16:18:41 +02:00
Klaus Basan
03c642d88a refs #751, detect invalid JSON message
(which normally means a PHP error message in HTML)
* utility function to remove HTML parts
* adjustments
2016-09-19 16:18:40 +02:00
Mathew Sutcliffe
87eeac4e15 refs #710 Simple algorithms to replace several regular expressions. 2016-08-30 04:02:00 +01:00
Klaus Basan
1d1815de43 refs #748, add airport completers
* in flight plan
* in login
* utility functions
2016-08-28 23:26:11 +02:00
Klaus Basan
eeea9db9c9 refs #748, support for airports in CDbInfo 2016-08-28 23:25:41 +02:00
Klaus Basan
81efe18ae5 refs #745, improved own model set dialog
* allow to consolidate data
* display either preferences or all distributors
* builder can consolidate
* get model set from mapping component
2016-08-27 18:15:21 +02:00
Klaus Basan
f506d780b9 refs #745, get temp. livery from web services 2016-08-27 14:31:41 +02:00
Klaus Basan
231bfea566 refs #741, allow to discard settings
(not saving, but continue closing)
2016-08-26 21:05:55 +01:00
Roland Winklmeier
3603bbabe2 Rename CApplication member function to be better readable
The combination of the method's name 'signalStartupAutomatically'
and the default argument, I completely misunderstood the purpose
of the method in case the argument was skipped.
'a.signalStartupAutomatically()' actually disabled automatic signaling.
2016-08-26 21:05:26 +01:00
Roland Winklmeier
5486596335 Refactor SECLAL player into new threaded player class
The reason for moving the implementation out from CSoundGenerator into
its own class is, because CSoundGenerator was a very complex and
obscure class. It mixed many tasks in one place. CSelcalPlayer
is designed to play SELCALs only.

The following design changes have been made, compared to CSoundGenerator:
* Use pull mode instead of push mode. QBuffer is used as the QIODevice and
  is a wrapper around QByteArray. Therefore it is not necessary to
  implement our own QIODevice.
* Internally it uses a CThreadedSelcalPlayer to relieve the load of the
  main thread. CThreadedSelcalPlayer inherits CContinuousWorker, no
  low level QThread implementation was necessary.
* Push mode was not implemented.
* It is important that the QAudioOutput is allocated in the worker thread.
  QAudioOutput allocates internal objects, which cannot be moved to
  the worker thread.
* Data caching. The generated seclal audio data is cached.

refs #736
2016-08-26 21:05:24 +01:00
Roland Winklmeier
7f9c99ca7a Decouple system keyboard/joystick events from connected actions
The Mac OS/X event loop complained that system event processing took
too much time and disabled event taps. This commit speeds up system
event handling by connecting CInputManager with a queued connection.
This calls all (potentially expensive) hotkey actions asynchronously.
2016-08-26 21:05:21 +01:00
Roland Winklmeier
b78b40bbc0 Make widget style configurable with Fusion as default
Up to now the UI appearance on all platforms was aligned as much as
possible with stylesheets. Since the base widget styles still were
platform dependent defaults, there were many small differences in
details and controls. Some of them were even broken. Instead of
trying to tweak all platform specific styles, default to one on all
platforms. This guarantees that the UI is truly cross platform and
all styles and fixes cover all platforms at the same time.
For users who want to change the default style, they have now a gui
setting. But it is strongly recommended to stick with the default.

refs #683
2016-08-26 21:05:16 +01:00
Klaus Basan
364914cc31 refs #720, file name handling in models
* normalize file name before writing to DB
* use local file paths for local models
* display "C" for color liveries
2016-08-26 21:05:00 +01:00
Roland Winklmeier
4733c72553 Simplify CThreadedReader to avoid race conditions
refs #731
2016-08-26 21:04:39 +01:00
Klaus Basan
c5dc61d64f refs #720, renaming in writer 2016-08-26 21:04:26 +01:00
Klaus Basan
1167735897 refs #720, adjusted exposed functions to new naming
* some minor formatting
* use the new condolidation functions
2016-08-26 21:04:23 +01:00
Klaus Basan
d75b105ee3 refs #720, moved data consolidation with DB data into own class in BlackCore
(in blackcore I can access the readers)
2016-08-26 20:54:52 +01:00
Michał Garapich
39dae7ed45 Fix possible memleak in CDatabaseWriter
* CApplication network methods cleanup
2016-08-26 00:18:41 +02:00
Michał Garapich
1032b2f506 refs #650 Implement CAirportDataReader
* Add BlackCore::CAirportDataReader class
* Add cache traits for airport list
* Add corresponding WebReaderFlag
* Add CAirport::convertFromDatabaseJson()
* Add CApplication::headerFromNetwork() to handle HTTP HEAD method
2016-08-26 00:18:41 +02:00
Roland Winklmeier
78eeecf052 Make crash dump uploading configurable
refs #490
2016-08-09 17:52:10 +02:00
Roland Winklmeier
e47aec223e Integrate Crashpad crash handler into CApplication
Crash handler launches an external crash handler executable called
swift_crashpad_handler. It monitores the parent process and produces
a local dump in case of a crash.
For release builds, the dump is also uploaded to a crash report server.

refs #490
2016-08-09 17:51:57 +02:00
Roland Winklmeier
5dd5ff501d Initialize simulator plugin settings in CContextSimulator constructor 2016-08-05 11:49:32 +02:00
Roland Winklmeier
c92a8ea32c Refactor CContextSimulator::loadSimulatorPlugin
When a plugin is loaded, existing aircrafts should not be added
immediatly, but as soon as the simulator is simulating.
CContextSimulator also handles now the case that no simulator is
attached and all aircraft slots are now doing nothing instead of
raising an assert.

refs #549
2016-08-05 11:49:32 +02:00
Klaus Basan
3aee6174ac refs #719, avoid infinite loop when info object read succeeds, but has incorrect authorizations
* marker for info reader that it failed
* distinguish between "server cannot be connected" and other errors
2016-08-04 17:11:37 +02:00
Mathew Sutcliffe
0ae1e70923 refs #697 Data cache traits renamed with T prefix. 2016-08-03 02:20:27 +01:00
Mathew Sutcliffe
7a34cc6d9a refs #697 BlackCore settings renamed and reorganized. 2016-08-03 02:19:11 +01:00
Mathew Sutcliffe
8275b0d9bf refs #697 BlackMisc settings renamed and reorganized. 2016-08-03 02:19:08 +01:00
Klaus Basan
515ce9b7bf Typo 2016-08-01 16:48:48 +02:00
Klaus Basan
0357dbde8f refs #712, improved readers
* only trigger read when network interface is available
* do not trigger all reads at same time but slightly shifted
* renamed to hasReceivedOkReply()
2016-07-28 21:08:25 +02:00
Klaus Basan
31b03fe2e1 refs #712, signals when all DB data are read / the web services are started
(useful for GUI as it can be used to init only when data are available)
2016-07-28 21:08:24 +02:00
Klaus Basan
8278fb262e Streamlined readInBackground as result of #709 2016-07-28 21:08:22 +02:00
Klaus Basan
90c3c35609 refs #709, as result of testing created special database views for ICAO codes
* view already filter incomplete data
* as result, info object count values are aligned with data eventually parsed (which will allow to detect changes by comparing counts)
* smaller adjustments to allow airlines with designator
2016-07-28 21:08:20 +02:00
Klaus Basan
ff4097504c refs #709, config for launcher 2016-07-28 21:08:18 +02:00
Klaus Basan
4b1179cfd8 refs #709, allow to read directly from DB (bypassing caches)
* allow to reload
* copying array size of response for debugging purposes
2016-07-28 21:08:17 +02:00
Klaus Basan
6f840f4fd6 refs #709, access to timestamp/count per entity
* utility functions
* made protected functions public
2016-07-28 21:08:14 +02:00
Klaus Basan
ebcd738a4b refs #709, fixed initial version displayed
(was not called when data were not updated)
2016-07-28 21:08:12 +02:00
Klaus Basan
541d673acd Fixed year formatter / formatting 2016-07-28 21:08:10 +02:00
Roland Winklmeier
7a9577efef Don't assert if CPluginManagerSimulator::createListener returns nullptr
CPluginManagerSimulator::createListener returns nullptr if no
listener could be created, e.g. because the plugin could not be loaded
due to missing dependencies. Handle this scenario properly instead of
raising an assert.

refs #669
2016-07-26 13:38:18 +02:00
Klaus Basan
7c9328b868 URLs for airports (slack discussion with MG) 2016-07-14 18:49:30 +02:00
Klaus Basan
ade581fd50 Avoid issues during shutdown 2016-07-14 18:49:29 +02:00