SVN commit 1001558 by abnerf: DataEngine is no longer using the Tp::Account::uniqueIdentifier as the source id since it breaks when the account is removed. Now it's using the Tp::Account::objectPath; M +5 -6 presence.cpp M +2 -2 presencesource.cpp --- trunk/playground/base/plasma/dataengines/presence/presence.cpp #1001557:1001558 @@ -126,12 +126,11 @@ { // Get the AccountPtr from the object path and remove the corresponding // source - Tp::AccountPtr account = m_accountManager->accountForPath(path); - if (sources().contains(account->uniqueIdentifier())) { - removeSource(account->uniqueIdentifier()); + if (sources().contains(path)) { + removeSource(path); } else { kWarning() << "PresenceEngine::onAccountRemoved: source " - "does not exist for account:" << account->uniqueIdentifier(); + "does not exist for account:" << path; } } @@ -147,11 +146,11 @@ void PresenceEngine::addAccount(const Tp::AccountPtr &account) { - if (!sources().contains(account->uniqueIdentifier())) { + if (!sources().contains(account->objectPath())) { addSource(new PresenceSource(account, this)); } else { kWarning() << "PresenceEngine::addAccount: source " - "already exists for account:" << account->uniqueIdentifier(); + "already exists for account:" << account->objectPath(); } } --- trunk/playground/base/plasma/dataengines/presence/presencesource.cpp #1001557:1001558 @@ -33,10 +33,10 @@ m_account(account) { kDebug() << "PresenceSource created for account:" << - account->uniqueIdentifier(); + account->objectPath(); // Set the object name (which will be the name of the source) - setObjectName(m_account->uniqueIdentifier()); + setObjectName(m_account->objectPath()); // Make the account become ready with the desired features connect(m_account->becomeReady(