refactor: DebugCount (#6753)

Reviewed-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
Reviewed-by: Nerixyz <nerixdev@outlook.de>
This commit is contained in:
Mm2PL
2026-01-28 11:37:06 +01:00
committed by GitHub
parent b69ab9315f
commit 60ecf1a8d7
25 changed files with 198 additions and 129 deletions
+3 -3
View File
@@ -48,7 +48,7 @@ void runCallback(bool concurrent, auto &&fn)
void loadUncached(std::shared_ptr<NetworkData> &&data)
{
DebugCount::increase("http request started");
DebugCount::increase(DebugObject::HTTPRequestStarted);
NetworkRequester requester;
auto *worker = new NetworkTask(std::move(data));
@@ -105,12 +105,12 @@ namespace chatterino {
NetworkData::NetworkData()
{
DebugCount::increase("NetworkData");
DebugCount::increase(DebugObject::NetworkData);
}
NetworkData::~NetworkData()
{
DebugCount::decrease("NetworkData");
DebugCount::decrease(DebugObject::NetworkData);
}
QString NetworkData::getHash()
+1
View File
@@ -6,6 +6,7 @@
#include "common/Common.hpp"
#include "common/network/NetworkCommon.hpp"
#include "util/DebugCount.hpp"
#include <QHttpMultiPart>
#include <QNetworkRequest>
+1 -1
View File
@@ -243,7 +243,7 @@ void NetworkTask::finished()
this->writeToCache(bytes);
}
DebugCount::increase("http request success");
DebugCount::increase(DebugObject::HTTPRequestSuccess);
this->logReply();
this->data_->emitSuccess({reply->error(), status, bytes});
this->data_->emitFinally();