summaryrefslogtreecommitdiff
path: root/buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodonpostssyncadaptor.cpp
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@jolla.com>2026-03-22 20:18:39 +0100
committerAndrew Branson <andrew.branson@jolla.com>2026-03-22 20:25:03 +0100
commit218a05f6ac67f260288ff70344f0f004c7b48c7b (patch)
treed213c375b94b467aa439aabf9810554087b29ec0 /buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodonpostssyncadaptor.cpp
parent2b1a3046832074e47ad2ad703cd518526b9fb459 (diff)
Use shared buteo-common and split notifications service on mainmain
Keep main as the branch that builds against the newer shared social sync modules, while master stays self-contained. - drop the bundled buteo-common sources and stop building or packaging libmastodonbuteocommon - link the Mastodon sync plugins against buteosocialcommon and add the matching build/runtime package requirements - install a dedicated mastodon-notifications account service and wire account creation/packaging around the separate notifications profile - move the posts/events-view side over to the newer shared-helper style used with the updated socialcache stack - clean up qmake project wiring for the shared-module layout and refresh the branch README to describe the split service model - keep the notification schedule at the master value instead of carrying the temporary timing tweak
Diffstat (limited to 'buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodonpostssyncadaptor.cpp')
-rw-r--r--buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodonpostssyncadaptor.cpp12
1 files changed, 7 insertions, 5 deletions
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 <QtCore/QLoggingCategory>
#include <QtCore/QJsonArray>
#include <QtCore/QJsonObject>
#include <QtCore/QJsonValue>
@@ -30,6 +30,8 @@
#include <QtNetwork/QNetworkRequest>
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);
}