From 630ff8c58ff241088aa353c88a9ee510a029d6c2 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Mon, 9 Mar 2026 09:44:01 +0100 Subject: Localize settings text and refresh Mastodon docs - Add QTranslator to notifications plugin - Create own logging category now trace is gone --- .../mastodonpostssyncadaptor.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodonpostssyncadaptor.cpp') diff --git a/buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodonpostssyncadaptor.cpp b/buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodonpostssyncadaptor.cpp index 160d6cc..6c9a280 100644 --- a/buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodonpostssyncadaptor.cpp +++ b/buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodonpostssyncadaptor.cpp @@ -19,9 +19,9 @@ ****************************************************************************/ #include "mastodonpostssyncadaptor.h" -#include "trace.h" #include "mastodontextutils.h" +#include #include #include #include @@ -30,6 +30,8 @@ #include namespace { + Q_LOGGING_CATEGORY(lcMastodonPostsSync, "buteo.plugin.mastodon.posts.sync", QtWarningMsg) + QString displayNameForAccount(const QJsonObject &account) { const QString displayName = account.value(QStringLiteral("display_name")).toString().trimmed(); @@ -80,7 +82,7 @@ void MastodonPostsSyncAdaptor::beginSync(int accountId, const QString &accessTok void MastodonPostsSyncAdaptor::finalize(int accountId) { if (syncAborted()) { - qCInfo(lcSocialPlugin) << "sync aborted, won't commit database changes"; + qCInfo(lcMastodonPostsSync) << "sync aborted, won't commit database changes"; } else { m_db.commit(); m_db.wait(); @@ -121,7 +123,7 @@ void MastodonPostsSyncAdaptor::requestPosts(int accountId, const QString &access incrementSemaphore(accountId); setupReplyTimeout(accountId, reply); } else { - qCWarning(lcSocialPlugin) << "unable to request home timeline posts from Mastodon account with id" << accountId; + qCWarning(lcMastodonPostsSync) << "unable to request home timeline posts from Mastodon account with id" << accountId; } } @@ -146,7 +148,7 @@ void MastodonPostsSyncAdaptor::finishedPostsHandler() m_db.removePosts(accountId); if (!statuses.size()) { - qCDebug(lcSocialPlugin) << "no feed posts received for account" << accountId; + qCDebug(lcMastodonPostsSync) << "no feed posts received for account" << accountId; decrementSemaphore(accountId); return; } @@ -249,7 +251,7 @@ void MastodonPostsSyncAdaptor::finishedPostsHandler() accountId); } } else { - qCWarning(lcSocialPlugin) << "unable to parse event feed data from request with account" << accountId + qCWarning(lcMastodonPostsSync) << "unable to parse event feed data from request with account" << accountId << ", got:" << QString::fromUtf8(replyData); } -- cgit v1.2.3