mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-11-04 03:36:32 +00:00
io/ipchandler: add registry logs
This commit is contained in:
1 file changed
+9
@@ -4,6 +4,7 @@
|
||||
#include <qcontainerfwd.h>
|
||||
#include <qdebug.h>
|
||||
#include <qlogging.h>
|
||||
#include <qloggingcategory.h>
|
||||
#include <qmetaobject.h>
|
||||
#include <qobject.h>
|
||||
#include <qobjectdefs.h>
|
||||
@@ -14,10 +15,15 @@
|
||||
#include <qtypes.h>
|
||||
|
||||
#include "../core/generation.hpp"
|
||||
#include "../core/logcat.hpp"
|
||||
#include "ipc.hpp"
|
||||
|
||||
namespace qs::io::ipc {
|
||||
|
||||
namespace {
|
||||
QS_LOGGING_CATEGORY(logIpcHandler, "quickshell.ipchandler", QtWarningMsg)
|
||||
}
|
||||
|
||||
bool IpcFunction::resolve(QString& error) {
|
||||
if (this->method.parameterCount() > 10) {
|
||||
error = "Due to technical limitations, IPC functions can only have 10 arguments.";
|
||||
@@ -210,6 +216,7 @@ IpcHandlerRegistry* IpcHandlerRegistry::forGeneration(EngineGeneration* generati
|
||||
if (!ext) {
|
||||
ext = new IpcHandlerRegistry();
|
||||
generation->registerExtension(&key, ext);
|
||||
qCDebug(logIpcHandler) << "Created new IPC handler registry" << ext << "for" << generation;
|
||||
}
|
||||
|
||||
return dynamic_cast<IpcHandlerRegistry*>(ext);
|
||||
@@ -232,10 +239,12 @@ void IpcHandler::updateRegistration(bool destroying) {
|
||||
|
||||
if (this->registeredState.enabled) {
|
||||
registry->deregisterHandler(this);
|
||||
qCDebug(logIpcHandler) << "Deregistered" << this << "from registry" << registry;
|
||||
}
|
||||
|
||||
if (this->targetState.enabled && !this->targetState.target.isEmpty()) {
|
||||
registry->registerHandler(this);
|
||||
qCDebug(logIpcHandler) << "Registered" << this << "to registry" << registry;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user