Commit Graph

152 Commits

Author SHA1 Message Date
Lars Toenning
b4cbed107b refactor: Remove CNetworkWatchdog
The watchdog was used in a few places as a shortcut to skip reading
data. Further, it was used in some places in the UI to display
connectivity. But it also introduced quite some complexity. In some
cases it can be fragile: network accessibilty cannot be looked up on all
platforms/hardware constellations. The connectivity could change
between the last watchdog call and the real call. Hence all readers must
still handle the case where the connection fails.
To simplify swift and further reduce the dependency onto the project
infrastructure (pings etc.), this removes the watchdog.
This also removes the QNetworkConfigurationManager, which is deprecated
and not available with Qt6.
2024-04-15 22:02:11 +02:00
Lars Toenning
d31084db3a refactor: Directly use shared URL from global setup
Previous we relyed on the watchdog providing a working shared URL (or
empty URL if no URL was reachable). This creates some overhead and
might not work in all cases because of the time between the call to
getWorkingSharedUrl() and the actual network request. Further, not all
calls that are fetching data from our servers were using the shared URL
from the watchdog anyway.
Lastly, this careful checking if the URL is available is only done for
the shared URL and not for all the other URLs that are queried by swift.
2024-04-15 22:01:45 +02:00
Lars Toenning
2ba2d5bc8e refactor: Clarify CApplication method names 2024-02-18 23:09:13 +01:00
Lars Toenning
a664371567 refactor: Move installer flag handling to launcher
This is only used by the launcher
2024-02-18 23:09:13 +01:00
Lars Toenning
a84e299e45 refactor: Remove unused single application flag 2024-02-18 23:09:12 +01:00
Lars Toenning
de45811d34 refactor: Remove unused private shared dir CLI arg 2024-02-18 23:09:12 +01:00
Lars Toenning
7b6f087247 refactor: Fix some clang-tidy warnings
- Mark single argument constructors as explicit
- Remove unused functions
- Avoid default parameters in virtual functions
- Clean up includes
- Do not call static methods through an instance
- And some more...
2024-02-18 23:09:12 +01:00
Lars Toenning
b939711058 refactor: Start WebServices and CoreFacade separately 2024-02-18 22:16:54 +01:00
Lars Toenning
9d3ae3e2b3 refactor: Restructure parsing and setup loading methods 2024-02-18 22:16:54 +01:00
Lars Toenning
99de8009be refactor: Emit CApplication::startUpComplete on starting event loop 2024-02-18 22:16:54 +01:00
Lars Toenning
b8a376701b fix: Remove help/version message dialogs for Gui application
These methods did not quit the application and hence the application
exits with code -1. Further, when calling swift with a commandline
argument, the user might expect to get a commandline output and not a
GUI popup.
2024-02-18 22:16:54 +01:00
Lars Toenning
389431ccef refactor: Clean up setup file reader
Previously we already switch to loading the bootstrap file only from the
local file (ec42553910).
This removes the remaining parts of loading the bootstrap file from a
remote location.
This also updates the UI in case of parsing errors of the bootstrap.json.
2024-02-05 22:23:40 +01:00
Lars Toenning
bcc4bdd31e Add SPDX identifiers for REUSE compliance
Co-authored-by: Mat Sutcliffe <oktal3700@gmail.com>
2023-10-03 09:29:49 +02:00
Lars Toenning
970b7c3650 clang-format src 2023-04-18 16:07:19 +02:00
Mat Sutcliffe
7691e42a5b Fix doxygen warnings
Fixes #188
2023-04-05 18:57:11 +02:00
Lars Toenning
a62da56d5f Use HTTP to get VATSIM IP in automatic mode 2023-02-28 08:29:58 +01:00
Lars Toenning
fbd9255f56 Add getter for server file to CApplication 2023-02-27 15:31:11 +01:00
Mat Sutcliffe
63e8de8f00 Issue #77 getLogCategories returns a simple QStringList instead of our own class 2020-12-19 18:50:34 +00:00
Mat Sutcliffe
936e869c94 Issue #77 Remove unused code 2020-08-29 14:16:10 +01:00
Mat Sutcliffe
2ae0352e75 [doxygen] Fix broken groupings 2020-08-01 19:48:37 +01:00
Mat Sutcliffe
86dd91a064 Issue #15 [GUI] Use CLogHistoryReplica in CLogComponent and swift applications 2020-08-01 19:48:36 +01:00
Mat Sutcliffe
ee4e41d0a6 Issue #15 CCoreFacade owns an instance of CDataLinkDBus 2020-08-01 19:48:35 +01:00
Mat Sutcliffe
38a1d24411 #42 Enable reading update info from GitHub Packages REST API 2020-07-04 21:33:23 +01:00
Mat Sutcliffe
8375881941 Remove dead code 2020-07-04 21:30:53 +01:00
Lars Toenning
1d4aa96e9b Add warning about expire and redesign warning/error popup
Fixes Github Issue #38
2020-06-29 17:22:09 +01:00
Klaus Basan
cb78453e7c Make sure contexts are "gracefulShutdown"
The shutdown was NOT called as it was canceled because of being in shutdown mode
2020-06-12 18:42:42 +01:00
Klaus Basan
4378b6c959 Detect if running with DBus (core + GUI) or just "standalone" (no swift DBus) 2020-01-22 19:46:14 +01:00
Klaus Basan
5150fb4e86 [AFV] Ref T739, cmd.line args for "no audio" 2020-01-07 19:05:42 +00:00
Klaus Basan
383352f79c [AFV] Ref T739, remove implementation details from IContextAudio to keep the DBus interface "pure"
* This was an approach to avoid registration of "local signals"
* that part DID NOT work as planned, as all object's signals are registered
* the refactoring itself nevertheless is NOT a bad idea and has been kept
* as the audio context has this special "concept" and CAfvClient can run on both sides (proxy AND impl.side)
2019-10-18 10:36:23 +02:00
Klaus Basan
ff6b7f8deb Ref T730, added deleteResourceFromNetwork and modified CSlot (directly accept object witb std::function) 2019-10-11 19:00:34 +01:00
Roland Rossgotterer
b5a2f2ad13 AFV initial commit 2019-10-11 18:58:47 +01:00
Klaus Basan
33cd96c2e3 Allow to test an ASSERT (like the crashdump test) 2019-09-16 22:40:54 +01:00
Klaus Basan
235508ec98 Ref T673, incognito flag/menu 2019-09-16 22:39:57 +01:00
Roland Rossgotterer
a7509669f9 Refactor crashpad initialization
Crashpad handler was initialized quite late since we were waiting for settings. However the settings in crashpad are persistent itself, hence we can start it at the earliest possible time and change the upload settings independently later. The only prerequisite is to have QCoreApplication constructed in order for the application name to be available.
ref T652
2019-05-13 11:21:05 +02:00
Klaus Basan
f080f0bb86 Cmd.line arg --skipsa to skip "single application check". Allows to run multiple clients on one machine. 2019-04-11 22:11:37 +01:00
Mat Sutcliffe
e9a4c49d68 Ref T547 Update license masthead in all source code files. 2019-02-22 20:36:43 +00:00
Klaus Basan
16dd6d7451 Ref T401, crash handling in application
* function to simulate crash
* init crash info so file is written + add arguments for handler
* enable / disable uploads
2019-02-22 20:36:31 +00:00
Klaus Basan
ddd44edebd Ref T528, test if simulator interface can be used (only possible in local UI, not in remote UI) 2019-02-22 20:36:08 +00:00
Klaus Basan
8c3faa4ca9 Ref T489, support download progress in our readers
* signal for download progress per entity (DB reader)
* ProgressSlot
* changed signatures for ProgressSlot
2019-02-22 20:35:00 +00:00
Klaus Basan
a09d7191f3 Ref T456, user statistics monitored at backend
* values for simulator/network
* changed concept a bit so crash handler values are used for statistics as well
2018-12-16 00:22:33 +01:00
Roland Rossgotterer
686f8a478e Update crashpad
crashpad is now also supported on Linux. Therefore build it everywhere except under Windows MinGW.
2018-12-16 00:22:00 +01:00
Klaus Basan
42af510342 Check for minimum mapping version
* check functions in gui application/application
* check for instance mapping wizard
* check on mapping tool's stashing component
2018-12-05 04:03:59 +01:00
Klaus Basan
3c20590293 Allow a forced update of the setup reader
When the network is down it can happen the bootstrap file request is not yet timed out but we use our own time out.
In that case we check the cached data upfront by faking a failed web read.
2018-12-05 04:03:43 +01:00
Klaus Basan
dfd33e40c1 Detect emulated driver before casting to avoid crashs 2018-11-16 02:49:51 +01:00
Klaus Basan
17382a0019 Ref T401, update functions for crashpad info in CApplication 2018-11-04 17:43:06 +01:00
Roland Winklmeier
f6ea2a9107 Move CInputManager from singleton to CApplication member
The main reason why CInputManager was singleton is the easy access across
the code. That had the negative side effect that time of destruction was
at a very late stage of the shutdown and could not be controlled by us.
My moving it to CApplication, the access is equally easy (using sApp) and
allows to be cleaned up properly during graceful shutdown.

ref T391
2018-11-04 17:42:42 +01:00
Klaus Basan
705a56b1cb Ref T401, adjusted settings used in components 2018-11-04 17:42:42 +01:00
Klaus Basan
fe99eb261b Ref T367, Ref T400 signal and read handling
* connect this->setupHandlingCompleted directly with reader + renaming
* do not waitForSetup if request already failed
2018-11-04 17:42:41 +01:00
Mat Sutcliffe
f42d42487d Ref T314 Change CApplication::m_networkWatchDog from a smart pointer to a raw pointer.
Attempting to manage a worker's lifetime with a smart pointer is a mistake.
It can lead to double-delete or premature-delete bugs, and race conditions.
Workers self-manage their own lifetimes.
2018-10-05 17:39:56 +02:00
Klaus Basan
09ab653cf9 Reduced number of (unnecessary) network status messages 2018-09-08 15:36:21 +02:00