Switch to QT Category logging (#2206)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
Steve Wills
2020-11-21 10:20:10 -05:00
committed by GitHub
parent d206ed4bcc
commit df722a72c1
54 changed files with 655 additions and 239 deletions
+13 -9
View File
@@ -1,6 +1,7 @@
#include "singletons/NativeMessaging.hpp"
#include "Application.hpp"
#include "common/QLogging.hpp"
#include "providers/twitch/TwitchIrcServer.hpp"
#include "singletons/Paths.hpp"
#include "util/PostToThread.hpp"
@@ -125,7 +126,7 @@ void NativeMessagingClient::sendMessage(const QByteArray &array)
}
catch (ipc::interprocess_exception &ex)
{
qDebug() << "send to gui process:" << ex.what();
qCDebug(chatterinoNativeMessage) << "send to gui process:" << ex.what();
}
}
@@ -169,7 +170,8 @@ void NativeMessagingServer::ReceiverThread::run()
}
catch (ipc::interprocess_exception &ex)
{
qDebug() << "received from gui process:" << ex.what();
qCDebug(chatterinoNativeMessage)
<< "received from gui process:" << ex.what();
}
}
}
@@ -183,7 +185,7 @@ void NativeMessagingServer::ReceiverThread::handleMessage(
if (action.isNull())
{
qDebug() << "NM action was null";
qCDebug(chatterinoNativeMessage) << "NM action was null";
return;
}
@@ -203,11 +205,13 @@ void NativeMessagingServer::ReceiverThread::handleMessage(
args.height = root.value("size").toObject().value("height").toInt(-1);
args.fullscreen = attachFullscreen;
qDebug() << args.x << args.width << args.height << args.winId;
qCDebug(chatterinoNativeMessage)
<< args.x << args.width << args.height << args.winId;
if (_type.isNull() || args.winId.isNull())
{
qDebug() << "NM type, name or winId missing";
qCDebug(chatterinoNativeMessage)
<< "NM type, name or winId missing";
attach = false;
attachFullscreen = false;
return;
@@ -242,7 +246,7 @@ void NativeMessagingServer::ReceiverThread::handleMessage(
}
else
{
qDebug() << "NM unknown channel type";
qCDebug(chatterinoNativeMessage) << "NM unknown channel type";
}
}
else if (action == "detach")
@@ -251,20 +255,20 @@ void NativeMessagingServer::ReceiverThread::handleMessage(
if (winId.isNull())
{
qDebug() << "NM winId missing";
qCDebug(chatterinoNativeMessage) << "NM winId missing";
return;
}
#ifdef USEWINSDK
postToThread([winId] {
qDebug() << "NW detach";
qCDebug(chatterinoNativeMessage) << "NW detach";
AttachedWindow::detach(winId);
});
#endif
}
else
{
qDebug() << "NM unknown action " + action;
qCDebug(chatterinoNativeMessage) << "NM unknown action " + action;
}
}