[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9
Maximiliano Curia
maxy at moszumanska.debian.org
Mon May 9 09:08:52 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=16f9c80
The following commit has been merged in the master branch:
commit 16f9c80604d543fa18df7eab72aa8556bc975a77
Author: Martin Klapetek <mklapetek at kde.org>
Date: Tue Jun 2 14:41:29 2015 +0200
Add some code comments to make it more understandable
---
kaccounts/kaccounts-ktp-plugin.cpp | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/kaccounts/kaccounts-ktp-plugin.cpp b/kaccounts/kaccounts-ktp-plugin.cpp
index 96a14f8..03ca89a 100644
--- a/kaccounts/kaccounts-ktp-plugin.cpp
+++ b/kaccounts/kaccounts-ktp-plugin.cpp
@@ -102,15 +102,17 @@ void KAccountsKTpPlugin::Private::migrateTelepathyAccounts()
kaccount->sync();
}
+ // Remove the mapping from the config file
kaccountsKtpGroup.deleteEntry(account->objectPath());
KConfigGroup ktpKaccountsGroup = kaccountsConfig->group(QStringLiteral("kaccounts-ktp"));
ktpKaccountsGroup.deleteEntry(QString::number(kaccountsId));
kaccount->deleteLater();
+ // Remove the old Tp Account; the new one will be served by the MC plugin directly
account->remove();
} else {
- // Get account storage interface
-
+ // Get account storage interface for checking if this account is not already handled
+ // by Accounts SSO MC plugin
Tp::Client::AccountInterfaceStorageInterface storageInterface(account.data());
Tp::PendingVariant *data = storageInterface.requestPropertyStorageProvider();
data->setProperty("accountObjectPath", account->objectPath());
@@ -162,14 +164,14 @@ void KAccountsKTpPlugin::onStorageProviderRetrieved(Tp::PendingOperation *op)
kaccount->setEnabled(account->isEnabled());
if (service.serviceType() == QLatin1String("IM")) {
+ // Set the telepathy/ settings on the service so that
+ // the MC plugin can use this service
Accounts::AccountService accountService(kaccount, service);
accountService.setValue("telepathy/manager", account->cmName());
accountService.setValue("telepathy/protocol", account->protocolName());
}
}
- qDebug() << account->nickname() << kaccount->id();
-
kaccount->sync();
QObject::connect(kaccount, &Accounts::Account::synced, this, &KAccountsKTpPlugin::onAccountSynced);
}
@@ -184,6 +186,7 @@ void KAccountsKTpPlugin::onAccountSynced()
const QString tpAccountId = account->value(QStringLiteral("uid")).toString();
d->migrateLogs(tpAccountId, account->id());
Tp::AccountPtr tpAccount = d->accountManager->accountForObjectPath(tpAccountId);
+ // Remove the old Tp Account; the new one will be served by the MC plugin directly
tpAccount->remove();
}
@@ -204,6 +207,8 @@ void KAccountsKTpPlugin::Private::migrateLogs(const QString &tpAccountId, const
return;
}
+ // Construct the new dir which is in form "$cmName_$protocol_ktp_2d$service_name_$KAccountsID"
+ // eg. haze_icq_ktp_2d_haze_2dicq_2dim_24
QString newLogsDir = tpAccount->cmName() + QStringLiteral("_")
+ tpAccount->protocolName() + QStringLiteral("_")
+ Tp::escapeAsIdentifier(QStringLiteral("ktp-") + tpAccount->serviceName())
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list