forked from quickshell/quickshell
core/singleton: fix PostReloadHook in singletons
This commit is contained in:
parent
9f38908bdf
commit
31264ac7d1
4 changed files with 16 additions and 6 deletions
|
@ -55,16 +55,18 @@ void EngineGeneration::onReload(EngineGeneration* old) {
|
|||
delete old;
|
||||
|
||||
if (old != nullptr) {
|
||||
QTimer::singleShot(0, [this]() {
|
||||
QuickshellPlugin::runOnReload();
|
||||
PostReloadHook::postReloadTree(this->root);
|
||||
});
|
||||
QTimer::singleShot(0, [this]() { this->postReload(); });
|
||||
} else {
|
||||
QuickshellPlugin::runOnReload();
|
||||
PostReloadHook::postReloadTree(this->root);
|
||||
this->postReload();
|
||||
}
|
||||
}
|
||||
|
||||
void EngineGeneration::postReload() {
|
||||
QuickshellPlugin::runOnReload();
|
||||
PostReloadHook::postReloadTree(this->root);
|
||||
this->singletonRegistry.onPostReload();
|
||||
}
|
||||
|
||||
void EngineGeneration::setWatchingFiles(bool watching) {
|
||||
if (watching) {
|
||||
if (this->watcher == nullptr) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue