Use logging category for some qDebugs
This commit is contained in:
@@ -66,6 +66,13 @@ ecm_add_qml_module(LibNeoChat GENERATE_PLUGIN_SOURCE
|
|||||||
io.github.quotient_im.libquotient
|
io.github.quotient_im.libquotient
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ecm_qt_declare_logging_category(LibNeoChat
|
||||||
|
HEADER "general_logging.h"
|
||||||
|
IDENTIFIER "GENERAL"
|
||||||
|
CATEGORY_NAME "org.kde.neochat"
|
||||||
|
DEFAULT_SEVERITY Info
|
||||||
|
)
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(LibNeoChat
|
ecm_qt_declare_logging_category(LibNeoChat
|
||||||
HEADER "eventhandler_logging.h"
|
HEADER "eventhandler_logging.h"
|
||||||
IDENTIFIER "EventHandling"
|
IDENTIFIER "EventHandling"
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
#include "neochatroom.h"
|
#include "neochatroom.h"
|
||||||
|
|
||||||
|
#include "general_logging.h"
|
||||||
|
|
||||||
using namespace Qt::StringLiterals;
|
using namespace Qt::StringLiterals;
|
||||||
|
|
||||||
AccountManager::AccountManager(bool testMode, QObject *parent)
|
AccountManager::AccountManager(bool testMode, QObject *parent)
|
||||||
@@ -94,7 +96,7 @@ void AccountManager::saveAccessTokenToKeyChain(NeoChatConnection *connection)
|
|||||||
}
|
}
|
||||||
const auto userId = connection->userId();
|
const auto userId = connection->userId();
|
||||||
|
|
||||||
qDebug() << "Save the access token to the keychain for " << userId;
|
qCDebug(GENERAL) << "Save the access token to the keychain for " << userId;
|
||||||
auto job = new QKeychain::WritePasswordJob(qAppName());
|
auto job = new QKeychain::WritePasswordJob(qAppName());
|
||||||
job->setAutoDelete(true);
|
job->setAutoDelete(true);
|
||||||
job->setKey(userId);
|
job->setKey(userId);
|
||||||
@@ -109,7 +111,7 @@ void AccountManager::saveAccessTokenToKeyChain(NeoChatConnection *connection)
|
|||||||
|
|
||||||
QKeychain::ReadPasswordJob *AccountManager::loadAccessTokenFromKeyChain(const QString &userId)
|
QKeychain::ReadPasswordJob *AccountManager::loadAccessTokenFromKeyChain(const QString &userId)
|
||||||
{
|
{
|
||||||
qDebug() << "Reading access token from the keychain for" << userId;
|
qCDebug(GENERAL) << "Reading access token from the keychain for" << userId;
|
||||||
auto job = new QKeychain::ReadPasswordJob(qAppName(), this);
|
auto job = new QKeychain::ReadPasswordJob(qAppName(), this);
|
||||||
job->setKey(userId);
|
job->setKey(userId);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user