Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit ac6fc3fb authored by Laurent Montel's avatar Laurent Montel 😁

Don't load invalid identity

CCBUG: 310428
parent 8876fbd0
......@@ -305,11 +305,15 @@ void IdentityManager::readConfig( KConfig *config )
for ( QStringList::const_iterator group = identities.constBegin();
group != groupEnd; ++group ) {
KConfigGroup configGroup( config, *group );
mIdentities << Identity();
mIdentities.last().readConfig( configGroup );
if ( !haveDefault && mIdentities.last().uoid() == defaultIdentity ) {
haveDefault = true;
mIdentities.last().setIsDefault( true );
Identity identity;
identity.readConfig( configGroup );
//Don't load invalid identity
if (!identity.isNull() && !identity.primaryEmailAddress().isEmpty()) {
mIdentities << identity;
if ( !haveDefault && identity.uoid() == defaultIdentity ) {
haveDefault = true;
identity.setIsDefault( true );
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment