mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2025-11-06 19:14:57 +11:00
core/reloader: trigger onPostReload if launched post-reload
This is similar to the check in Reloadable, and fixes a number of hard to debug issues with Process, IpcHandler, NotificationServer, and GlobalShortcut not working depending on where you put them in a QML file.
This commit is contained in:
parent
0e6518a706
commit
9708d8212a
8 changed files with 36 additions and 38 deletions
|
|
@ -32,9 +32,7 @@ namespace qs::hyprland::global_shortcuts {
|
|||
///
|
||||
/// [hyprland_global_shortcuts_v1]: https://github.com/hyprwm/hyprland-protocols/blob/main/protocols/hyprland-global-shortcuts-v1.xml
|
||||
/// [the wiki]: https://wiki.hyprland.org/Configuring/Binds/#dbus-global-shortcuts
|
||||
class GlobalShortcut
|
||||
: public QObject
|
||||
, public PostReloadHook {
|
||||
class GlobalShortcut: public PostReloadHook {
|
||||
using ShortcutImpl = impl::GlobalShortcut;
|
||||
|
||||
Q_OBJECT;
|
||||
|
|
@ -59,7 +57,7 @@ class GlobalShortcut
|
|||
QML_ELEMENT;
|
||||
|
||||
public:
|
||||
explicit GlobalShortcut(QObject* parent = nullptr): QObject(parent) {}
|
||||
explicit GlobalShortcut(QObject* parent = nullptr): PostReloadHook(parent) {}
|
||||
~GlobalShortcut() override;
|
||||
Q_DISABLE_COPY_MOVE(GlobalShortcut);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue