[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.4/kdenetwork/kopete/libkopete
From: Olivier Goffart <ogoffart () kde ! org>
Date: 2005-06-01 8:42:37
Message-ID: 1117615357.890581.4427.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 420726 by ogoffart:
Backport the revision 408766 if kopeteprotocol.cpp
"Don't let the myself contact be deserialized, or it will conflict with the myself \
metacontact" Well, there is no myself metacontact in branch, but it may conflict \
anyway with all the myself contacts.
This should fix Bug 102735: Kopete segmentation fault on unloading MSN plugin
BUG: 102735
M +12 -1 kopeteprotocol.cpp
--- branches/KDE/3.4/kdenetwork/kopete/libkopete/kopeteprotocol.cpp #420725:420726
@@ -263,6 +263,16 @@
++( serializedDataIt.data() );
}
+ const QString& accountId=sd[ QString::fromLatin1( "accountId" ) ];
+ // myself was allowed in the contactlist in old version of kopete.
+ // But if one keep it on the contactlist now, it may conflict witht he myself \
metacontact. + // So ignore it
+ if(accountId == sd[ QString::fromLatin1( "contactId" ) ] )
+ {
+ kdDebug( 14010 ) << k_funcinfo << "Myself contact was on the contactlist.xml for \
account " << accountId << ". Ignore it" << endl; + continue;
+ }
+
// FIXME: This code almost certainly breaks when having more than
// one contact in a meta contact. There are solutions, but
// they are all hacky and the API needs revision anyway (see
@@ -290,7 +300,7 @@
// (our our config is corrupted). Pick the first available account there. This
// might not be what you want for corrupted accounts, but it's correct for people
// who migrate from 0.6, as there's only one account in that case
- if( sd[ QString::fromLatin1( "accountId" ) ].isNull() )
+ if( accountId.isNull() )
{
QDict<Account> accounts = AccountManager::self()->accounts( this );
if ( accounts.count() > 0 )
@@ -307,6 +317,7 @@
}
}
+
Contact *c = deserializeContact( metaContact, sd, ad );
if (c) // should never be null but I do not like crashes
c->deserializeProperties( sd );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic