If the Accountwizzard fails somewhere (like failing to add an IMAP account) the identity is still created and shows up in the list of idenities.
commit 51b1a0fc97c97fdb4fd2251f9e6a42190784d04c branch master Author: Tobias Koenig <tokoe@kde.org> Date: Tue Dec 28 10:21:03 2010 +0100 Remove the identity from IdentityManager on rollback We can't use IdentityManager::rollback() here, because in Identity::create() IdentityManager::commit() is called and therefor no transaction available to rollback. So remove the identity explicitly in its own transaction. CCBUG: 256970 diff --git a/accountwizard/identity.cpp b/accountwizard/identity.cpp index 8bb5dc0..d9f6a72 100644 --- a/accountwizard/identity.cpp +++ b/accountwizard/identity.cpp @@ -81,8 +81,9 @@ QString Identity::identityName() const void Identity::destroy() { + m_manager->removeIdentity( m_identity->identityName() ); + m_manager->commit(); m_identity = 0; - m_manager->rollback(); emit info( i18n( "Identity removed." ) ); }
Hej Andre, can you retest this bug, please? If you have one identity already and the setup of a second account with a different identity fails, the second identity should be removed correctly now. However if you create the initial identity on a clean account setup, we can't remove the identity again, because the IdentityManager class currently doesn't allow us to remove the last remaining identity. Will discuss this with the other pim developers. Ciao, Tobias
commit eefd0a76766724d66e8913b5f8a806a3bb1f2a5e branch master Author: Tobias Koenig <tokoe@kde.org> Date: Tue Dec 28 11:12:42 2010 +0100 Allow to remove the last remaining identity on rollback BUG: 256970 diff --git a/accountwizard/identity.cpp b/accountwizard/identity.cpp index d9f6a72..825b467 100644 --- a/accountwizard/identity.cpp +++ b/accountwizard/identity.cpp @@ -81,7 +81,7 @@ QString Identity::identityName() const void Identity::destroy() { - m_manager->removeIdentity( m_identity->identityName() ); + m_manager->removeIdentityForced( m_identity->identityName() ); m_manager->commit(); m_identity = 0; emit info( i18n( "Identity removed." ) );
Kontact Touch Windows CE 2011-02-22 9:20 In test with failed add account, the new account identity was not added to ids. So okay.