AFC: more debug messages

pull/1171/head
f4exb 2022-02-27 18:58:43 +01:00
rodzic 75b034180c
commit 16547b2468
2 zmienionych plików z 12 dodań i 1 usunięć

Wyświetl plik

@ -159,6 +159,7 @@ bool AFC::handleMessage(const Message& cmd)
}
else if (MsgDevicesApply::match(cmd))
{
qDebug("AFC::handleMessage: MsgDevicesApply");
removeTrackerFeatureReference();
trackerDeviceChange(m_settings.m_trackerDeviceSetIndex);
removeTrackedFeatureReferences();
@ -621,6 +622,8 @@ void AFC::networkManagerFinished(QNetworkReply *reply)
void AFC::trackerDeviceChange(int deviceIndex)
{
qDebug("AFC::trackerDeviceChange: deviceIndex: %d", deviceIndex);
if (deviceIndex < 0) {
return;
}
@ -650,6 +653,8 @@ void AFC::trackerDeviceChange(int deviceIndex)
void AFC::trackedDeviceChange(int deviceIndex)
{
qDebug("AFC::trackedDeviceChange: deviceIndex: %d", deviceIndex);
if (deviceIndex < 0) {
return;
}
@ -682,6 +687,7 @@ void AFC::removeTrackerFeatureReference()
{
if (MainCore::instance()->existsChannel(m_trackerChannelAPI))
{
qDebug("AFC::removeTrackerFeatureReference: m_trackerChannelAPI: %s", qPrintable(m_trackerChannelAPI->objectName()));
MessageQueue *messageQueue
= MainCore::instance()->getMessagePipes().unregisterChannelToFeature(m_trackerChannelAPI, this, "settings");
disconnect(messageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessageQueue(MessageQueue*)));
@ -695,7 +701,9 @@ void AFC::removeTrackedFeatureReferences()
{
ChannelAPI *channel = *it;
if (MainCore::instance()->existsChannel(channel)) {
if (MainCore::instance()->existsChannel(channel))
{
qDebug("AFC::removeTrackedFeatureReferences: channel: %s", qPrintable(channel->objectName()));
MainCore::instance()->getMessagePipes().unregisterChannelToFeature(channel, this, "settings");
}
}

Wyświetl plik

@ -44,11 +44,13 @@ MessagePipes::~MessagePipes()
MessageQueue *MessagePipes::registerChannelToFeature(const PipeEndPoint *source, PipeEndPoint *dest, const QString& type)
{
qDebug("MessagePipes::registerChannelToFeature: %p %p %s", source, dest, qPrintable(type));
return m_registrations.registerProducerToConsumer(source, dest, type);
}
MessageQueue *MessagePipes::unregisterChannelToFeature(const PipeEndPoint *source, PipeEndPoint *dest, const QString& type)
{
qDebug("MessagePipes::unregisterChannelToFeature: %p %p %s", source, dest, qPrintable(type));
MessageQueue *messageQueue = m_registrations.unregisterProducerToConsumer(source, dest, type);
m_gcWorker->addMessageQueueToDelete(messageQueue);
return messageQueue;
@ -56,6 +58,7 @@ MessageQueue *MessagePipes::unregisterChannelToFeature(const PipeEndPoint *sourc
QList<MessageQueue*>* MessagePipes::getMessageQueues(const PipeEndPoint *source, const QString& type)
{
qDebug("MessagePipes::getMessageQueues: %p %s", source, qPrintable(type));
return m_registrations.getElements(source, type);
}