1
0
Fork 0
mirror of synced 2024-06-28 11:11:15 +12:00
Rare/rare/widgets
loathingKernel 9d4e0995fd
RareAppException: Create exception handler that can show a dialog
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.
2023-03-07 17:11:21 +02:00
..
__init__.py Implement image manager 2022-06-19 17:12:59 +03:00
collapsible_widget.py Code cleanup: Use pass instead of ellipsis (...) for abstractmethods 2023-02-20 15:31:04 +02:00
elide_label.py ElideLabel: Enable word-wrapping for elided labels. 2023-02-20 14:26:14 +02:00
flow_layout.py Add typing to the custom layouts and fix stacked widet page naming 2023-02-04 17:38:07 +02:00
image_widget.py ImageWidget: Clear widget if a null pixmap is set 2023-02-04 17:38:07 +02:00
indicator_edit.py ExtraWidgets: Copy IndicatorLineEdit and PathEdit into their own file. 2023-02-18 16:40:30 +02:00
library_layout.py Cleanup: Remove some unused imports 2023-02-18 17:27:18 +02:00
rare_app.py RareAppException: Create exception handler that can show a dialog 2023-03-07 17:11:21 +02:00
side_tab.py SideTabContainer: Use a signal to update the title instead of monkeypatching setTitle method into the widget 2023-02-21 15:27:52 +02:00
sliding_stack.py Add SlidingStackedWidget from #196 2022-06-22 16:53:26 +03:00