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
+9 -7
View File
@@ -31,6 +31,7 @@
#include <QJsonValue>
#include <QThread>
#include <QTimer>
#include "common/QLogging.hpp"
namespace chatterino {
namespace {
@@ -148,7 +149,7 @@ TwitchChannel::TwitchChannel(const QString &name,
, mod_(false)
, titleRefreshedTime_(QTime::currentTime().addSecs(-TITLE_REFRESH_PERIOD))
{
qDebug() << "[TwitchChannel" << name << "] Opened";
qCDebug(chatterinoTwitch) << "[TwitchChannel" << name << "] Opened";
this->liveStatusChanged.connect([this]() {
if (this->isLive() == 1)
@@ -305,8 +306,8 @@ void TwitchChannel::sendMessage(const QString &message)
return;
}
qDebug() << "[TwitchChannel" << this->getName()
<< "] Send message:" << message;
qCDebug(chatterinoTwitch)
<< "[TwitchChannel" << this->getName() << "] Send message:" << message;
// Do last message processing
QString parsedMessage = app->emotes->emojis.replaceShortCodes(message);
@@ -334,7 +335,7 @@ void TwitchChannel::sendMessage(const QString &message)
if (messageSent)
{
qDebug() << "sent";
qCDebug(chatterinoTwitch) << "sent";
this->lastSentMessage_ = parsedMessage;
}
}
@@ -593,8 +594,8 @@ void TwitchChannel::refreshLiveStatus()
if (roomID.isEmpty())
{
qDebug() << "[TwitchChannel" << this->getName()
<< "] Refreshing live status (Missing ID)";
qCDebug(chatterinoTwitch) << "[TwitchChannel" << this->getName()
<< "] Refreshing live status (Missing ID)";
this->setLive(false);
return;
}
@@ -908,7 +909,8 @@ boost::optional<CheerEmote> TwitchChannel::cheerEmote(const QString &string)
int bitAmount = amount.toInt(&ok);
if (!ok)
{
qDebug() << "Error parsing bit amount in cheerEmote";
qCDebug(chatterinoTwitch)
<< "Error parsing bit amount in cheerEmote";
}
for (const auto &emote : set.cheerEmotes)
{