mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-11-02 03:35:04 +00:00
feat(socket): add SocketServer and Socket.write
This commit is contained in:
5 files changed
+248
-7
No files matched your search
@@ -7,8 +7,10 @@
|
||||
#include <qobject.h>
|
||||
#include <qqmlcomponent.h>
|
||||
#include <qqmlengine.h>
|
||||
#include <qtimer.h>
|
||||
#include <qurl.h>
|
||||
|
||||
#include "reload.hpp"
|
||||
#include "shell.hpp"
|
||||
#include "watcher.hpp"
|
||||
|
||||
@@ -48,14 +50,21 @@ void RootWrapper::reloadGraph(bool hard) {
|
||||
|
||||
component.completeCreate();
|
||||
|
||||
newRoot->onReload(hard ? nullptr : this->root);
|
||||
auto* oldRoot = this->root;
|
||||
this->root = newRoot;
|
||||
|
||||
if (this->root != nullptr) {
|
||||
this->root->deleteLater();
|
||||
this->root = nullptr;
|
||||
this->root->onReload(hard ? nullptr : oldRoot);
|
||||
|
||||
if (oldRoot != nullptr) {
|
||||
oldRoot->deleteLater();
|
||||
|
||||
QTimer::singleShot(0, [this, newRoot]() {
|
||||
if (this->root == newRoot) PostReloadHook::postReloadTree(this->root);
|
||||
});
|
||||
} else {
|
||||
PostReloadHook::postReloadTree(newRoot);
|
||||
}
|
||||
|
||||
this->root = newRoot;
|
||||
this->onConfigChanged();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user