refactor: use ECM logging categories instead
Co-authored-by: flow <flowlnlnln@gmail.com> Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
@ -38,6 +38,15 @@ set( katabasis_PUBLIC
|
||||
include/katabasis/RequestParameter.h
|
||||
)
|
||||
|
||||
ecm_qt_declare_logging_category(katabasis_PRIVATE
|
||||
HEADER KatabasisLogging.h # NOTE: this won't be in src/, but CMAKE_BINARY_DIR/src isn't included by default so this should be fine
|
||||
IDENTIFIER katabasisCredentials
|
||||
CATEGORY_NAME "katabasis.credentials"
|
||||
DEFAULT_SEVERITY Warning
|
||||
DESCRIPTION "Secrets and credentials from Katabasis"
|
||||
EXPORT "Katabasis"
|
||||
)
|
||||
|
||||
add_library( Katabasis STATIC ${katabasis_PRIVATE} ${katabasis_PUBLIC} )
|
||||
target_link_libraries(Katabasis Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Network)
|
||||
|
||||
|
@ -12,8 +12,6 @@
|
||||
|
||||
namespace Katabasis {
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(katabasisCredentials)
|
||||
|
||||
class ReplyServer;
|
||||
class PollServer;
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "katabasis/PollServer.h"
|
||||
#include "katabasis/Globals.h"
|
||||
|
||||
#include "KatabasisLogging.h"
|
||||
#include "JsonResponse.h"
|
||||
|
||||
namespace {
|
||||
@ -59,8 +60,6 @@ QByteArray createQueryParameters(const QList<Katabasis::RequestParameter> ¶m
|
||||
|
||||
namespace Katabasis {
|
||||
|
||||
Q_LOGGING_CATEGORY(katabasisCredentials, "katabasis.credentials", QtWarningMsg)
|
||||
|
||||
DeviceFlow::DeviceFlow(Options & opts, Token & token, QObject *parent, QNetworkAccessManager *manager) : QObject(parent), token_(token) {
|
||||
manager_ = manager ? manager : new QNetworkAccessManager(this);
|
||||
qRegisterMetaType<QNetworkReply::NetworkError>("QNetworkReply::NetworkError");
|
||||
|
Reference in New Issue
Block a user