We don't need to know if Origin is installed before launching the window,
so we can save on startup time by executing the worker after the window
has become visible.
To save time and requests, bulk get saves for all games and
load them into each respective RareGame.
Co-authored-by: Dummerle <44114474+dummerle@users.noreply.github.com>
Seems like Epic are changing their API again, and some image types have been renamed. This made the list of updates to be empty after filtering it for image types we could handle. This also had the side effect of an infinite recursion when downloading images, as the resulting pixmap would be null.
To fix this situation, the new image type has been added, and the image loading in RareGame has become two methods, one for loading and one for setting it.
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
- Show text on widget if save is not up-to-date
- Fix text in game info -> cloud saves
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
This is the last change of the `backend_refactor` branch. This makes
`RareCore` the centerpiece of Rare by moving initialization before the UI
is brought up. RareCore is now in control of creating and querying `RareGame`
objects, re-introducing the ability (incomplete) to refresh the games library.
As a result, ApiResults has been removed.
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
The reason is that `sys.excepthook` is a global attribute which we
have to unset for threads because we show a Qt dialog in it and we
can't do that from threads. Before this change, we used to unset
it in threads, but since it is a global attr, that was unsetting it
for the whole application. We cannot reliably reset it because we
can have multiple threads executing and there will be race conditions.
To fix this situation, `RareAppException` implements a callback to
be patched into `sys.excepthook` which emits a signal to be serviced
by the the `RareAppException` instance in the main thread.
`RareAppException` can be subclassed to implement the
`RareAppException._handler` method for domain specific handling.
The `RareApp` base class instantiates its own `RareAppException`
instance for early basic handling. `RareAppException` is subclassed
into `RareException` and `RareLauncherExcpetion` in `Rare` and `RareLauncher`
respectively to implement the aforemention domain specific handling.
Each of these classes deletes the previous instance and replace it
with their specialized handlers.
When the button gets clicked on, it receives keyboard focus. Disabling the button
afterwards leads to `focusNextChild` getting called. This makes the scrollarea
trying to ensure that `nextChild` is visible, essentially scrolling to a random widget