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
|
|
@ -154,9 +154,7 @@ class IpcHandlerRegistry;
|
|||
/// #### Properties
|
||||
/// Properties of an IpcHanlder can be read using `qs ipc prop get` as long as they are
|
||||
/// of an IPC compatible type. See the table above for compatible types.
|
||||
class IpcHandler
|
||||
: public QObject
|
||||
, public PostReloadHook {
|
||||
class IpcHandler: public PostReloadHook {
|
||||
Q_OBJECT;
|
||||
/// If the handler should be able to receive calls. Defaults to true.
|
||||
Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged);
|
||||
|
|
@ -166,7 +164,7 @@ class IpcHandler
|
|||
QML_ELEMENT;
|
||||
|
||||
public:
|
||||
explicit IpcHandler(QObject* parent = nullptr): QObject(parent) {};
|
||||
explicit IpcHandler(QObject* parent = nullptr): PostReloadHook(parent) {};
|
||||
~IpcHandler() override;
|
||||
Q_DISABLE_COPY_MOVE(IpcHandler);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue