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
|
||||
)
|
||||
|
||||
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
|
||||
HEADER "eventhandler_logging.h"
|
||||
IDENTIFIER "EventHandling"
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
#include "neochatroom.h"
|
||||
|
||||
#include "general_logging.h"
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
AccountManager::AccountManager(bool testMode, QObject *parent)
|
||||
@@ -94,7 +96,7 @@ void AccountManager::saveAccessTokenToKeyChain(NeoChatConnection *connection)
|
||||
}
|
||||
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());
|
||||
job->setAutoDelete(true);
|
||||
job->setKey(userId);
|
||||
@@ -109,7 +111,7 @@ void AccountManager::saveAccessTokenToKeyChain(NeoChatConnection *connection)
|
||||
|
||||
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);
|
||||
job->setKey(userId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user