summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Klapetek <[email protected]>2015-06-02 15:34:11 +0200
committerMartin Klapetek <[email protected]>2015-06-02 15:34:11 +0200
commit50955a1e5eaeb490b156c8ca3057a75eb0e4d3aa (patch)
tree0051b4c1cfa02c228f65ab67c79601049c99bde1
parent7506264aa9916920e1a34a89a7c028fb76257a25 (diff)
[kaccounts] Add special handling for Google accounts when migrating logs
-rw-r--r--kaccounts/kaccounts-ktp-plugin.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/kaccounts/kaccounts-ktp-plugin.cpp b/kaccounts/kaccounts-ktp-plugin.cpp
index 82161f9..2751b38 100644
--- a/kaccounts/kaccounts-ktp-plugin.cpp
+++ b/kaccounts/kaccounts-ktp-plugin.cpp
@@ -209,10 +209,15 @@ void KAccountsKTpPlugin::Private::migrateLogs(const QString &tpAccountId, const
// 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())
- + QStringLiteral("_") + QString::number(accountId);
+ QString newLogsDir = tpAccount->cmName() + QLatin1Char('_') + tpAccount->protocolName() + QLatin1Char('_');
+
+ if (tpAccount->serviceName() == QLatin1String("google-talk")) {
+ newLogsDir += QStringLiteral("google_2dim");
+ } else {
+ newLogsDir += Tp::escapeAsIdentifier(QStringLiteral("ktp-") + tpAccount->serviceName());
+ }
+
+ newLogsDir += QLatin1Char('_') + QString::number(accountId);
QString accountLogsDir = tpAccount->uniqueIdentifier();