refactor: DebugCount (#6753)
Reviewed-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com> Reviewed-by: Nerixyz <nerixdev@outlook.de>
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "common/Common.hpp"
|
||||
#include "common/network/NetworkCommon.hpp"
|
||||
#include "util/DebugCount.hpp"
|
||||
|
||||
#include <QHttpMultiPart>
|
||||
#include <QNetworkRequest>
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user