diff options
Diffstat (limited to 'transferengine-plugins')
16 files changed, 62 insertions, 16 deletions
diff --git a/transferengine-plugins/mastodonshareplugin/MastodonSharePost.qml b/transferengine-plugins/mastodonshareplugin/MastodonSharePost.qml index d2d950c..d859d96 100644 --- a/transferengine-plugins/mastodonshareplugin/MastodonSharePost.qml +++ b/transferengine-plugins/mastodonshareplugin/MastodonSharePost.qml @@ -1,5 +1,7 @@ /* - * Copyright (C) 2013-2026 Jolla Ltd. + * SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause */ import QtQuick 2.6 diff --git a/transferengine-plugins/mastodonshareplugin/mastodonplugininfo.cpp b/transferengine-plugins/mastodonshareplugin/mastodonplugininfo.cpp index 99871cb..919d544 100644 --- a/transferengine-plugins/mastodonshareplugin/mastodonplugininfo.cpp +++ b/transferengine-plugins/mastodonshareplugin/mastodonplugininfo.cpp @@ -1,5 +1,7 @@ /* - * Copyright (C) 2013-2026 Jolla Ltd. + * SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause */ #include "mastodonplugininfo.h" diff --git a/transferengine-plugins/mastodonshareplugin/mastodonplugininfo.h b/transferengine-plugins/mastodonshareplugin/mastodonplugininfo.h index 1d74b74..80fe552 100644 --- a/transferengine-plugins/mastodonshareplugin/mastodonplugininfo.h +++ b/transferengine-plugins/mastodonshareplugin/mastodonplugininfo.h @@ -1,5 +1,7 @@ /* - * Copyright (C) 2013-2026 Jolla Ltd. + * SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause */ #ifndef MASTODONPLUGININFO_H diff --git a/transferengine-plugins/mastodonshareplugin/mastodonshareplugin.cpp b/transferengine-plugins/mastodonshareplugin/mastodonshareplugin.cpp index 0666080..8c139a2 100644 --- a/transferengine-plugins/mastodonshareplugin/mastodonshareplugin.cpp +++ b/transferengine-plugins/mastodonshareplugin/mastodonshareplugin.cpp @@ -1,5 +1,7 @@ /* - * Copyright (C) 2013-2026 Jolla Ltd. + * SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause */ #include "mastodonshareplugin.h" diff --git a/transferengine-plugins/mastodonshareplugin/mastodonshareplugin.h b/transferengine-plugins/mastodonshareplugin/mastodonshareplugin.h index 9f21919..04d8412 100644 --- a/transferengine-plugins/mastodonshareplugin/mastodonshareplugin.h +++ b/transferengine-plugins/mastodonshareplugin/mastodonshareplugin.h @@ -1,5 +1,7 @@ /* - * Copyright (C) 2013-2026 Jolla Ltd. + * SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause */ #ifndef MASTODONSHAREPLUGIN_H diff --git a/transferengine-plugins/mastodonshareplugin/mastodonshareplugin.pro b/transferengine-plugins/mastodonshareplugin/mastodonshareplugin.pro index c25e0f7..011bcc5 100644 --- a/transferengine-plugins/mastodonshareplugin/mastodonshareplugin.pro +++ b/transferengine-plugins/mastodonshareplugin/mastodonshareplugin.pro @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. +# +# SPDX-License-Identifier: BSD-3-Clause + TEMPLATE = lib TARGET = $$qtLibraryTarget(mastodonshareplugin) CONFIG += plugin diff --git a/transferengine-plugins/mastodonshareservicestatus.cpp b/transferengine-plugins/mastodonshareservicestatus.cpp index 3ac05d5..2591520 100644 --- a/transferengine-plugins/mastodonshareservicestatus.cpp +++ b/transferengine-plugins/mastodonshareservicestatus.cpp @@ -1,5 +1,7 @@ /* - * Copyright (C) 2013-2026 Jolla Ltd. + * SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause */ #include "mastodonshareservicestatus.h" @@ -27,6 +29,11 @@ MastodonShareServiceStatus::MastodonShareServiceStatus(QObject *parent) { } +QString MastodonShareServiceStatus::authServiceName() const +{ + return QStringLiteral("mastodon-microblog"); +} + void MastodonShareServiceStatus::signIn(int accountId) { Accounts::Account *account = Accounts::Account::fromId(m_accountManager, accountId, this); @@ -36,9 +43,9 @@ void MastodonShareServiceStatus::signIn(int accountId) return; } - const Accounts::Service service(m_accountManager->service(m_serviceName)); + const Accounts::Service service(m_accountManager->service(authServiceName())); if (!service.isValid()) { - qWarning() << Q_FUNC_INFO << "Invalid auth service" << m_serviceName; + qWarning() << Q_FUNC_INFO << "Invalid auth service" << authServiceName(); account->deleteLater(); setAccountDetailsState(accountId, Error); return; @@ -123,7 +130,7 @@ void MastodonShareServiceStatus::signOnError(const SignOn::Error &error) << error.type() << error.message(); if (accountId > 0 && error.type() == SignOn::Error::UserInteraction) { - setCredentialsNeedUpdate(accountId, m_serviceName); + setCredentialsNeedUpdate(accountId, authServiceName()); } session->disconnect(this); @@ -229,7 +236,9 @@ void MastodonShareServiceStatus::queryStatus(QueryStatusMode mode) if (!m_accountIdToDetailsIdx.contains(id)) { AccountDetails details; details.accountId = id; + acc->selectService(Accounts::Service()); details.apiHost = MastodonAuthUtils::normalizeApiHost(acc->value(QStringLiteral("api/Host")).toString()); + acc->selectService(service); QUrl apiUrl(details.apiHost); details.providerName = apiUrl.host(); diff --git a/transferengine-plugins/mastodonshareservicestatus.h b/transferengine-plugins/mastodonshareservicestatus.h index cf2e1f8..be76c37 100644 --- a/transferengine-plugins/mastodonshareservicestatus.h +++ b/transferengine-plugins/mastodonshareservicestatus.h @@ -1,5 +1,7 @@ /* - * Copyright (C) 2013-2026 Jolla Ltd. + * SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause */ #ifndef MASTODONSHARESERVICESTATUS_H @@ -64,6 +66,7 @@ private: Error }; + QString authServiceName() const; void setAccountDetailsState(int accountId, AccountDetailsState state); void signIn(int accountId); diff --git a/transferengine-plugins/mastodontransferplugin/mastodonapi.cpp b/transferengine-plugins/mastodontransferplugin/mastodonapi.cpp index 24bc6f5..fa973d0 100644 --- a/transferengine-plugins/mastodontransferplugin/mastodonapi.cpp +++ b/transferengine-plugins/mastodontransferplugin/mastodonapi.cpp @@ -1,5 +1,7 @@ /* - * Copyright (C) 2013-2026 Jolla Ltd. + * SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause */ #include "mastodonapi.h" diff --git a/transferengine-plugins/mastodontransferplugin/mastodonapi.h b/transferengine-plugins/mastodontransferplugin/mastodonapi.h index e24914d..df4c87a 100644 --- a/transferengine-plugins/mastodontransferplugin/mastodonapi.h +++ b/transferengine-plugins/mastodontransferplugin/mastodonapi.h @@ -1,5 +1,7 @@ /* - * Copyright (C) 2013-2026 Jolla Ltd. + * SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause */ #ifndef MASTODONAPI_H diff --git a/transferengine-plugins/mastodontransferplugin/mastodontransferplugin.cpp b/transferengine-plugins/mastodontransferplugin/mastodontransferplugin.cpp index 064388c..a843df2 100644 --- a/transferengine-plugins/mastodontransferplugin/mastodontransferplugin.cpp +++ b/transferengine-plugins/mastodontransferplugin/mastodontransferplugin.cpp @@ -1,5 +1,7 @@ /* - * Copyright (C) 2013-2026 Jolla Ltd. + * SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause */ #include "mastodontransferplugin.h" diff --git a/transferengine-plugins/mastodontransferplugin/mastodontransferplugin.h b/transferengine-plugins/mastodontransferplugin/mastodontransferplugin.h index 865faff..4d3baaf 100644 --- a/transferengine-plugins/mastodontransferplugin/mastodontransferplugin.h +++ b/transferengine-plugins/mastodontransferplugin/mastodontransferplugin.h @@ -1,5 +1,7 @@ /* - * Copyright (C) 2013-2026 Jolla Ltd. + * SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause */ #ifndef MASTODONTRANSFERPLUGIN_H diff --git a/transferengine-plugins/mastodontransferplugin/mastodontransferplugin.pro b/transferengine-plugins/mastodontransferplugin/mastodontransferplugin.pro index 409ade9..2457a7a 100644 --- a/transferengine-plugins/mastodontransferplugin/mastodontransferplugin.pro +++ b/transferengine-plugins/mastodontransferplugin/mastodontransferplugin.pro @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. +# +# SPDX-License-Identifier: BSD-3-Clause + TEMPLATE = lib TARGET = $$qtLibraryTarget(mastodontransferplugin) CONFIG += plugin diff --git a/transferengine-plugins/mastodontransferplugin/mastodonuploader.cpp b/transferengine-plugins/mastodontransferplugin/mastodonuploader.cpp index 6e0a6ea..7b87823 100644 --- a/transferengine-plugins/mastodontransferplugin/mastodonuploader.cpp +++ b/transferengine-plugins/mastodontransferplugin/mastodonuploader.cpp @@ -1,5 +1,7 @@ /* - * Copyright (C) 2013-2026 Jolla Ltd. + * SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause */ #include "mastodonuploader.h" diff --git a/transferengine-plugins/mastodontransferplugin/mastodonuploader.h b/transferengine-plugins/mastodontransferplugin/mastodonuploader.h index f773c23..72d9689 100644 --- a/transferengine-plugins/mastodontransferplugin/mastodonuploader.h +++ b/transferengine-plugins/mastodontransferplugin/mastodonuploader.h @@ -1,5 +1,7 @@ /* - * Copyright (C) 2013-2026 Jolla Ltd. + * SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause */ #ifndef MASTODONUPLOADER_H diff --git a/transferengine-plugins/transferengine-plugins.pro b/transferengine-plugins/transferengine-plugins.pro index fef3cf5..e2503a3 100644 --- a/transferengine-plugins/transferengine-plugins.pro +++ b/transferengine-plugins/transferengine-plugins.pro @@ -1,2 +1,6 @@ +# SPDX-FileCopyrightText: 2013 - 2026 Jolla Ltd. +# +# SPDX-License-Identifier: BSD-3-Clause + TEMPLATE = subdirs SUBDIRS = mastodonshareplugin mastodontransferplugin |
